From 8bfef3740bab026b52abc6dfe679ff126329003f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Flore-Th=C3=A9bault?= Date: Wed, 19 Jan 2022 13:03:00 +0100 Subject: [PATCH] fix #114 - no error for "terminal" --- .vale/fixtures/RedHat/shell-prompt/.vale.ini | 6 ++++++ .vale/fixtures/RedHat/shell-prompt/testinvalid.adoc | 2 ++ .vale/fixtures/RedHat/shell-prompt/testvalid.adoc | 2 ++ .vale/styles/RedHat/SSL-TLS.yml | 10 ++++++++++ .vale/styles/RedHat/shell-prompt.yml | 6 +++++- 5 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .vale/fixtures/RedHat/shell-prompt/.vale.ini create mode 100644 .vale/fixtures/RedHat/shell-prompt/testinvalid.adoc create mode 100644 .vale/fixtures/RedHat/shell-prompt/testvalid.adoc create mode 100644 .vale/styles/RedHat/SSL-TLS.yml diff --git a/.vale/fixtures/RedHat/shell-prompt/.vale.ini b/.vale/fixtures/RedHat/shell-prompt/.vale.ini new file mode 100644 index 000000000..b89258bb6 --- /dev/null +++ b/.vale/fixtures/RedHat/shell-prompt/.vale.ini @@ -0,0 +1,6 @@ +StylesPath = ../../../styles + +MinAlertLevel = suggestion + +[*.adoc] +RedHat.shell-prompt = YES diff --git a/.vale/fixtures/RedHat/shell-prompt/testinvalid.adoc b/.vale/fixtures/RedHat/shell-prompt/testinvalid.adoc new file mode 100644 index 000000000..aef69156a --- /dev/null +++ b/.vale/fixtures/RedHat/shell-prompt/testinvalid.adoc @@ -0,0 +1,2 @@ +invalid content: command prompt +invalid content: shell diff --git a/.vale/fixtures/RedHat/shell-prompt/testvalid.adoc b/.vale/fixtures/RedHat/shell-prompt/testvalid.adoc new file mode 100644 index 000000000..f5003db6d --- /dev/null +++ b/.vale/fixtures/RedHat/shell-prompt/testvalid.adoc @@ -0,0 +1,2 @@ +valid content: shell prompt +valid content: terminal \ No newline at end of file diff --git a/.vale/styles/RedHat/SSL-TLS.yml b/.vale/styles/RedHat/SSL-TLS.yml new file mode 100644 index 000000000..02f4eb8b4 --- /dev/null +++ b/.vale/styles/RedHat/SSL-TLS.yml @@ -0,0 +1,10 @@ +extends: substitution +message: "Use '%s' rather than '%s'." +link: https://redhat-documentation.github.io/supplementary-style-guide/#ssl-tls +ignorecase: true +level: error +action: + name: replace +source: Red Hat +swap: + "SSL(?!/TLS)": "SSL/TLS" diff --git a/.vale/styles/RedHat/shell-prompt.yml b/.vale/styles/RedHat/shell-prompt.yml index c97a14f2f..0dca5e0f5 100644 --- a/.vale/styles/RedHat/shell-prompt.yml +++ b/.vale/styles/RedHat/shell-prompt.yml @@ -1,5 +1,8 @@ extends: substitution message: "Use '%s' rather than '%s'." +# The "shell prompt" is the character at the beginning of the command line, for example "$" or "#". It indicates that the shell is ready to accept commands. Do not use "command prompt," "terminal," or "shell." +# "Terminal emulation" refers to making a computer respond like a particular type of terminal. Terminal emulation programs allow you to access a mainframe computer or bulletin board service with a personal computer. + link: https://redhat-documentation.github.io/supplementary-style-guide/#shell-prompt ignorecase: true level: error @@ -7,4 +10,5 @@ action: name: replace source: Red Hat swap: - command prompt|terminal: shell prompt + command prompt: shell prompt + "shell(?! prompt)": shell prompt