From 2121b7f7d8c75b10a2889ec26f95b91b49d21cf7 Mon Sep 17 00:00:00 2001 From: aireilly Date: Tue, 12 Dec 2023 15:32:33 +0000 Subject: [PATCH] Adding en dash rule --- .vale/fixtures/RedHat/EnDashes/.vale.ini | 5 +++++ .../fixtures/RedHat/EnDashes/testinvalid.adoc | 1 + .vale/fixtures/RedHat/EnDashes/testvalid.adoc | 4 ++++ .vale/styles/RedHat/CaseSensitiveTerms.yml | 14 +++++++----- .vale/styles/RedHat/EnDashes.yml | 9 ++++++++ .vale/styles/RedHat/TermsWarnings.yml | 3 ++- modules/reference-guide/nav.adoc | 1 + modules/reference-guide/pages/endashes.adoc | 22 +++++++++++++++++++ 8 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 .vale/fixtures/RedHat/EnDashes/.vale.ini create mode 100644 .vale/fixtures/RedHat/EnDashes/testinvalid.adoc create mode 100644 .vale/fixtures/RedHat/EnDashes/testvalid.adoc create mode 100644 .vale/styles/RedHat/EnDashes.yml create mode 100644 modules/reference-guide/pages/endashes.adoc diff --git a/.vale/fixtures/RedHat/EnDashes/.vale.ini b/.vale/fixtures/RedHat/EnDashes/.vale.ini new file mode 100644 index 000000000..ddc1e2b80 --- /dev/null +++ b/.vale/fixtures/RedHat/EnDashes/.vale.ini @@ -0,0 +1,5 @@ +; Vale configuration file to test the `EnDashes` rule +StylesPath = ../../../styles +MinAlertLevel = suggestion +[*.adoc] +RedHat.EnDashes = YES diff --git a/.vale/fixtures/RedHat/EnDashes/testinvalid.adoc b/.vale/fixtures/RedHat/EnDashes/testinvalid.adoc new file mode 100644 index 000000000..31991b1a0 --- /dev/null +++ b/.vale/fixtures/RedHat/EnDashes/testinvalid.adoc @@ -0,0 +1 @@ +September - December diff --git a/.vale/fixtures/RedHat/EnDashes/testvalid.adoc b/.vale/fixtures/RedHat/EnDashes/testvalid.adoc new file mode 100644 index 000000000..d9d66d356 --- /dev/null +++ b/.vale/fixtures/RedHat/EnDashes/testvalid.adoc @@ -0,0 +1,4 @@ +numbers 12–15 +pages 100–107 +X'41'–X'FE' +September–December diff --git a/.vale/styles/RedHat/CaseSensitiveTerms.yml b/.vale/styles/RedHat/CaseSensitiveTerms.yml index 03b4b072b..566728155 100644 --- a/.vale/styles/RedHat/CaseSensitiveTerms.yml +++ b/.vale/styles/RedHat/CaseSensitiveTerms.yml @@ -8,6 +8,7 @@ message: Use '%s' rather than '%s'. action: name: replace swap: + "(?