From b368ea99f8e9cafd3860cc544e276640f4d0da95 Mon Sep 17 00:00:00 2001 From: aireilly Date: Thu, 27 Jul 2023 16:08:30 +0100 Subject: [PATCH] adding do not use terms rule --- .vale/fixtures/RedHat/DoNotUseTerms/.vale.ini | 5 +++ .../RedHat/DoNotUseTerms/testinvalid.adoc | 29 ++++++++++++++++ .../RedHat/DoNotUseTerms/testvalid.adoc | 1 + .vale/styles/RedHat/DoNotUseTerms.yml | 34 +++++++++++++++++++ 4 files changed, 69 insertions(+) create mode 100644 .vale/fixtures/RedHat/DoNotUseTerms/.vale.ini create mode 100644 .vale/fixtures/RedHat/DoNotUseTerms/testinvalid.adoc create mode 100644 .vale/fixtures/RedHat/DoNotUseTerms/testvalid.adoc create mode 100644 .vale/styles/RedHat/DoNotUseTerms.yml diff --git a/.vale/fixtures/RedHat/DoNotUseTerms/.vale.ini b/.vale/fixtures/RedHat/DoNotUseTerms/.vale.ini new file mode 100644 index 000000000..748a5e2bb --- /dev/null +++ b/.vale/fixtures/RedHat/DoNotUseTerms/.vale.ini @@ -0,0 +1,5 @@ +; Vale configuration file to test the `DoNotUseTerms` rule +StylesPath = ../../../styles +MinAlertLevel = suggestion +[*.adoc] +RedHat.DoNotUseTerms = YES diff --git a/.vale/fixtures/RedHat/DoNotUseTerms/testinvalid.adoc b/.vale/fixtures/RedHat/DoNotUseTerms/testinvalid.adoc new file mode 100644 index 000000000..030a44bb0 --- /dev/null +++ b/.vale/fixtures/RedHat/DoNotUseTerms/testinvalid.adoc @@ -0,0 +1,29 @@ +congratulations +daughterboard +destroy +dev +domestic +foo +foreign +fubar +future-proof +geo +geography +latest +lets +out of the box +out-of-the-box +overhead +please +respective +respectively +sanity check +sanity test +time-tested +we +ACK +basically +kerberize +kerberized +native interface +quiescent diff --git a/.vale/fixtures/RedHat/DoNotUseTerms/testvalid.adoc b/.vale/fixtures/RedHat/DoNotUseTerms/testvalid.adoc new file mode 100644 index 000000000..1cb3f31f6 --- /dev/null +++ b/.vale/fixtures/RedHat/DoNotUseTerms/testvalid.adoc @@ -0,0 +1 @@ +hash sign diff --git a/.vale/styles/RedHat/DoNotUseTerms.yml b/.vale/styles/RedHat/DoNotUseTerms.yml new file mode 100644 index 000000000..44757c932 --- /dev/null +++ b/.vale/styles/RedHat/DoNotUseTerms.yml @@ -0,0 +1,34 @@ +--- +extends: substitution +ignorecase: true +level: error +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/donotuseterms/ +message: "%s" +swap: + # Start each error message with "Do not use ..." + # Error messages must be single quoted. + 'domestic|foreign': 'Do not use "domestic" and "foreign" to differentiate geographic locations.' + 'future-proof': Do not use "future-proof" in a statement about the benefits, characteristics, or performance of a Red Hat product or service.' + 'geo|geography': 'Do not use "geo" or "geography" to mean geographical area in customer-facing content. Write, for example, "This version is available worldwide."' + 'out of the box|out-of-the-box': 'Do not use "out of the box" or "out-of-the-box". Use text that is suitable for the context and the noun to which this adjective applies.' + congratulations: 'Do not use "congratulations" in technical information."' + daughterboard: 'Do not use "daughterboard". Use the specific name or function of the plug-in adapter that you are referring to.' + destroy: 'Do not use "destroy" to refer to the removal of an object from a database. Write specifically what happens to the object, such as deleting it from the database.' + devs?: 'Do not use "dev" as a synonym for development or developer.' + foo: 'Do not use "foo". This term is technical jargon in code and as shorthand for fubar, an acronym of profanity in code.' + fubar: 'Do not use "fubar". This term is an acronym of a profanity that is sometimes used by developers in code.' + latest: 'Do not use "latest" to describe products, functions, or features when the term will become obsolete if another version is released.' + lets: 'Do not use "lets" to grant abilities to inanimate objects, as in "the product lets you…". Whenever possible, use a direct, user-focused alternative.' + overhead: 'Do not use "overhead". Use terminology that is more specific. For example, write "running large queries can increase processor usage".' + permits: 'Do not use "permits" to grant abilities to inanimate objects, unless the object is a type of authorization that does grant abilities.' + please: 'Do not use "please" in technical documentation.' + resides: 'Do not use "resides" if a simpler verb is possible.' + respective|respectively: 'Do not use "respective" or "respectively". Rewrite to avoid using these words.' + sanity check|sanity test: 'Do not use "sanity check" or "sanity test". Explain exactly what you mean. For example, use test, evaluate, validate or verify.' + time-tested: 'Do not use "time-tested". Time-tested implies a claim of suitability or reliability.' + we: 'Do not use "we" to refer to Red Hat or to refer collectively to both the authors and the audience.' + ACK: 'Do not use "ACK" as acronym for "acknowledgement" in general. When writing about the acknowledgement flag ("ACK flag") in a TCP packet, use "ACK flag".' + basically: 'Do not use "basically". "Basically" is another term for "in principle" or "fundamentally".' + kerberize|kerberized: 'Do not use "kerberize" to refer to applications or services that use Kerberos authentication. Refer to such applications as "Kerberos-aware" or "Kerberos-enabled", or rewrite the sentence.' + native interface: 'Do not use "native interface" to refer to the command line interface for the JBoss EAP management tool.' + quiescent: 'Do not use "quiescent". If a system is, or needs to be inactive, write "inactive". If a system is, or needs to be safe, write "safe".'