From 66b5987c9ff89390e4720e890af7009f3dc1f4f0 Mon Sep 17 00:00:00 2001 From: Avital Pinnick Date: Mon, 30 Sep 2024 17:33:45 +0300 Subject: [PATCH] Add ObviousTerms rule --- .vale/fixtures/RedHat/ObviousTerms/.vale.ini | 5 +++++ .../RedHat/ObviousTerms/testinvalid.adoc | 2 ++ .../fixtures/RedHat/ObviousTerms/testvalid.adoc | 0 .vale/styles/RedHat/ObviousTerms.yml | 16 ++++++++++++++++ 4 files changed, 23 insertions(+) create mode 100644 .vale/fixtures/RedHat/ObviousTerms/.vale.ini create mode 100644 .vale/fixtures/RedHat/ObviousTerms/testinvalid.adoc create mode 100644 .vale/fixtures/RedHat/ObviousTerms/testvalid.adoc create mode 100644 .vale/styles/RedHat/ObviousTerms.yml diff --git a/.vale/fixtures/RedHat/ObviousTerms/.vale.ini b/.vale/fixtures/RedHat/ObviousTerms/.vale.ini new file mode 100644 index 000000000..d7c0e5fd0 --- /dev/null +++ b/.vale/fixtures/RedHat/ObviousTerms/.vale.ini @@ -0,0 +1,5 @@ +; Vale configuration file to test the `ObviousTerms` rule +StylesPath = ../../../styles +MinAlertLevel = suggestion +[*.adoc] +RedHat.ObviousTerms = YES diff --git a/.vale/fixtures/RedHat/ObviousTerms/testinvalid.adoc b/.vale/fixtures/RedHat/ObviousTerms/testinvalid.adoc new file mode 100644 index 000000000..1854d5534 --- /dev/null +++ b/.vale/fixtures/RedHat/ObviousTerms/testinvalid.adoc @@ -0,0 +1,2 @@ +Enter your user name in the Username field. +Enter your description in the Description field. diff --git a/.vale/fixtures/RedHat/ObviousTerms/testvalid.adoc b/.vale/fixtures/RedHat/ObviousTerms/testvalid.adoc new file mode 100644 index 000000000..e69de29bb diff --git a/.vale/styles/RedHat/ObviousTerms.yml b/.vale/styles/RedHat/ObviousTerms.yml new file mode 100644 index 000000000..fd3f2a327 --- /dev/null +++ b/.vale/styles/RedHat/ObviousTerms.yml @@ -0,0 +1,16 @@ +--- +extends: existence +level: suggestion +# link: +message: "Consider not documenting %s because it is self-explanatory." +scope: sentence +# source: +action: + name: remove +tokens: + - 'User field' + - 'Username field' + - 'Password field' + - 'Mail field' + - 'Description field' + - 'Name field'