From b2c02a8a315b80d34b0b21a4fd730778a68710e8 Mon Sep 17 00:00:00 2001 From: darknao Date: Tue, 29 Nov 2022 10:30:29 +0100 Subject: [PATCH] add Vale configuration --- .vale.ini | 71 +++++ .vale/styles/RedHat/Abbreviations.yml | 9 + .vale/styles/RedHat/CaseSensitiveTerms.yml | 153 ++++++++++ .vale/styles/RedHat/Conjunctions.yml | 14 + .vale/styles/RedHat/ConsciousLanguage.yml | 14 + .vale/styles/RedHat/Contractions.yml | 44 +++ .vale/styles/RedHat/Definitions.yml | 168 +++++++++++ .vale/styles/RedHat/Ellipses.yml | 12 + .vale/styles/RedHat/HeadingPunctuation.yml | 15 + .vale/styles/RedHat/Headings.yml | 206 +++++++++++++ .vale/styles/RedHat/OxfordComma.yml | 8 + .vale/styles/RedHat/PassiveVoice.yml | 186 ++++++++++++ .vale/styles/RedHat/README-IBM.adoc | 9 + .vale/styles/RedHat/README-proselint.md | 13 + .vale/styles/RedHat/README-write-good.md | 28 ++ .vale/styles/RedHat/ReadabilityGrade.yml | 12 + .vale/styles/RedHat/ReleaseNotes.yml | 11 + .vale/styles/RedHat/RepeatedWords.yml | 10 + .vale/styles/RedHat/SelfReferentialText.yml | 14 + .vale/styles/RedHat/SentenceLength.yml | 9 + .vale/styles/RedHat/SimpleWords.yml | 119 ++++++++ .vale/styles/RedHat/Slash.yml | 20 ++ .vale/styles/RedHat/Spacing.yml | 10 + .vale/styles/RedHat/Spelling.yml | 316 ++++++++++++++++++++ .vale/styles/RedHat/TermsErrors.yml | 304 +++++++++++++++++++ .vale/styles/RedHat/TermsSuggestions.yml | 36 +++ .vale/styles/RedHat/TermsWarnings.yml | 20 ++ .vale/styles/RedHat/Usage.yml | 153 ++++++++++ .vale/styles/RedHat/UserReplacedValues.yml | 8 + .vale/styles/RedHat/meta.json | 4 + 30 files changed, 1996 insertions(+) create mode 100644 .vale.ini create mode 100644 .vale/styles/RedHat/Abbreviations.yml create mode 100644 .vale/styles/RedHat/CaseSensitiveTerms.yml create mode 100644 .vale/styles/RedHat/Conjunctions.yml create mode 100644 .vale/styles/RedHat/ConsciousLanguage.yml create mode 100644 .vale/styles/RedHat/Contractions.yml create mode 100644 .vale/styles/RedHat/Definitions.yml create mode 100644 .vale/styles/RedHat/Ellipses.yml create mode 100644 .vale/styles/RedHat/HeadingPunctuation.yml create mode 100644 .vale/styles/RedHat/Headings.yml create mode 100644 .vale/styles/RedHat/OxfordComma.yml create mode 100644 .vale/styles/RedHat/PassiveVoice.yml create mode 100644 .vale/styles/RedHat/README-IBM.adoc create mode 100644 .vale/styles/RedHat/README-proselint.md create mode 100644 .vale/styles/RedHat/README-write-good.md create mode 100644 .vale/styles/RedHat/ReadabilityGrade.yml create mode 100644 .vale/styles/RedHat/ReleaseNotes.yml create mode 100644 .vale/styles/RedHat/RepeatedWords.yml create mode 100644 .vale/styles/RedHat/SelfReferentialText.yml create mode 100644 .vale/styles/RedHat/SentenceLength.yml create mode 100644 .vale/styles/RedHat/SimpleWords.yml create mode 100644 .vale/styles/RedHat/Slash.yml create mode 100644 .vale/styles/RedHat/Spacing.yml create mode 100644 .vale/styles/RedHat/Spelling.yml create mode 100644 .vale/styles/RedHat/TermsErrors.yml create mode 100644 .vale/styles/RedHat/TermsSuggestions.yml create mode 100644 .vale/styles/RedHat/TermsWarnings.yml create mode 100644 .vale/styles/RedHat/Usage.yml create mode 100644 .vale/styles/RedHat/UserReplacedValues.yml create mode 100644 .vale/styles/RedHat/meta.json diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000..4b6b83b --- /dev/null +++ b/.vale.ini @@ -0,0 +1,71 @@ +# Vale configuration file for the https://github.com/redhat-documentation/vale-at-red-hat repository. +# See: https://docs.errata.ai/vale/config + +# Core settings appear at the top (the "global" section). + +# The relative path to the folder containing linting rules (styles). +StylesPath = .vale/styles + +# Optional: Use the `Vocab` parameter to define exceptions to the ruleset specified for `BasedOnStyles`. +# For more information about how to use the `Vocab` feature of vale, see: https://docs.errata.ai/vale/vocab + +# Minimum alert level +# ------------------- +# The minimum alert level in the output (suggestion, warning, or error). +# If integrated into CI, builds fail by default on error-level alerts, unless you run Vale with the --no-exit flag +MinAlertLevel = suggestion + +# IgnoredScopes specifies inline-level HTML tags to ignore. +# These tags may occur in an active scope (unlike SkippedScopes, skipped entirely) but their content still will not raise any alerts. +# Default: ignore `code` and `tt`. +IgnoredScopes = code, tt, img, url, a, body.id +# SkippedScopes specifies block-level HTML tags to ignore. Ignore any content in these scopes. +# Default: ignore `script`, `style`, `pre`, and `figure`. +# For AsciiDoc: by default, listingblock, and literalblock. +SkippedScopes = script, style, pre, figure, code, tt, blockquote, listingblock, literalblock + +[formats] +# Associate `*.properties` files with the `md` format +properties = md + +# Match AsciiDoc files. See: https://docs.errata.ai/vale/scoping +# Ignore files in a directory starting by `.` +# to avoid raising errors for `.vale/fixtures/*/testinvalid.adoc` files +[[!.]*.adoc] +# Styles to load, located in the `StylesPath` folder: +BasedOnStyles = RedHat +; Ignore attributes definition, id statements +TokenIgnores = (:[^\n]+: [^\n]+), (\[id=[^\n]+) + +; RedHat.BareMetal = NO + + +# Match Markdown files. See: https://docs.errata.ai/vale/scoping +# Match also `*.properties` files (see the `format` section). +[*.md] +# Styles to load, located in the `StylesPath` folder: +BasedOnStyles = RedHat + +# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs. +TokenIgnores = (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[) + +# Match Restructured text files +[*.rst] +# Styles to load, located in the `StylesPath` folder: +BasedOnStyles = RedHat + +# Match INI files. See: https://docs.errata.ai/vale/scoping +[*.ini] +# Styles to load, located in the `StylesPath` folder: +BasedOnStyles = RedHat +# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs. +TokenIgnores = (\x60[^\n\x60]+\x60), ([^\n]+=[^\n]*), (\+[^\n]+\+), (http[^\n]+\[) +# Disabling rules (NO) +RedHat.CaseSensitiveTerms = NO +RedHat.ConfigMap = NO +RedHat.Definitions = NO +RedHat.Slash = NO +RedHat.Spacing = NO +RedHat.Spelling = NO +RedHat.TermsSuggestions = NO + diff --git a/.vale/styles/RedHat/Abbreviations.yml b/.vale/styles/RedHat/Abbreviations.yml new file mode 100644 index 0000000..a2eec98 --- /dev/null +++ b/.vale/styles/RedHat/Abbreviations.yml @@ -0,0 +1,9 @@ +--- +extends: existence +level: error +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/abbreviations/ +message: "Do not use periods in all-uppercase abbreviations such as '%s'." +nonword: true +source: "IBM - Periods with abbreviations, p. 5" +tokens: + - '\b(?:[A-Z]\.){3,5}' diff --git a/.vale/styles/RedHat/CaseSensitiveTerms.yml b/.vale/styles/RedHat/CaseSensitiveTerms.yml new file mode 100644 index 0000000..dc71706 --- /dev/null +++ b/.vale/styles/RedHat/CaseSensitiveTerms.yml @@ -0,0 +1,153 @@ +--- +extends: substitution +ignorecase: false +level: error +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/reference-guide/casesensitiveterms/ +message: Use '%s' rather than '%s'. +source: "https://redhat-documentation.github.io/supplementary-style-guide/#glossary-terms-conventions" +action: + name: replace +swap: + asciidoc|Asciidoc: AsciiDoc + asciidoctor|AsciiDoctor: Asciidoctor + '[nN]odejs|[nN]ode\.JS|node\.js': Node.js + # Bind: BIND + Bios: BIOS + btrfs: Btrfs + Capex|capex|capEx: CapEx + CD 1: CD #1 + CDS|Cds: CDs + CGroup|c group: cgroup + configmap: config map + configuration map: config map + classic mode: GNOME Classic + control key|ctrl: Ctrl + csv: CSV + CygMon|cygmon|CYGMON: Cygmon + Denial of Service: denial of service + Denial-of-Service: denial-of-service + devops|Devops|Dev-Ops|Dev Ops: DevOps + Disk druid|disk druid|diskdruid: Disk Druid + dns: DNS + DVD burner|burner: DVD writer + Exec Shield: Exec-Shield + EXIF|exif: Exif + Faq|faq|F.A.Q: FAQ + fedora project: Fedora™ Project + fortran: Fortran + Fqdn|fqdn: FQDN + gb|Gb: GB + gbps|GBPS: Gbps + GDBTK: Insight + gid|Gid: GID + Gimp|gimp: GIMP + git|GIT: Git + Gnome|gnome: GNOME + Gnu|gnu: GNU + Gpl|gpl: GPL + Graalvm|graalVM: GraalVM + Grub: GRUB + GTK|Gtk|gtk: GTK+ + HP Proliant: HP ProLiant + hyperthreading|hyper-threading: Hyper-Threading + HyperVisor|Hyperviser: hypervisor + IA64|ia64: Itanium + IBM z Systems: IBM Z + ignition config: Ignition config + Iops|IOPs: IOPS + Ip: IP + IPSec: IPsec + iSeries: ISeries + iso image: ISO image + iso: ISO + Itanium2: Itanium 2 + JBoss.org: JBoss Community + jetbrains|Jetbrains: JetBrains + Junit|junit: JUnit + Jvm|jvm: JVM + kernel-based virtual machine: Kernel-based Virtual Machine + kickstart: Kickstart + kvm: KVM + Lan|lan: LAN + LINUX|linux: Linux + Microprofile|micro-profile: MicroProfile + Mongo\sDB|mongoDB|Mongodb|Mongo-db: MongoDB + MS-dos|Ms-Dos|ms-dos|MSDOS|msdos: MS-DOS + MS(?!-DOS?)|MSFT|MicroSoft: Microsoft + mutual tls|Mutual tls|Mutual TLS: mutual TLS + MYSQL|mySQL: MySQL + Objective-C: Objective C + openid connect|Openid Connect: OpenID Connect + Open InfiniBand|Infiniband: InfiniBand + Operating Environment: operating environment + Operator Hub|Operator hub|Operatorhub|operatorhub: OperatorHub + Opex|Opex|OPEX|opEx: OpEx + OS|Operating System: operating system + podman: Podman + popup|Pop-up: pop-up + Posix|posix: POSIX + Postscript: PostScript + PPC|P-PC|PPC64: PowerPC + Ppp|ppp: PPP + prom|Prom: PROM + proof key for code exchange: Proof Key for Code Exchange + pSeries: IBM eServer System p + q & a|q&a|Q & A|Q&A: Q and A + qcow2|Qcow2: QCOW2 + Qeth|QETH: qeth + Ram|ram: RAM + RAMdisk|ramdisk|RAM-disk: RAM disk + RAW: raw + Red Hat Proxy: Red Hat Network Proxy Server + Red Hat satellite: Red Hat Satellite + Red Hat Satellite server: Red Hat Satellite Server + Red Hat Satellite Capsule server: Red Hat Satellite Capsule Server + Red Hat Network Satellite server: Red Hat Network Satellite Server + Redboot|Red Boot: RedBoot + RESTEASY|resteasy|Resteasy: RESTEasy + Rom|rom: ROM + rpm: RPM + s-record|S-Record|s-Record|SREC: S-record + S90: IBM S 390 + samba|SAMBA: Samba + SE-Linux|S-E Linux|SE Linux|selinux: SELinux + Shadow Man|ShadowMan: Shadowman + Shadow passwords: shadow passwords + Shadow utilities: shadow utilities + Smallrye: SmallRye + socks: SOCKS + software collection|Software collection: Software Collection + Spring boot: Spring Boot + SR IOV: SR-IOV + Ssh|ssh: SSH + SSL(?!/TLS): SSL/TLS + Staroffice|Star Office: StarOffice + StartX: startx + SU: su + Sys V|System V: SysV + system D|system D|SystemD|system d: systemd + Tolapai|Intel Tolapai: Intel(R) EP80579 Integrated Processor + ttl: TTL + uid: UID + ULTRASPARC|UltraSparc: UltraSPARC + Unix|unix|UNIX-like: UNIX + url: URL + "(? +Copyright © 2014–2015, Jordan Suchow, Michael Pacer, and Lara A. Ross +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.vale/styles/RedHat/README-write-good.md b/.vale/styles/RedHat/README-write-good.md new file mode 100644 index 0000000..ba919b6 --- /dev/null +++ b/.vale/styles/RedHat/README-write-good.md @@ -0,0 +1,28 @@ + +Based on [write-good](https://github.com/btford/write-good). + +> Naive linter for English prose for developers who can't write good and wanna learn to do other stuff good too. + +``` +The MIT License (MIT) + +Copyright (c) 2014 Brian Ford + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` diff --git a/.vale/styles/RedHat/ReadabilityGrade.yml b/.vale/styles/RedHat/ReadabilityGrade.yml new file mode 100644 index 0000000..607cbdd --- /dev/null +++ b/.vale/styles/RedHat/ReadabilityGrade.yml @@ -0,0 +1,12 @@ +--- +extends: readability +grade: 21 +level: suggestion +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/readabilitygrade/ +message: "Grade level (%s) too high." +metrics: + - Automated Readability + - Coleman-Liau + - Flesch-Kincaid + - Gunning Fog + - SMOG diff --git a/.vale/styles/RedHat/ReleaseNotes.yml b/.vale/styles/RedHat/ReleaseNotes.yml new file mode 100644 index 0000000..ae56237 --- /dev/null +++ b/.vale/styles/RedHat/ReleaseNotes.yml @@ -0,0 +1,11 @@ +--- +extends: substitution +ignorecase: false +level: suggestion +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/releasenotes/ +message: "For release notes, consider using '%s' rather than '%s'." +source: "https://redhat-documentation.github.io/supplementary-style-guide/#release-notes" +# swap maps tokens in form of bad: good +swap: + Now: With this update + Previously: Before this update diff --git a/.vale/styles/RedHat/RepeatedWords.yml b/.vale/styles/RedHat/RepeatedWords.yml new file mode 100644 index 0000000..61b6577 --- /dev/null +++ b/.vale/styles/RedHat/RepeatedWords.yml @@ -0,0 +1,10 @@ +--- +extends: repetition +message: "'%s' is repeated!" +level: warning +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/repeatedwords/ +ignorecase: false +alpha: true +tokens: + - '[^\s\.]+' + - '[^\s]+' diff --git a/.vale/styles/RedHat/SelfReferentialText.yml b/.vale/styles/RedHat/SelfReferentialText.yml new file mode 100644 index 0000000..a46b57c --- /dev/null +++ b/.vale/styles/RedHat/SelfReferentialText.yml @@ -0,0 +1,14 @@ +--- +extends: existence +ignorecase: true +level: suggestion +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/selfreferentialtext/ +message: "Avoid using self-referential text such as '%s'." +source: "IBM - Audience and medium, p. 22" +tokens: + - this topic + - this module + - this assembly + - this chapter + - this section + - this subsection diff --git a/.vale/styles/RedHat/SentenceLength.yml b/.vale/styles/RedHat/SentenceLength.yml new file mode 100644 index 0000000..b516eef --- /dev/null +++ b/.vale/styles/RedHat/SentenceLength.yml @@ -0,0 +1,9 @@ +--- +extends: occurrence +level: suggestion +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/sentencelength/ +message: "Try to keep sentences to an average of 32 words or fewer." +scope: sentence +source: "IBM - Conversational style" +max: 32 +token: \b(\w+)\b diff --git a/.vale/styles/RedHat/SimpleWords.yml b/.vale/styles/RedHat/SimpleWords.yml new file mode 100644 index 0000000..4d53049 --- /dev/null +++ b/.vale/styles/RedHat/SimpleWords.yml @@ -0,0 +1,119 @@ +--- +extends: substitution +ignorecase: true +level: suggestion +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/simplewords/ +message: "Use simple language. Consider using '%s' rather than '%s'." +source: "IBM - Conversational style; http://www.plainlanguage.gov/howto/wordsuggestions/simplewords.cfm" +swap: + "approximate(?:ly)?": about + "objective(?! C?)": aim|goal + absent: none|not here + abundance: plenty + accelerate: speed up + accentuate: stress + accompany: go with + accomplish: carry out|do + accorded: given + accordingly: so + accrue: add + accurate: right|exact + acquiesce: agree + acquire: get|buy + "(?__': Separate words by underscores in user-replaced values diff --git a/.vale/styles/RedHat/meta.json b/.vale/styles/RedHat/meta.json new file mode 100644 index 0000000..6099c80 --- /dev/null +++ b/.vale/styles/RedHat/meta.json @@ -0,0 +1,4 @@ +{ + "feed": "https://github.com/redhat-documentation/vale-at-red-hat/releases.atom", + "vale_version": ">=2.20.0" +}