From 35b2a052d6516b8de62b3f04011a96fb45d1d8d0 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Thu, 21 Nov 2024 05:47:40 +0000 Subject: [PATCH 01/17] Check out the HEAD of the release branch for tag events Tags aren't necessarily made to the HEAD of the version branch. The documentation to be published is always on the HEAD of the release branch. Because the workflow now uses regular expressions in Bash, inputs must now use Extended Regular Expression syntax. Signed-off-by: Jack Baldry --- .../action.yaml | 19 ++++++++++ .../determine-release-branch | 36 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100755 publish-technical-documentation-release/determine-release-branch diff --git a/publish-technical-documentation-release/action.yaml b/publish-technical-documentation-release/action.yaml index 7efec5049..af4c46e3f 100644 --- a/publish-technical-documentation-release/action.yaml +++ b/publish-technical-documentation-release/action.yaml @@ -102,6 +102,25 @@ runs: with: ref_name: ${{ github.ref_name }} + - name: Switch to HEAD of version branch for tags + # Tags aren't necessarily made to the HEAD of the version branch. + # The documentation to be published is always on the HEAD of the release branch. + if: steps.has-matching-release-tag.outputs.bool == 'true' && github.ref_type == 'tag' + env: + GITHUB_REF: ${{ github.ref }} + RELEASE_BRANCH_REGEXP: ${{ inputs.release_branch_regexp }} + run: | + branch="$(./publish-technical-documentation-release/determine-release-branch "${RELEASE_BRANCH_REGEXP}" "${GITHUB_REF}")" + + if [[ -z "${branch}" ]]; then + echo "No release branch found for tag ${GITHUB_REF} matching ${RELEASE_BRANCH_REGEXP}. Exiting." + + exit 1 + fi + + git switch --detach "origin/${branch}" + shell: bash + - name: Sync to the website repository (release) if: steps.has-matching-release-tag.outputs.bool == 'true' uses: ./.github/actions/website-sync diff --git a/publish-technical-documentation-release/determine-release-branch b/publish-technical-documentation-release/determine-release-branch new file mode 100755 index 000000000..0e2c80c46 --- /dev/null +++ b/publish-technical-documentation-release/determine-release-branch @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +set -euf -o pipefail + +function usage { + cat < + +Examples: + $0 '^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.x$' v11.3.1 +EOF +} + +if [[ $# -ne 2 ]]; then + usage + + exit 2 +fi + +BRANCH_REGEXP="$1" +TAG="$2" + +for branch in $(git branch -a --contains "tags/${TAG}"); do + branch="${branch#remotes/origin/}"; + + if [[ "${branch}" =~ ${BRANCH_REGEXP} ]]; then + echo "${branch}"; + + exit 0; + fi; +done + +exit 1 From 78c74143fe6d411d6c93c06027c347c12c5db2d9 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Thu, 21 Nov 2024 06:53:08 +0000 Subject: [PATCH 02/17] Document how to release GitHub Actions Signed-off-by: Jack Baldry --- RELEASE.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 000000000..aea3e35e8 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,47 @@ +# Releases + +The Writers' Toolkit repository is a collection of different tools that can have different release mechanisms. + +## GitHub Actions + +The following directories contain GitHub Actions actions: + +- [`add-to-docs-project`](./add-to-docs-project/) +- [`prettier`](./prettier/) +- [`publish-technical-documentation`](./publish-technical-documentation/) +- [`publish-technical-documentation-release`](./publish-technical-documentation-release/) + +You release each action by creating or updating Git tags. +The Git tag is begins with the action directory followed by a slash (`/`) and then the tag version. +For example, `publish-technical-documentation-release/v1.0.0` is the v1.0.0 release of the `publish-technical-documentation-release` action. + +The actions follow [semantic versioning](https://semver.org/). + +To create a tag, use the following command: + +```console +git tag --annotate --force --sign --local-user= -m +``` + +Where: + +- _``_ is the ID of the GPG key associated with your GitHub account. + + For more information refer to [Signing commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits). + +- _``_ is a short message explaining the change to the action. + + This is typically similar to a commit title explaining the "what" of the change. + +- _`TAG`_ is the name of the tag using the previously explained naming convention. + +Each release has three tags: + +- Major version: `/v` +- Major and minor version: `/v.` +- Major, minor, and patch version: `/v..` + +The major version tag should point to the same commit as the latest major and minor version tag. +The major and minor version tag should point to the same commit as the major, minor, and patch version tag. + +The `--force` flag provided to the `git tag` command overwrites existing tags which you need to be able to move the major version and major and minor version tags when you release a new major, minor, and patch version. From ced278ef7a175a1381005143420ec080c292dd4e Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Thu, 21 Nov 2024 15:14:53 +0000 Subject: [PATCH 03/17] Document how to release the Vale package Signed-off-by: Jack Baldry --- .gitignore | 3 ++- RELEASE.md | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ad79ecffb..80d745299 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ /add-to-docs-project/node_modules/ /add-to-docs-project/index.mjs build.conf -/dist \ No newline at end of file +/dist +/vale/Grafana.zip diff --git a/RELEASE.md b/RELEASE.md index aea3e35e8..e3dde3051 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -45,3 +45,19 @@ The major version tag should point to the same commit as the latest major and mi The major and minor version tag should point to the same commit as the major, minor, and patch version tag. The `--force` flag provided to the `git tag` command overwrites existing tags which you need to be able to move the major version and major and minor version tags when you release a new major, minor, and patch version. + +## Vale package + +To release a new version of the Writers' Toolkit Vale package: + +1. Create a new tag for the release with the form `vale/`. + + The Vale package follow [semantic versioning](https://semver.org). + +1. Using the checked out tag, create an archive of the [`vale`](./vale/) directory. + + ```console + cd vale && make Grafana.zip + ``` + +1. Create a GitHub release and upload the [`vale/Grafana.zip`](./vale/Grafana.zip) archive. From 89b5717fbacc1ffa82b65a8e080bb048a560759f Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Fri, 22 Nov 2024 12:49:16 +0000 Subject: [PATCH 04/17] Refactor Grafana Vale style so it can be easily packaged The new directory structure matches the format explained in https://github.com/errata-ai/vale/discussions/925. Signed-off-by: Jack Baldry --- .vale.ini | 4 +- docs/sources/review/lint-prose/rules.md | 2 +- vale/.vale.ini | 5 +- vale/Dockerfile | 20 ++--- vale/Google/AMPM.yml | 4 +- vale/Google/EmDash.yml | 2 +- vale/Google/EnDash.yml | 13 ---- vale/Google/Exclamation.yml | 5 +- vale/Google/GenderBias.yml | 8 +- vale/Google/HeadingPunctuation.yml | 2 +- vale/Google/Headings.yml | 1 + vale/Google/LyHyphens.yml | 4 +- vale/Google/OptionalPlurals.yml | 2 +- vale/Google/WordList.yml | 1 - vale/Grafana/.vale.ini | 5 ++ .../Grafana/{ => styles/Grafana}/Acronyms.yml | 0 vale/Grafana/{ => styles/Grafana}/Admin.yml | 0 .../{ => styles/Grafana}/Admonitions.yml | 0 .../{ => styles/Grafana}/Agentless.yml | 0 .../Grafana/{ => styles/Grafana}/AllowsTo.yml | 0 vale/Grafana/{ => styles/Grafana}/AltText.yml | 0 .../{ => styles/Grafana}/AmazonCloudWatch.yml | 0 .../Grafana}/AmazonProductNames.yml | 0 vale/Grafana/{ => styles/Grafana}/AndOr.yml | 0 .../Grafana}/ApacheProjectNames.yml | 0 .../Grafana/{ => styles/Grafana}/Archives.yml | 0 .../{ => styles/Grafana}/CHANGELOG.yml | 0 .../Grafana}/CommandLinePrompts.yml | 0 .../{ => styles/Grafana}/DatadogProxy.yml | 0 .../{ => styles/Grafana}/DialogBox.yml | 0 .../Grafana}/DocumentationTeam.yml | 0 .../Grafana/{ => styles/Grafana}/DropDown.yml | 0 .../Grafana/{ => styles/Grafana}/EndToEnd.yml | 0 .../{ => styles/Grafana}/Exclamation.yml | 0 vale/Grafana/{ => styles/Grafana}/Gerunds.yml | 0 .../{ => styles/Grafana}/GoogleAMPM.yml | 0 .../Grafana}/GoogleContractions.yml | 0 .../{ => styles/Grafana}/GoogleDateFormat.yml | 0 .../{ => styles/Grafana}/GoogleEllipses.yml | 0 .../{ => styles/Grafana}/GoogleEmDash.yml | 0 .../{ => styles/Grafana}/GoogleEnDash.yml | 0 .../Grafana}/GoogleFirstPerson.yml | 0 .../{ => styles/Grafana}/GoogleGender.yml | 0 .../{ => styles/Grafana}/GoogleGenderBias.yml | 0 .../Grafana}/GoogleHeadingPunctuation.yml | 0 .../{ => styles/Grafana}/GoogleLyHyphens.yml | 0 .../Grafana}/GoogleOptionalPlurals.yml | 0 .../Grafana}/GoogleOxfordComma.yml | 0 .../{ => styles/Grafana}/GooglePassive.yml | 0 .../{ => styles/Grafana}/GooglePeriods.yml | 0 .../Grafana}/GoogleProductNames.yml | 0 .../{ => styles/Grafana}/GoogleRanges.yml | 0 .../{ => styles/Grafana}/GoogleSemicolons.yml | 0 .../{ => styles/Grafana}/GoogleSlang.yml | 0 .../{ => styles/Grafana}/GoogleSpacing.yml | 0 .../{ => styles/Grafana}/GoogleSpelling.yml | 0 .../{ => styles/Grafana}/GoogleWill.yml | 0 .../Grafana/{ => styles/Grafana}/Headings.yml | 2 +- .../{ => styles/Grafana}/Kubernetes.yml | 0 vale/Grafana/{ => styles/Grafana}/Latin.yml | 0 .../{ => styles/Grafana}/MetaMonitoring.yml | 0 vale/Grafana/{ => styles/Grafana}/OAuth.yml | 0 vale/Grafana/{ => styles/Grafana}/OK.yml | 0 vale/Grafana/{ => styles/Grafana}/Ordinal.yml | 0 .../{ => styles/Grafana}/Parentheses.yml | 0 vale/Grafana/{ => styles/Grafana}/Please.yml | 0 .../Grafana}/ProductPossessives.yml | 0 .../Grafana}/PrometheusExporters.yml | 0 .../{ => styles/Grafana}/Quickstart.yml | 0 vale/Grafana/{ => styles/Grafana}/README.yml | 0 vale/Grafana/{ => styles/Grafana}/React.yml | 0 .../ReadabilityAutomatedReadability.yml | 0 .../Grafana}/ReadabilityColemanLiau.yml | 0 .../Grafana}/ReadabilityFleschKincaid.yml | 0 .../Grafana}/ReadabilityFleschReadingEase.yml | 0 .../Grafana}/ReadabilityGunningFog.yml | 0 .../{ => styles/Grafana}/ReadabilityLIX.yml | 0 .../{ => styles/Grafana}/ReadabilitySMOG.yml | 0 vale/Grafana/{ => styles/Grafana}/ReferTo.yml | 0 .../{ => styles/Grafana}/RepeatedWords.yml | 0 vale/Grafana/{ => styles/Grafana}/SQL.yml | 0 .../{ => styles/Grafana}/SelfManaged.yml | 0 .../{ => styles/Grafana}/Shortcodes.yml | 0 .../{ => styles/Grafana}/SmartQuotes.yml | 0 .../Grafana/{ => styles/Grafana}/Spelling.yml | 2 +- .../Grafana/{ => styles/Grafana}/Timeless.yml | 0 vale/Grafana/{ => styles/Grafana}/We.yml | 0 vale/Grafana/{ => styles/Grafana}/Wish.yml | 0 .../Grafana/{ => styles/Grafana}/WordList.yml | 0 .../styles/config}/dictionaries/Makefile | 0 .../config}/dictionaries/en_US-grafana.aff | 0 .../config}/dictionaries/en_US-grafana.dic | 0 .../dictionaries/en_US-grafana.jsonnet | 0 .../config}/dictionaries/en_US-places.aff | 0 .../config}/dictionaries/en_US-places.dic | 0 .../dictionaries/en_US-places.wordlist | 0 .../styles}/config/scripts/SmartQuotes.tengo | 0 .../config/scripts/SmartQuotes_test.go | 0 .../styles}/config/scripts/go.mod | 0 .../styles}/config/scripts/go.sum | 0 .../config/vocabularies/Grafana}/accept.txt | 0 vale/Headings.jsonnet | 2 +- vale/Makefile | 38 +++++---- vale/fixtures/Grafana/Admin/.vale.ini | 1 - vale/fixtures/Grafana/Admonitions/.vale.ini | 1 - vale/fixtures/Grafana/Agentless/.vale.ini | 1 - vale/fixtures/Grafana/AltText/.vale.ini | 1 - .../Grafana/AmazonCloudWatch/.vale.ini | 1 - vale/fixtures/Grafana/AndOr/.vale.ini | 1 - .../Grafana/ApacheProjectNames/.vale.ini | 1 - vale/fixtures/Grafana/Archives/.vale.ini | 1 - .../Grafana/CommandLinePrompts/.vale.ini | 1 - vale/fixtures/Grafana/DatadogProxy/.vale.ini | 1 - .../Grafana/DocumentationTeam/.vale.ini | 1 - vale/fixtures/Grafana/DropDown/.vale.ini | 1 - vale/fixtures/Grafana/Gerunds/.vale.ini | 1 - vale/fixtures/Grafana/HTTP/.vale.ini | 1 - vale/fixtures/Grafana/Headings/.vale.ini | 1 - .../Grafana/Headings/testinvalid.golden | 12 +-- vale/fixtures/Grafana/Kubernetes/.vale.ini | 1 - vale/fixtures/Grafana/Latin/.vale.ini | 1 - vale/fixtures/Grafana/OAuth/.vale.ini | 1 - vale/fixtures/Grafana/OK/.vale.ini | 1 - vale/fixtures/Grafana/Ordinal/.vale.ini | 1 - .../Grafana/ProductPossessives/.vale.ini | 1 - .../Grafana/PrometheusExporters/.vale.ini | 1 - vale/fixtures/Grafana/Quickstart/.vale.ini | 1 - vale/fixtures/Grafana/React/.vale.ini | 1 - vale/fixtures/Grafana/ReferTo/.vale.ini | 1 - vale/fixtures/Grafana/RepeatedWords/.vale.ini | 1 - vale/fixtures/Grafana/SQL/.vale.ini | 1 - vale/fixtures/Grafana/Shortcodes/.vale.ini | 1 - vale/fixtures/Grafana/SmartQuotes/.vale.ini | 1 - vale/fixtures/Grafana/Wish/.vale.ini | 1 - vale/fixtures/Grafana/Wordlist/.vale.ini | 1 - vale/google.jsonnet | 78 +++++++++---------- vale/readability.jsonnet | 14 ++-- 137 files changed, 106 insertions(+), 151 deletions(-) delete mode 100644 vale/Google/EnDash.yml create mode 100644 vale/Grafana/.vale.ini rename vale/Grafana/{ => styles/Grafana}/Acronyms.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Admin.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Admonitions.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Agentless.yml (100%) rename vale/Grafana/{ => styles/Grafana}/AllowsTo.yml (100%) rename vale/Grafana/{ => styles/Grafana}/AltText.yml (100%) rename vale/Grafana/{ => styles/Grafana}/AmazonCloudWatch.yml (100%) rename vale/Grafana/{ => styles/Grafana}/AmazonProductNames.yml (100%) rename vale/Grafana/{ => styles/Grafana}/AndOr.yml (100%) rename vale/Grafana/{ => styles/Grafana}/ApacheProjectNames.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Archives.yml (100%) rename vale/Grafana/{ => styles/Grafana}/CHANGELOG.yml (100%) rename vale/Grafana/{ => styles/Grafana}/CommandLinePrompts.yml (100%) rename vale/Grafana/{ => styles/Grafana}/DatadogProxy.yml (100%) rename vale/Grafana/{ => styles/Grafana}/DialogBox.yml (100%) rename vale/Grafana/{ => styles/Grafana}/DocumentationTeam.yml (100%) rename vale/Grafana/{ => styles/Grafana}/DropDown.yml (100%) rename vale/Grafana/{ => styles/Grafana}/EndToEnd.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Exclamation.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Gerunds.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleAMPM.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleContractions.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleDateFormat.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleEllipses.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleEmDash.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleEnDash.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleFirstPerson.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleGender.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleGenderBias.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleHeadingPunctuation.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleLyHyphens.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleOptionalPlurals.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleOxfordComma.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GooglePassive.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GooglePeriods.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleProductNames.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleRanges.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleSemicolons.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleSlang.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleSpacing.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleSpelling.yml (100%) rename vale/Grafana/{ => styles/Grafana}/GoogleWill.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Headings.yml (97%) rename vale/Grafana/{ => styles/Grafana}/Kubernetes.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Latin.yml (100%) rename vale/Grafana/{ => styles/Grafana}/MetaMonitoring.yml (100%) rename vale/Grafana/{ => styles/Grafana}/OAuth.yml (100%) rename vale/Grafana/{ => styles/Grafana}/OK.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Ordinal.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Parentheses.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Please.yml (100%) rename vale/Grafana/{ => styles/Grafana}/ProductPossessives.yml (100%) rename vale/Grafana/{ => styles/Grafana}/PrometheusExporters.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Quickstart.yml (100%) rename vale/Grafana/{ => styles/Grafana}/README.yml (100%) rename vale/Grafana/{ => styles/Grafana}/React.yml (100%) rename vale/Grafana/{ => styles/Grafana}/ReadabilityAutomatedReadability.yml (100%) rename vale/Grafana/{ => styles/Grafana}/ReadabilityColemanLiau.yml (100%) rename vale/Grafana/{ => styles/Grafana}/ReadabilityFleschKincaid.yml (100%) rename vale/Grafana/{ => styles/Grafana}/ReadabilityFleschReadingEase.yml (100%) rename vale/Grafana/{ => styles/Grafana}/ReadabilityGunningFog.yml (100%) rename vale/Grafana/{ => styles/Grafana}/ReadabilityLIX.yml (100%) rename vale/Grafana/{ => styles/Grafana}/ReadabilitySMOG.yml (100%) rename vale/Grafana/{ => styles/Grafana}/ReferTo.yml (100%) rename vale/Grafana/{ => styles/Grafana}/RepeatedWords.yml (100%) rename vale/Grafana/{ => styles/Grafana}/SQL.yml (100%) rename vale/Grafana/{ => styles/Grafana}/SelfManaged.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Shortcodes.yml (100%) rename vale/Grafana/{ => styles/Grafana}/SmartQuotes.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Spelling.yml (97%) rename vale/Grafana/{ => styles/Grafana}/Timeless.yml (100%) rename vale/Grafana/{ => styles/Grafana}/We.yml (100%) rename vale/Grafana/{ => styles/Grafana}/Wish.yml (100%) rename vale/Grafana/{ => styles/Grafana}/WordList.yml (100%) rename vale/{ => Grafana/styles/config}/dictionaries/Makefile (100%) rename vale/{ => Grafana/styles/config}/dictionaries/en_US-grafana.aff (100%) rename vale/{ => Grafana/styles/config}/dictionaries/en_US-grafana.dic (100%) rename vale/{ => Grafana/styles/config}/dictionaries/en_US-grafana.jsonnet (100%) rename vale/{ => Grafana/styles/config}/dictionaries/en_US-places.aff (100%) rename vale/{ => Grafana/styles/config}/dictionaries/en_US-places.dic (100%) rename vale/{ => Grafana/styles/config}/dictionaries/en_US-places.wordlist (100%) rename vale/{ => Grafana/styles}/config/scripts/SmartQuotes.tengo (100%) rename vale/{ => Grafana/styles}/config/scripts/SmartQuotes_test.go (100%) rename vale/{ => Grafana/styles}/config/scripts/go.mod (100%) rename vale/{ => Grafana/styles}/config/scripts/go.sum (100%) rename vale/{config/vocabularies => Grafana/styles/config/vocabularies/Grafana}/accept.txt (100%) diff --git a/.vale.ini b/.vale.ini index 21ce79742..7719dece0 100644 --- a/.vale.ini +++ b/.vale.ini @@ -1,6 +1,4 @@ MinAlertLevel = suggestion -Packages = Google, https://github.com/errata-ai/Hugo/releases/download/v0.2.0/Hugo.zip, Readability -StylesPath = vale +Packages = Google, https://github.com/errata-ai/Hugo/releases/download/v0.2.0/Hugo.zip, Readability, vale/Grafana [*] BasedOnStyles = Grafana -TokenIgnores = (+?), \*\*[^\n]+\*\* diff --git a/docs/sources/review/lint-prose/rules.md b/docs/sources/review/lint-prose/rules.md index 0cf777b0a..f0455b714 100755 --- a/docs/sources/review/lint-prose/rules.md +++ b/docs/sources/review/lint-prose/rules.md @@ -666,7 +666,7 @@ Extends: capitalization Use sentence-style capitalization for _``_. -If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/Headings.yml for them to be considered correctly cased. +If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/styles/GrafanaHeadings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. diff --git a/vale/.vale.ini b/vale/.vale.ini index 00a2f60c2..7bd007f72 100644 --- a/vale/.vale.ini +++ b/vale/.vale.ini @@ -1,6 +1,5 @@ MinAlertLevel = suggestion -Packages = Google, https://github.com/errata-ai/Hugo/releases/download/v0.2.0/Hugo.zip, Readability -StylesPath = /etc/vale/styles +Packages = Grafana + [*] BasedOnStyles = Grafana -TokenIgnores = (+?), \*\*[^\n]+\*\* diff --git a/vale/Dockerfile b/vale/Dockerfile index af16d5ebf..cbf2f5870 100644 --- a/vale/Dockerfile +++ b/vale/Dockerfile @@ -21,23 +21,17 @@ RUN mv reviewdog /out ################################################################################ FROM jdkato/vale:v3.8.0 -ENV DICPATH=/etc/vale/dictionaries +COPY --from=reviewdog /out/reviewdog /bin + +# Git is useful for reporting with reviewdog. +RUN apk add --no-cache git RUN mkdir -p /etc/vale +WORKDIR /etc/vale -COPY Google /etc/vale/styles/Google -COPY Grafana /etc/vale/styles/Grafana +COPY .reviewdog.yml /etc/vale/.reviewdog.yml COPY .vale.ini /etc/vale/.vale.ini -COPY .vale-config /etc/vale/.vale-config -COPY config /etc/vale/styles/config -COPY dictionaries /etc/vale/dictionaries +COPY Grafana /etc/vale/Grafana COPY rdjsonl.tmpl /etc/vale/rdjsonl.tmpl -COPY .reviewdog.yml /etc/vale/.reviewdog.yml -# Git is useful for reporting with reviewdog. -RUN apk add --no-cache git - -COPY --from=reviewdog /out/reviewdog /bin - -WORKDIR /etc/vale RUN vale sync diff --git a/vale/Google/AMPM.yml b/vale/Google/AMPM.yml index 518e1d4dc..37b49edf8 100644 --- a/vale/Google/AMPM.yml +++ b/vale/Google/AMPM.yml @@ -4,6 +4,6 @@ link: "https://developers.google.com/style/word-list" level: error nonword: true tokens: - - '\d{1,2}[AP]M' - - '\d{1,2} ?[ap]m' + - '\d{1,2}[AP]M\b' + - '\d{1,2} ?[ap]m\b' - '\d{1,2} ?[aApP]\.[mM]\.' diff --git a/vale/Google/EmDash.yml b/vale/Google/EmDash.yml index 9cb0464e1..8186ed22f 100644 --- a/vale/Google/EmDash.yml +++ b/vale/Google/EmDash.yml @@ -6,7 +6,7 @@ level: error action: name: edit params: - - remove + - trim - " " tokens: - '\s[—–]\s' diff --git a/vale/Google/EnDash.yml b/vale/Google/EnDash.yml deleted file mode 100644 index ec23a87ab..000000000 --- a/vale/Google/EnDash.yml +++ /dev/null @@ -1,13 +0,0 @@ -extends: existence -message: "Use an em dash ('—') instead of '–'." -link: "https://developers.google.com/style/dashes" -nonword: true -level: error -action: - name: edit - params: - - replace - - "-" - - "—" -tokens: - - "–" diff --git a/vale/Google/Exclamation.yml b/vale/Google/Exclamation.yml index 377162eb2..b4e4a1f7e 100644 --- a/vale/Google/Exclamation.yml +++ b/vale/Google/Exclamation.yml @@ -4,6 +4,9 @@ link: "https://developers.google.com/style/exclamation-points" nonword: true level: error action: - name: remove + name: edit + params: + - trim_right + - "!" tokens: - '\w+!(?:\s|$)' diff --git a/vale/Google/GenderBias.yml b/vale/Google/GenderBias.yml index 74856bdd4..36f5a3f86 100644 --- a/vale/Google/GenderBias.yml +++ b/vale/Google/GenderBias.yml @@ -1,7 +1,7 @@ extends: substitution message: "Consider using '%s' instead of '%s'." -link: "https://developers.google.com/style/inclusive-documentation" ignorecase: true +link: "https://developers.google.com/style/inclusive-documentation" level: error action: name: replace @@ -12,8 +12,6 @@ swap: anchor(?:m[ae]n|wom[ae]n): anchor(s) authoress: author camera(?:m[ae]n|wom[ae]n): camera operator(s) - chair(?:m[ae]n|wom[ae]n): chair(s) - congress(?:m[ae]n|wom[ae]n): member(s) of congress door(?:m[ae]|wom[ae]n): concierge(s) draft(?:m[ae]n|wom[ae]n): drafter(s) fire(?:m[ae]n|wom[ae]n): firefighter(s) @@ -22,14 +20,12 @@ swap: garbage(?:m[ae]n|wom[ae]n): waste collector(s) lady lawyer: lawyer ladylike: courteous - landlord: building manager mail(?:m[ae]n|wom[ae]n): mail carriers man and wife: husband and wife man enough: strong enough - mankind: human kind + mankind: human kind|humanity manmade: manufactured manpower: personnel - men and girls: men and women middle(?:m[ae]n|wom[ae]n): intermediary news(?:m[ae]n|wom[ae]n): journalist(s) ombuds(?:man|woman): ombuds diff --git a/vale/Google/HeadingPunctuation.yml b/vale/Google/HeadingPunctuation.yml index 7202aa56a..c1729868b 100644 --- a/vale/Google/HeadingPunctuation.yml +++ b/vale/Google/HeadingPunctuation.yml @@ -7,7 +7,7 @@ scope: heading action: name: edit params: - - remove + - trim_right - "." tokens: - '[a-z0-9][.]\s*$' diff --git a/vale/Google/Headings.yml b/vale/Google/Headings.yml index e34d001b7..c8d5be26e 100644 --- a/vale/Google/Headings.yml +++ b/vale/Google/Headings.yml @@ -26,3 +26,4 @@ exceptions: - Visual - VS - Windows + - JSON diff --git a/vale/Google/LyHyphens.yml b/vale/Google/LyHyphens.yml index 5c8193491..50dacb40d 100644 --- a/vale/Google/LyHyphens.yml +++ b/vale/Google/LyHyphens.yml @@ -7,8 +7,8 @@ nonword: true action: name: edit params: - - replace + - regex - "-" - " " tokens: - - '\s[^\s-]+ly-' + - '\b[^\s-]+ly-\w+\b' diff --git a/vale/Google/OptionalPlurals.yml b/vale/Google/OptionalPlurals.yml index 0465e2d8c..4a8767d6f 100644 --- a/vale/Google/OptionalPlurals.yml +++ b/vale/Google/OptionalPlurals.yml @@ -6,7 +6,7 @@ nonword: true action: name: edit params: - - remove + - trim_right - "(s)" tokens: - '\b\w+\(s\)' diff --git a/vale/Google/WordList.yml b/vale/Google/WordList.yml index 0d675f237..b3c6a403c 100644 --- a/vale/Google/WordList.yml +++ b/vale/Google/WordList.yml @@ -38,7 +38,6 @@ swap: cellular network: mobile network chapter: documents|pages|sections check box: checkbox - check: select CLI: command-line tool click on: click|click in Cloud: Google Cloud Platform|GCP diff --git a/vale/Grafana/.vale.ini b/vale/Grafana/.vale.ini new file mode 100644 index 000000000..1a4aa7f6c --- /dev/null +++ b/vale/Grafana/.vale.ini @@ -0,0 +1,5 @@ +Packages = Google, https://github.com/errata-ai/Hugo/releases/download/v0.2.0/Hugo.zip, Readability + +[*] +BasedOnStyles = Grafana +TokenIgnores = (+?), \*\*[^\n]+\*\* diff --git a/vale/Grafana/Acronyms.yml b/vale/Grafana/styles/Grafana/Acronyms.yml similarity index 100% rename from vale/Grafana/Acronyms.yml rename to vale/Grafana/styles/Grafana/Acronyms.yml diff --git a/vale/Grafana/Admin.yml b/vale/Grafana/styles/Grafana/Admin.yml similarity index 100% rename from vale/Grafana/Admin.yml rename to vale/Grafana/styles/Grafana/Admin.yml diff --git a/vale/Grafana/Admonitions.yml b/vale/Grafana/styles/Grafana/Admonitions.yml similarity index 100% rename from vale/Grafana/Admonitions.yml rename to vale/Grafana/styles/Grafana/Admonitions.yml diff --git a/vale/Grafana/Agentless.yml b/vale/Grafana/styles/Grafana/Agentless.yml similarity index 100% rename from vale/Grafana/Agentless.yml rename to vale/Grafana/styles/Grafana/Agentless.yml diff --git a/vale/Grafana/AllowsTo.yml b/vale/Grafana/styles/Grafana/AllowsTo.yml similarity index 100% rename from vale/Grafana/AllowsTo.yml rename to vale/Grafana/styles/Grafana/AllowsTo.yml diff --git a/vale/Grafana/AltText.yml b/vale/Grafana/styles/Grafana/AltText.yml similarity index 100% rename from vale/Grafana/AltText.yml rename to vale/Grafana/styles/Grafana/AltText.yml diff --git a/vale/Grafana/AmazonCloudWatch.yml b/vale/Grafana/styles/Grafana/AmazonCloudWatch.yml similarity index 100% rename from vale/Grafana/AmazonCloudWatch.yml rename to vale/Grafana/styles/Grafana/AmazonCloudWatch.yml diff --git a/vale/Grafana/AmazonProductNames.yml b/vale/Grafana/styles/Grafana/AmazonProductNames.yml similarity index 100% rename from vale/Grafana/AmazonProductNames.yml rename to vale/Grafana/styles/Grafana/AmazonProductNames.yml diff --git a/vale/Grafana/AndOr.yml b/vale/Grafana/styles/Grafana/AndOr.yml similarity index 100% rename from vale/Grafana/AndOr.yml rename to vale/Grafana/styles/Grafana/AndOr.yml diff --git a/vale/Grafana/ApacheProjectNames.yml b/vale/Grafana/styles/Grafana/ApacheProjectNames.yml similarity index 100% rename from vale/Grafana/ApacheProjectNames.yml rename to vale/Grafana/styles/Grafana/ApacheProjectNames.yml diff --git a/vale/Grafana/Archives.yml b/vale/Grafana/styles/Grafana/Archives.yml similarity index 100% rename from vale/Grafana/Archives.yml rename to vale/Grafana/styles/Grafana/Archives.yml diff --git a/vale/Grafana/CHANGELOG.yml b/vale/Grafana/styles/Grafana/CHANGELOG.yml similarity index 100% rename from vale/Grafana/CHANGELOG.yml rename to vale/Grafana/styles/Grafana/CHANGELOG.yml diff --git a/vale/Grafana/CommandLinePrompts.yml b/vale/Grafana/styles/Grafana/CommandLinePrompts.yml similarity index 100% rename from vale/Grafana/CommandLinePrompts.yml rename to vale/Grafana/styles/Grafana/CommandLinePrompts.yml diff --git a/vale/Grafana/DatadogProxy.yml b/vale/Grafana/styles/Grafana/DatadogProxy.yml similarity index 100% rename from vale/Grafana/DatadogProxy.yml rename to vale/Grafana/styles/Grafana/DatadogProxy.yml diff --git a/vale/Grafana/DialogBox.yml b/vale/Grafana/styles/Grafana/DialogBox.yml similarity index 100% rename from vale/Grafana/DialogBox.yml rename to vale/Grafana/styles/Grafana/DialogBox.yml diff --git a/vale/Grafana/DocumentationTeam.yml b/vale/Grafana/styles/Grafana/DocumentationTeam.yml similarity index 100% rename from vale/Grafana/DocumentationTeam.yml rename to vale/Grafana/styles/Grafana/DocumentationTeam.yml diff --git a/vale/Grafana/DropDown.yml b/vale/Grafana/styles/Grafana/DropDown.yml similarity index 100% rename from vale/Grafana/DropDown.yml rename to vale/Grafana/styles/Grafana/DropDown.yml diff --git a/vale/Grafana/EndToEnd.yml b/vale/Grafana/styles/Grafana/EndToEnd.yml similarity index 100% rename from vale/Grafana/EndToEnd.yml rename to vale/Grafana/styles/Grafana/EndToEnd.yml diff --git a/vale/Grafana/Exclamation.yml b/vale/Grafana/styles/Grafana/Exclamation.yml similarity index 100% rename from vale/Grafana/Exclamation.yml rename to vale/Grafana/styles/Grafana/Exclamation.yml diff --git a/vale/Grafana/Gerunds.yml b/vale/Grafana/styles/Grafana/Gerunds.yml similarity index 100% rename from vale/Grafana/Gerunds.yml rename to vale/Grafana/styles/Grafana/Gerunds.yml diff --git a/vale/Grafana/GoogleAMPM.yml b/vale/Grafana/styles/Grafana/GoogleAMPM.yml similarity index 100% rename from vale/Grafana/GoogleAMPM.yml rename to vale/Grafana/styles/Grafana/GoogleAMPM.yml diff --git a/vale/Grafana/GoogleContractions.yml b/vale/Grafana/styles/Grafana/GoogleContractions.yml similarity index 100% rename from vale/Grafana/GoogleContractions.yml rename to vale/Grafana/styles/Grafana/GoogleContractions.yml diff --git a/vale/Grafana/GoogleDateFormat.yml b/vale/Grafana/styles/Grafana/GoogleDateFormat.yml similarity index 100% rename from vale/Grafana/GoogleDateFormat.yml rename to vale/Grafana/styles/Grafana/GoogleDateFormat.yml diff --git a/vale/Grafana/GoogleEllipses.yml b/vale/Grafana/styles/Grafana/GoogleEllipses.yml similarity index 100% rename from vale/Grafana/GoogleEllipses.yml rename to vale/Grafana/styles/Grafana/GoogleEllipses.yml diff --git a/vale/Grafana/GoogleEmDash.yml b/vale/Grafana/styles/Grafana/GoogleEmDash.yml similarity index 100% rename from vale/Grafana/GoogleEmDash.yml rename to vale/Grafana/styles/Grafana/GoogleEmDash.yml diff --git a/vale/Grafana/GoogleEnDash.yml b/vale/Grafana/styles/Grafana/GoogleEnDash.yml similarity index 100% rename from vale/Grafana/GoogleEnDash.yml rename to vale/Grafana/styles/Grafana/GoogleEnDash.yml diff --git a/vale/Grafana/GoogleFirstPerson.yml b/vale/Grafana/styles/Grafana/GoogleFirstPerson.yml similarity index 100% rename from vale/Grafana/GoogleFirstPerson.yml rename to vale/Grafana/styles/Grafana/GoogleFirstPerson.yml diff --git a/vale/Grafana/GoogleGender.yml b/vale/Grafana/styles/Grafana/GoogleGender.yml similarity index 100% rename from vale/Grafana/GoogleGender.yml rename to vale/Grafana/styles/Grafana/GoogleGender.yml diff --git a/vale/Grafana/GoogleGenderBias.yml b/vale/Grafana/styles/Grafana/GoogleGenderBias.yml similarity index 100% rename from vale/Grafana/GoogleGenderBias.yml rename to vale/Grafana/styles/Grafana/GoogleGenderBias.yml diff --git a/vale/Grafana/GoogleHeadingPunctuation.yml b/vale/Grafana/styles/Grafana/GoogleHeadingPunctuation.yml similarity index 100% rename from vale/Grafana/GoogleHeadingPunctuation.yml rename to vale/Grafana/styles/Grafana/GoogleHeadingPunctuation.yml diff --git a/vale/Grafana/GoogleLyHyphens.yml b/vale/Grafana/styles/Grafana/GoogleLyHyphens.yml similarity index 100% rename from vale/Grafana/GoogleLyHyphens.yml rename to vale/Grafana/styles/Grafana/GoogleLyHyphens.yml diff --git a/vale/Grafana/GoogleOptionalPlurals.yml b/vale/Grafana/styles/Grafana/GoogleOptionalPlurals.yml similarity index 100% rename from vale/Grafana/GoogleOptionalPlurals.yml rename to vale/Grafana/styles/Grafana/GoogleOptionalPlurals.yml diff --git a/vale/Grafana/GoogleOxfordComma.yml b/vale/Grafana/styles/Grafana/GoogleOxfordComma.yml similarity index 100% rename from vale/Grafana/GoogleOxfordComma.yml rename to vale/Grafana/styles/Grafana/GoogleOxfordComma.yml diff --git a/vale/Grafana/GooglePassive.yml b/vale/Grafana/styles/Grafana/GooglePassive.yml similarity index 100% rename from vale/Grafana/GooglePassive.yml rename to vale/Grafana/styles/Grafana/GooglePassive.yml diff --git a/vale/Grafana/GooglePeriods.yml b/vale/Grafana/styles/Grafana/GooglePeriods.yml similarity index 100% rename from vale/Grafana/GooglePeriods.yml rename to vale/Grafana/styles/Grafana/GooglePeriods.yml diff --git a/vale/Grafana/GoogleProductNames.yml b/vale/Grafana/styles/Grafana/GoogleProductNames.yml similarity index 100% rename from vale/Grafana/GoogleProductNames.yml rename to vale/Grafana/styles/Grafana/GoogleProductNames.yml diff --git a/vale/Grafana/GoogleRanges.yml b/vale/Grafana/styles/Grafana/GoogleRanges.yml similarity index 100% rename from vale/Grafana/GoogleRanges.yml rename to vale/Grafana/styles/Grafana/GoogleRanges.yml diff --git a/vale/Grafana/GoogleSemicolons.yml b/vale/Grafana/styles/Grafana/GoogleSemicolons.yml similarity index 100% rename from vale/Grafana/GoogleSemicolons.yml rename to vale/Grafana/styles/Grafana/GoogleSemicolons.yml diff --git a/vale/Grafana/GoogleSlang.yml b/vale/Grafana/styles/Grafana/GoogleSlang.yml similarity index 100% rename from vale/Grafana/GoogleSlang.yml rename to vale/Grafana/styles/Grafana/GoogleSlang.yml diff --git a/vale/Grafana/GoogleSpacing.yml b/vale/Grafana/styles/Grafana/GoogleSpacing.yml similarity index 100% rename from vale/Grafana/GoogleSpacing.yml rename to vale/Grafana/styles/Grafana/GoogleSpacing.yml diff --git a/vale/Grafana/GoogleSpelling.yml b/vale/Grafana/styles/Grafana/GoogleSpelling.yml similarity index 100% rename from vale/Grafana/GoogleSpelling.yml rename to vale/Grafana/styles/Grafana/GoogleSpelling.yml diff --git a/vale/Grafana/GoogleWill.yml b/vale/Grafana/styles/Grafana/GoogleWill.yml similarity index 100% rename from vale/Grafana/GoogleWill.yml rename to vale/Grafana/styles/Grafana/GoogleWill.yml diff --git a/vale/Grafana/Headings.yml b/vale/Grafana/styles/Grafana/Headings.yml similarity index 97% rename from vale/Grafana/Headings.yml rename to vale/Grafana/styles/Grafana/Headings.yml index c1a69927d..f1466244e 100644 --- a/vale/Grafana/Headings.yml +++ b/vale/Grafana/styles/Grafana/Headings.yml @@ -280,7 +280,7 @@ "message": | Use sentence-style capitalization for '%s'. - If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/Headings.yml for them to be considered correctly cased. + If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/styles/GrafanaHeadings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. "scope": "heading" diff --git a/vale/Grafana/Kubernetes.yml b/vale/Grafana/styles/Grafana/Kubernetes.yml similarity index 100% rename from vale/Grafana/Kubernetes.yml rename to vale/Grafana/styles/Grafana/Kubernetes.yml diff --git a/vale/Grafana/Latin.yml b/vale/Grafana/styles/Grafana/Latin.yml similarity index 100% rename from vale/Grafana/Latin.yml rename to vale/Grafana/styles/Grafana/Latin.yml diff --git a/vale/Grafana/MetaMonitoring.yml b/vale/Grafana/styles/Grafana/MetaMonitoring.yml similarity index 100% rename from vale/Grafana/MetaMonitoring.yml rename to vale/Grafana/styles/Grafana/MetaMonitoring.yml diff --git a/vale/Grafana/OAuth.yml b/vale/Grafana/styles/Grafana/OAuth.yml similarity index 100% rename from vale/Grafana/OAuth.yml rename to vale/Grafana/styles/Grafana/OAuth.yml diff --git a/vale/Grafana/OK.yml b/vale/Grafana/styles/Grafana/OK.yml similarity index 100% rename from vale/Grafana/OK.yml rename to vale/Grafana/styles/Grafana/OK.yml diff --git a/vale/Grafana/Ordinal.yml b/vale/Grafana/styles/Grafana/Ordinal.yml similarity index 100% rename from vale/Grafana/Ordinal.yml rename to vale/Grafana/styles/Grafana/Ordinal.yml diff --git a/vale/Grafana/Parentheses.yml b/vale/Grafana/styles/Grafana/Parentheses.yml similarity index 100% rename from vale/Grafana/Parentheses.yml rename to vale/Grafana/styles/Grafana/Parentheses.yml diff --git a/vale/Grafana/Please.yml b/vale/Grafana/styles/Grafana/Please.yml similarity index 100% rename from vale/Grafana/Please.yml rename to vale/Grafana/styles/Grafana/Please.yml diff --git a/vale/Grafana/ProductPossessives.yml b/vale/Grafana/styles/Grafana/ProductPossessives.yml similarity index 100% rename from vale/Grafana/ProductPossessives.yml rename to vale/Grafana/styles/Grafana/ProductPossessives.yml diff --git a/vale/Grafana/PrometheusExporters.yml b/vale/Grafana/styles/Grafana/PrometheusExporters.yml similarity index 100% rename from vale/Grafana/PrometheusExporters.yml rename to vale/Grafana/styles/Grafana/PrometheusExporters.yml diff --git a/vale/Grafana/Quickstart.yml b/vale/Grafana/styles/Grafana/Quickstart.yml similarity index 100% rename from vale/Grafana/Quickstart.yml rename to vale/Grafana/styles/Grafana/Quickstart.yml diff --git a/vale/Grafana/README.yml b/vale/Grafana/styles/Grafana/README.yml similarity index 100% rename from vale/Grafana/README.yml rename to vale/Grafana/styles/Grafana/README.yml diff --git a/vale/Grafana/React.yml b/vale/Grafana/styles/Grafana/React.yml similarity index 100% rename from vale/Grafana/React.yml rename to vale/Grafana/styles/Grafana/React.yml diff --git a/vale/Grafana/ReadabilityAutomatedReadability.yml b/vale/Grafana/styles/Grafana/ReadabilityAutomatedReadability.yml similarity index 100% rename from vale/Grafana/ReadabilityAutomatedReadability.yml rename to vale/Grafana/styles/Grafana/ReadabilityAutomatedReadability.yml diff --git a/vale/Grafana/ReadabilityColemanLiau.yml b/vale/Grafana/styles/Grafana/ReadabilityColemanLiau.yml similarity index 100% rename from vale/Grafana/ReadabilityColemanLiau.yml rename to vale/Grafana/styles/Grafana/ReadabilityColemanLiau.yml diff --git a/vale/Grafana/ReadabilityFleschKincaid.yml b/vale/Grafana/styles/Grafana/ReadabilityFleschKincaid.yml similarity index 100% rename from vale/Grafana/ReadabilityFleschKincaid.yml rename to vale/Grafana/styles/Grafana/ReadabilityFleschKincaid.yml diff --git a/vale/Grafana/ReadabilityFleschReadingEase.yml b/vale/Grafana/styles/Grafana/ReadabilityFleschReadingEase.yml similarity index 100% rename from vale/Grafana/ReadabilityFleschReadingEase.yml rename to vale/Grafana/styles/Grafana/ReadabilityFleschReadingEase.yml diff --git a/vale/Grafana/ReadabilityGunningFog.yml b/vale/Grafana/styles/Grafana/ReadabilityGunningFog.yml similarity index 100% rename from vale/Grafana/ReadabilityGunningFog.yml rename to vale/Grafana/styles/Grafana/ReadabilityGunningFog.yml diff --git a/vale/Grafana/ReadabilityLIX.yml b/vale/Grafana/styles/Grafana/ReadabilityLIX.yml similarity index 100% rename from vale/Grafana/ReadabilityLIX.yml rename to vale/Grafana/styles/Grafana/ReadabilityLIX.yml diff --git a/vale/Grafana/ReadabilitySMOG.yml b/vale/Grafana/styles/Grafana/ReadabilitySMOG.yml similarity index 100% rename from vale/Grafana/ReadabilitySMOG.yml rename to vale/Grafana/styles/Grafana/ReadabilitySMOG.yml diff --git a/vale/Grafana/ReferTo.yml b/vale/Grafana/styles/Grafana/ReferTo.yml similarity index 100% rename from vale/Grafana/ReferTo.yml rename to vale/Grafana/styles/Grafana/ReferTo.yml diff --git a/vale/Grafana/RepeatedWords.yml b/vale/Grafana/styles/Grafana/RepeatedWords.yml similarity index 100% rename from vale/Grafana/RepeatedWords.yml rename to vale/Grafana/styles/Grafana/RepeatedWords.yml diff --git a/vale/Grafana/SQL.yml b/vale/Grafana/styles/Grafana/SQL.yml similarity index 100% rename from vale/Grafana/SQL.yml rename to vale/Grafana/styles/Grafana/SQL.yml diff --git a/vale/Grafana/SelfManaged.yml b/vale/Grafana/styles/Grafana/SelfManaged.yml similarity index 100% rename from vale/Grafana/SelfManaged.yml rename to vale/Grafana/styles/Grafana/SelfManaged.yml diff --git a/vale/Grafana/Shortcodes.yml b/vale/Grafana/styles/Grafana/Shortcodes.yml similarity index 100% rename from vale/Grafana/Shortcodes.yml rename to vale/Grafana/styles/Grafana/Shortcodes.yml diff --git a/vale/Grafana/SmartQuotes.yml b/vale/Grafana/styles/Grafana/SmartQuotes.yml similarity index 100% rename from vale/Grafana/SmartQuotes.yml rename to vale/Grafana/styles/Grafana/SmartQuotes.yml diff --git a/vale/Grafana/Spelling.yml b/vale/Grafana/styles/Grafana/Spelling.yml similarity index 97% rename from vale/Grafana/Spelling.yml rename to vale/Grafana/styles/Grafana/Spelling.yml index f5c6f7e52..2ca3387d8 100644 --- a/vale/Grafana/Spelling.yml +++ b/vale/Grafana/styles/Grafana/Spelling.yml @@ -14,7 +14,7 @@ message: | The spell checker doesn't check words with code formatting. level: error append: true -dicpath: dictionaries +dicpath: config/dictionaries dictionaries: - en_US-grafana - en_US-places diff --git a/vale/Grafana/Timeless.yml b/vale/Grafana/styles/Grafana/Timeless.yml similarity index 100% rename from vale/Grafana/Timeless.yml rename to vale/Grafana/styles/Grafana/Timeless.yml diff --git a/vale/Grafana/We.yml b/vale/Grafana/styles/Grafana/We.yml similarity index 100% rename from vale/Grafana/We.yml rename to vale/Grafana/styles/Grafana/We.yml diff --git a/vale/Grafana/Wish.yml b/vale/Grafana/styles/Grafana/Wish.yml similarity index 100% rename from vale/Grafana/Wish.yml rename to vale/Grafana/styles/Grafana/Wish.yml diff --git a/vale/Grafana/WordList.yml b/vale/Grafana/styles/Grafana/WordList.yml similarity index 100% rename from vale/Grafana/WordList.yml rename to vale/Grafana/styles/Grafana/WordList.yml diff --git a/vale/dictionaries/Makefile b/vale/Grafana/styles/config/dictionaries/Makefile similarity index 100% rename from vale/dictionaries/Makefile rename to vale/Grafana/styles/config/dictionaries/Makefile diff --git a/vale/dictionaries/en_US-grafana.aff b/vale/Grafana/styles/config/dictionaries/en_US-grafana.aff similarity index 100% rename from vale/dictionaries/en_US-grafana.aff rename to vale/Grafana/styles/config/dictionaries/en_US-grafana.aff diff --git a/vale/dictionaries/en_US-grafana.dic b/vale/Grafana/styles/config/dictionaries/en_US-grafana.dic similarity index 100% rename from vale/dictionaries/en_US-grafana.dic rename to vale/Grafana/styles/config/dictionaries/en_US-grafana.dic diff --git a/vale/dictionaries/en_US-grafana.jsonnet b/vale/Grafana/styles/config/dictionaries/en_US-grafana.jsonnet similarity index 100% rename from vale/dictionaries/en_US-grafana.jsonnet rename to vale/Grafana/styles/config/dictionaries/en_US-grafana.jsonnet diff --git a/vale/dictionaries/en_US-places.aff b/vale/Grafana/styles/config/dictionaries/en_US-places.aff similarity index 100% rename from vale/dictionaries/en_US-places.aff rename to vale/Grafana/styles/config/dictionaries/en_US-places.aff diff --git a/vale/dictionaries/en_US-places.dic b/vale/Grafana/styles/config/dictionaries/en_US-places.dic similarity index 100% rename from vale/dictionaries/en_US-places.dic rename to vale/Grafana/styles/config/dictionaries/en_US-places.dic diff --git a/vale/dictionaries/en_US-places.wordlist b/vale/Grafana/styles/config/dictionaries/en_US-places.wordlist similarity index 100% rename from vale/dictionaries/en_US-places.wordlist rename to vale/Grafana/styles/config/dictionaries/en_US-places.wordlist diff --git a/vale/config/scripts/SmartQuotes.tengo b/vale/Grafana/styles/config/scripts/SmartQuotes.tengo similarity index 100% rename from vale/config/scripts/SmartQuotes.tengo rename to vale/Grafana/styles/config/scripts/SmartQuotes.tengo diff --git a/vale/config/scripts/SmartQuotes_test.go b/vale/Grafana/styles/config/scripts/SmartQuotes_test.go similarity index 100% rename from vale/config/scripts/SmartQuotes_test.go rename to vale/Grafana/styles/config/scripts/SmartQuotes_test.go diff --git a/vale/config/scripts/go.mod b/vale/Grafana/styles/config/scripts/go.mod similarity index 100% rename from vale/config/scripts/go.mod rename to vale/Grafana/styles/config/scripts/go.mod diff --git a/vale/config/scripts/go.sum b/vale/Grafana/styles/config/scripts/go.sum similarity index 100% rename from vale/config/scripts/go.sum rename to vale/Grafana/styles/config/scripts/go.sum diff --git a/vale/config/vocabularies/accept.txt b/vale/Grafana/styles/config/vocabularies/Grafana/accept.txt similarity index 100% rename from vale/config/vocabularies/accept.txt rename to vale/Grafana/styles/config/vocabularies/Grafana/accept.txt diff --git a/vale/Headings.jsonnet b/vale/Headings.jsonnet index d2d5b594e..9aa1272f7 100644 --- a/vale/Headings.jsonnet +++ b/vale/Headings.jsonnet @@ -1,7 +1,7 @@ local defs = (import './dictionary.libsonnet').words; std.manifestYamlDoc({ extends: 'capitalization', - message: "Use sentence-style capitalization for '%s'.\n\nIf your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/Headings.yml for them to be considered correctly cased.\n\nVale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word.\n", + message: "Use sentence-style capitalization for '%s'.\n\nIf your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/styles/GrafanaHeadings.yml for them to be considered correctly cased.\n\nVale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word.\n", link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings', level: 'warning', scope: 'heading', diff --git a/vale/Makefile b/vale/Makefile index e07cc2e1a..686bf123e 100644 --- a/vale/Makefile +++ b/vale/Makefile @@ -14,23 +14,23 @@ help: PODMAN := $(shell if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi) GIT_ROOT := $(shell git rev-parse --show-toplevel) -DICTIONARIES := dictionaries/en_US-grafana.dic +DICTIONARIES := Grafana/styles/config/dictionaries/en_US-grafana.dic TESTS := fixtures/Grafana -STYLES := Grafana/Google Grafana/Readability -RULES := Grafana/Acronyms.yml Grafana/AmazonProductNames.yml Grafana/ApacheProjectNames.yml Grafana/GoogleProductNames.yml Grafana/Headings.yml Grafana/ProductPossessives.yml Grafana/WordList.yml +STYLES := Grafana/styles/Grafana/GrafanaGoogle Grafana/styles/Grafana/Readability +RULES := Grafana/styles/Grafana/Acronyms.yml Grafana/styles/Grafana/AmazonProductNames.yml Grafana/styles/Grafana/ApacheProjectNames.yml Grafana/styles/Grafana/GoogleProductNames.yml Grafana/styles/Grafana/Headings.yml Grafana/styles/Grafana/ProductPossessives.yml Grafana/styles/Grafana/WordList.yml DOCUMENTATION := ../docs/sources/review/lint-prose/rules.md all: $(DICTIONARIES) $(DOCUMENTATION) $(RULES) $(STYLES) $(TESTS) ## Build all the Grafana Vale rules and styles. -$(DOCUMENTATION): $(wildcard Grafana/*) $(wildcard ../tools/cmd/generate-documentation/*) +$(DOCUMENTATION): $(wildcard Grafana/styles/Grafana/*) $(wildcard ../tools/cmd/generate-documentation/*) cd ../tools/ && go run ./cmd/generate-documentation ../ tools/cmd/generate-documentation vale/Grafana docs/sources/review/lint-prose/rules.md prettier -w $(DOCUMENTATION) -dictionaries/en_US-grafana.%: dictionary.libsonnet +Grafana/styles/config/dictionaries/en_US-grafana.%: dictionary.libsonnet $(MAKE) -C $(@D) $(@F) .PHONY: grafana/vale grafana/vale: ## Builds a container image for Vale with the Grafana style loaded. -grafana/vale: dictionaries/en_US-grafana.aff dictionaries/en_US-grafana.dic Grafana/Google .vale.ini +grafana/vale: Grafana/styles/config/dictionaries/en_US-grafana.aff Grafana/styles/config/dictionaries/en_US-grafana.dic Grafana/styles/Grafana/GrafanaGoogle .vale.ini $(PODMAN) build \ --platform linux/x86_64,linux/arm64 \ --progress plain \ @@ -40,7 +40,7 @@ grafana/vale: dictionaries/en_US-grafana.aff dictionaries/en_US-grafana.dic Graf .PHONY: grafana/vale/push grafana/vale/push: ## Builds and pushes container image for Vale with the Grafana style loaded. -grafana/vale/push: dictionaries/en_US-grafana.aff dictionaries/en_US-grafana.dic Grafana/Google .vale.ini +grafana/vale/push: dictionaries/en_US-grafana.aff dictionaries/en_US-grafana.dic Grafana/styles/Grafana/Google .vale.ini $(PODMAN) build \ --platform linux/x86_64,linux/arm64 \ --progress plain \ @@ -60,21 +60,21 @@ sync: jsonnet -Se "(import '.vale.jsonnet').container" | sed '$${/^$$/d;}' > .vale.ini jsonnet -Se "(import '.vale.jsonnet').repository" | sed '$${/^$$/d;}' > ../.vale.ini -.PHONY: Grafana/Google -Grafana/Google: ## Generate the Grafana style from the Google style. -Grafana/Google: google.jsonnet +.PHONY: Grafana/styles/Grafana/GrafanaGoogle +Grafana/styles/Grafana/GrafanaGoogle: ## Generate the Grafana style from the Google style. +Grafana/styles/Grafana/GrafanaGoogle: google.jsonnet rm -f "$$(jsonnet -Se 'std.join(" ", std.objectFields(import "google.jsonnet"))')" jsonnet -S -m . google.jsonnet prettier -w $@*.yml -Grafana/%.yml: ## Generate Grafana style rules from the corresponding Jsonnet file. -Grafana/%.yml: %.jsonnet +Grafana/styles/Grafana/%.yml: ## Generate Grafana style rules from the corresponding Jsonnet file. +Grafana/styles/Grafana/%.yml: %.jsonnet jsonnet -S $< > $@ prettier -w $@ -.PHONY: Grafana/Readability -Grafana/Readability: ## Generate the Grafana style from the Readability style. -Grafana/Readability: readability.jsonnet +.PHONY: Grafana/styles/Grafana/Readability +Grafana/styles/Grafana/Readability: ## Generate the Grafana style from the Readability style. +Grafana/styles/Grafana/Readability: readability.jsonnet rm -f $@*.yml jsonnet -S -m . readability.jsonnet prettier -w $@*.yml @@ -82,10 +82,16 @@ Grafana/Readability: readability.jsonnet fixtures/Grafana/%: ## Generate the scaffolding to test a new Grafana Vale rule. fixtures/Grafana/%: mkdir -p $@ - printf 'StylesPath = ../../../\nMinAlertLevel = suggestion\n[*.md]\nGrafana.%s = YES\n' $(@F) > $@/.vale.ini + printf 'MinAlertLevel = suggestion\n[*.md]\nGrafana.%s = YES\n' $(@F) > $@/.vale.ini touch $@/test{,in}valid.{golden,md} .PHONY: fixtures/Grafana fixtures/Grafana: ## Recreate the golden files for all the Grafana Vale rule fixtures. fixtures/Grafana: find $@ -maxdepth 1 -mindepth 1 -print -exec /bin/bash -c 'cd {}; vale --output=line testvalid.md > testvalid.golden; vale --output=line testinvalid.md > testinvalid.golden; cd -' \; + +.PHONY: Grafana.zip +Grafana.zip: ## Create an archive of the Grafana Vale style. +Grafana.zip: + rm -f $@ + zip -r Grafana.zip Grafana diff --git a/vale/fixtures/Grafana/Admin/.vale.ini b/vale/fixtures/Grafana/Admin/.vale.ini index 0f3911e44..fbf4aa22a 100644 --- a/vale/fixtures/Grafana/Admin/.vale.ini +++ b/vale/fixtures/Grafana/Admin/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Admin = YES diff --git a/vale/fixtures/Grafana/Admonitions/.vale.ini b/vale/fixtures/Grafana/Admonitions/.vale.ini index 8350934ae..6e22f6a22 100644 --- a/vale/fixtures/Grafana/Admonitions/.vale.ini +++ b/vale/fixtures/Grafana/Admonitions/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Admonitions = YES diff --git a/vale/fixtures/Grafana/Agentless/.vale.ini b/vale/fixtures/Grafana/Agentless/.vale.ini index bfa7ee976..90585a589 100644 --- a/vale/fixtures/Grafana/Agentless/.vale.ini +++ b/vale/fixtures/Grafana/Agentless/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Agentless = YES diff --git a/vale/fixtures/Grafana/AltText/.vale.ini b/vale/fixtures/Grafana/AltText/.vale.ini index 21fc4f11a..2895d13f3 100644 --- a/vale/fixtures/Grafana/AltText/.vale.ini +++ b/vale/fixtures/Grafana/AltText/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.AltText = YES diff --git a/vale/fixtures/Grafana/AmazonCloudWatch/.vale.ini b/vale/fixtures/Grafana/AmazonCloudWatch/.vale.ini index e2e8ea5c6..e3e157da8 100644 --- a/vale/fixtures/Grafana/AmazonCloudWatch/.vale.ini +++ b/vale/fixtures/Grafana/AmazonCloudWatch/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.AmazonCloudWatch = YES diff --git a/vale/fixtures/Grafana/AndOr/.vale.ini b/vale/fixtures/Grafana/AndOr/.vale.ini index 87758918b..5b81b3a41 100644 --- a/vale/fixtures/Grafana/AndOr/.vale.ini +++ b/vale/fixtures/Grafana/AndOr/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.AndOr = YES diff --git a/vale/fixtures/Grafana/ApacheProjectNames/.vale.ini b/vale/fixtures/Grafana/ApacheProjectNames/.vale.ini index c9d4f02c3..12162f60b 100644 --- a/vale/fixtures/Grafana/ApacheProjectNames/.vale.ini +++ b/vale/fixtures/Grafana/ApacheProjectNames/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.ApacheProjectNames = YES diff --git a/vale/fixtures/Grafana/Archives/.vale.ini b/vale/fixtures/Grafana/Archives/.vale.ini index 331509478..af8cf3e2d 100644 --- a/vale/fixtures/Grafana/Archives/.vale.ini +++ b/vale/fixtures/Grafana/Archives/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Archives = YES \ No newline at end of file diff --git a/vale/fixtures/Grafana/CommandLinePrompts/.vale.ini b/vale/fixtures/Grafana/CommandLinePrompts/.vale.ini index bd1ac498b..e38b9ee9c 100644 --- a/vale/fixtures/Grafana/CommandLinePrompts/.vale.ini +++ b/vale/fixtures/Grafana/CommandLinePrompts/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.CommandLinePrompts = YES diff --git a/vale/fixtures/Grafana/DatadogProxy/.vale.ini b/vale/fixtures/Grafana/DatadogProxy/.vale.ini index 2cfa4ef3f..963de6b9b 100644 --- a/vale/fixtures/Grafana/DatadogProxy/.vale.ini +++ b/vale/fixtures/Grafana/DatadogProxy/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.DatadogProxy = YES diff --git a/vale/fixtures/Grafana/DocumentationTeam/.vale.ini b/vale/fixtures/Grafana/DocumentationTeam/.vale.ini index b765e32b2..85a60c7c8 100644 --- a/vale/fixtures/Grafana/DocumentationTeam/.vale.ini +++ b/vale/fixtures/Grafana/DocumentationTeam/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.DocumentationTeam = YES diff --git a/vale/fixtures/Grafana/DropDown/.vale.ini b/vale/fixtures/Grafana/DropDown/.vale.ini index 568a983dd..3ffb58256 100644 --- a/vale/fixtures/Grafana/DropDown/.vale.ini +++ b/vale/fixtures/Grafana/DropDown/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.DropDown = YES diff --git a/vale/fixtures/Grafana/Gerunds/.vale.ini b/vale/fixtures/Grafana/Gerunds/.vale.ini index d00a285fe..9121e4143 100644 --- a/vale/fixtures/Grafana/Gerunds/.vale.ini +++ b/vale/fixtures/Grafana/Gerunds/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Gerunds = YES diff --git a/vale/fixtures/Grafana/HTTP/.vale.ini b/vale/fixtures/Grafana/HTTP/.vale.ini index f290c274d..2fa475bab 100644 --- a/vale/fixtures/Grafana/HTTP/.vale.ini +++ b/vale/fixtures/Grafana/HTTP/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.HTTP = YES diff --git a/vale/fixtures/Grafana/Headings/.vale.ini b/vale/fixtures/Grafana/Headings/.vale.ini index 5add7b0f7..3a1fcd052 100644 --- a/vale/fixtures/Grafana/Headings/.vale.ini +++ b/vale/fixtures/Grafana/Headings/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Headings = YES diff --git a/vale/fixtures/Grafana/Headings/testinvalid.golden b/vale/fixtures/Grafana/Headings/testinvalid.golden index 57cbec94d..0bbece23a 100644 --- a/vale/fixtures/Grafana/Headings/testinvalid.golden +++ b/vale/fixtures/Grafana/Headings/testinvalid.golden @@ -1,6 +1,6 @@ -testinvalid.md:8:5:Grafana.Headings:Use sentence-style capitalization for 'One Two Three Four'. If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/Headings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. -testinvalid.md:14:5:Grafana.Headings:Use sentence-style capitalization for 'One two Three Four Five Six Seven Eight Nine Ten'. If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/Headings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. -testinvalid.md:20:5:Grafana.Headings:Use sentence-style capitalization for 'One two three Four Five Six Seven Eight Nine Ten Eleven'. If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/Headings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. -testinvalid.md:26:5:Grafana.Headings:Use sentence-style capitalization for 'One two three four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen'. If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/Headings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. -testinvalid.md:32:5:Grafana.Headings:Use sentence-style capitalization for 'One two three four five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen Fifteen Sixteen Seventeen'. If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/Headings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. -testinvalid.md:44:5:Grafana.Headings:Use sentence-style capitalization for 'Grafana Enterprise Metrics Four Five Six'. If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/Headings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. +testinvalid.md:8:5:Grafana.Headings:Use sentence-style capitalization for 'One Two Three Four'. If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/styles/GrafanaHeadings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. +testinvalid.md:14:5:Grafana.Headings:Use sentence-style capitalization for 'One two Three Four Five Six Seven Eight Nine Ten'. If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/styles/GrafanaHeadings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. +testinvalid.md:20:5:Grafana.Headings:Use sentence-style capitalization for 'One two three Four Five Six Seven Eight Nine Ten Eleven'. If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/styles/GrafanaHeadings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. +testinvalid.md:26:5:Grafana.Headings:Use sentence-style capitalization for 'One two three four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen'. If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/styles/GrafanaHeadings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. +testinvalid.md:32:5:Grafana.Headings:Use sentence-style capitalization for 'One two three four five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen Fifteen Sixteen Seventeen'. If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/styles/GrafanaHeadings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. +testinvalid.md:44:5:Grafana.Headings:Use sentence-style capitalization for 'Grafana Enterprise Metrics Four Five Six'. If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/styles/GrafanaHeadings.yml for them to be considered correctly cased. Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. diff --git a/vale/fixtures/Grafana/Kubernetes/.vale.ini b/vale/fixtures/Grafana/Kubernetes/.vale.ini index e78154301..fb21bb70c 100644 --- a/vale/fixtures/Grafana/Kubernetes/.vale.ini +++ b/vale/fixtures/Grafana/Kubernetes/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Kubernetes = YES diff --git a/vale/fixtures/Grafana/Latin/.vale.ini b/vale/fixtures/Grafana/Latin/.vale.ini index dfc725efb..1d6eb176e 100644 --- a/vale/fixtures/Grafana/Latin/.vale.ini +++ b/vale/fixtures/Grafana/Latin/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Latin = YES diff --git a/vale/fixtures/Grafana/OAuth/.vale.ini b/vale/fixtures/Grafana/OAuth/.vale.ini index 0a7476acd..b4611ccb6 100644 --- a/vale/fixtures/Grafana/OAuth/.vale.ini +++ b/vale/fixtures/Grafana/OAuth/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.OAuth = YES diff --git a/vale/fixtures/Grafana/OK/.vale.ini b/vale/fixtures/Grafana/OK/.vale.ini index 40a37b7b3..ab4566ef3 100644 --- a/vale/fixtures/Grafana/OK/.vale.ini +++ b/vale/fixtures/Grafana/OK/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.OK = YES diff --git a/vale/fixtures/Grafana/Ordinal/.vale.ini b/vale/fixtures/Grafana/Ordinal/.vale.ini index 5e743ef0a..3ef8c28cc 100644 --- a/vale/fixtures/Grafana/Ordinal/.vale.ini +++ b/vale/fixtures/Grafana/Ordinal/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Ordinal = YES diff --git a/vale/fixtures/Grafana/ProductPossessives/.vale.ini b/vale/fixtures/Grafana/ProductPossessives/.vale.ini index ac775d6ea..4ab296854 100644 --- a/vale/fixtures/Grafana/ProductPossessives/.vale.ini +++ b/vale/fixtures/Grafana/ProductPossessives/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.ProductPossessives = YES diff --git a/vale/fixtures/Grafana/PrometheusExporters/.vale.ini b/vale/fixtures/Grafana/PrometheusExporters/.vale.ini index c39b4d518..6ca3ff2a9 100644 --- a/vale/fixtures/Grafana/PrometheusExporters/.vale.ini +++ b/vale/fixtures/Grafana/PrometheusExporters/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.PrometheusExporters = YES diff --git a/vale/fixtures/Grafana/Quickstart/.vale.ini b/vale/fixtures/Grafana/Quickstart/.vale.ini index a5e2c7946..52a54122a 100644 --- a/vale/fixtures/Grafana/Quickstart/.vale.ini +++ b/vale/fixtures/Grafana/Quickstart/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Quickstart = YES diff --git a/vale/fixtures/Grafana/React/.vale.ini b/vale/fixtures/Grafana/React/.vale.ini index 880143b66..7a08bf68d 100644 --- a/vale/fixtures/Grafana/React/.vale.ini +++ b/vale/fixtures/Grafana/React/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.React = YES \ No newline at end of file diff --git a/vale/fixtures/Grafana/ReferTo/.vale.ini b/vale/fixtures/Grafana/ReferTo/.vale.ini index 1ec1a5835..72aa3a193 100644 --- a/vale/fixtures/Grafana/ReferTo/.vale.ini +++ b/vale/fixtures/Grafana/ReferTo/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.ReferTo = YES \ No newline at end of file diff --git a/vale/fixtures/Grafana/RepeatedWords/.vale.ini b/vale/fixtures/Grafana/RepeatedWords/.vale.ini index d24adfa47..ffdce09bf 100644 --- a/vale/fixtures/Grafana/RepeatedWords/.vale.ini +++ b/vale/fixtures/Grafana/RepeatedWords/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.RepeatedWords = YES diff --git a/vale/fixtures/Grafana/SQL/.vale.ini b/vale/fixtures/Grafana/SQL/.vale.ini index 586965c41..ba9b4c275 100644 --- a/vale/fixtures/Grafana/SQL/.vale.ini +++ b/vale/fixtures/Grafana/SQL/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.SQL = YES diff --git a/vale/fixtures/Grafana/Shortcodes/.vale.ini b/vale/fixtures/Grafana/Shortcodes/.vale.ini index d4acd85ec..76339f332 100644 --- a/vale/fixtures/Grafana/Shortcodes/.vale.ini +++ b/vale/fixtures/Grafana/Shortcodes/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Shortcodes = YES diff --git a/vale/fixtures/Grafana/SmartQuotes/.vale.ini b/vale/fixtures/Grafana/SmartQuotes/.vale.ini index a64e1f11f..70fdd2c5c 100644 --- a/vale/fixtures/Grafana/SmartQuotes/.vale.ini +++ b/vale/fixtures/Grafana/SmartQuotes/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.SmartQuotes = YES diff --git a/vale/fixtures/Grafana/Wish/.vale.ini b/vale/fixtures/Grafana/Wish/.vale.ini index aae49088f..d1d317b4d 100644 --- a/vale/fixtures/Grafana/Wish/.vale.ini +++ b/vale/fixtures/Grafana/Wish/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Wish = YES \ No newline at end of file diff --git a/vale/fixtures/Grafana/Wordlist/.vale.ini b/vale/fixtures/Grafana/Wordlist/.vale.ini index 489d5e130..fb814f754 100644 --- a/vale/fixtures/Grafana/Wordlist/.vale.ini +++ b/vale/fixtures/Grafana/Wordlist/.vale.ini @@ -1,4 +1,3 @@ -StylesPath = ../../../ MinAlertLevel = suggestion [*.md] Grafana.Wordlist = YES diff --git a/vale/google.jsonnet b/vale/google.jsonnet index eca07aa63..6281d0ebd 100644 --- a/vale/google.jsonnet +++ b/vale/google.jsonnet @@ -1,49 +1,47 @@ std.prune({ - 'Grafana/GoogleAMPM.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/AMPM.yml')), - // Replaced by Grafana/Acronyms.yml. - 'Grafana/GoogleAcronyms.yml': null, + 'Grafana/styles/Grafana/GrafanaGoogleAMPM.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/AMPM.yml')), + // Replaced by Grafana/styles/GrafanaAcronyms.yml. + 'Grafana/styles/Grafana/GrafanaGoogleAcronyms.yml': null, // Not sure that this is that useful. - 'Grafana/GoogleColons.yml': null, - 'Grafana/GoogleContractions.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Contractions.yml')), - 'Grafana/GoogleDateFormat.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/DateFormat.yml')), - 'Grafana/GoogleEllipses.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Ellipses.yml')), - 'Grafana/GoogleEmDash.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/EmDash.yml')), - 'Grafana/GoogleEnDash.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/EnDash.yml')), - // Replaced by Grafana/Exclamation.yml. - 'Grafana/GoogleExclamation.yml': null, - 'Grafana/GoogleFirstPerson.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/FirstPerson.yml')), - 'Grafana/GoogleGender.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Gender.yml')), - 'Grafana/GoogleGenderBias.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/GenderBias.yml')), - 'Grafana/GoogleHeadingPunctuation.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/HeadingPunctuation.yml')), - // Replaced by Grafana/Headings.yml. - 'Grafana/GoogleHeadings.yml': null, - // Replaced by Grafana/Latin.yml. - 'Grafana/GoogleLatin.yml': null, - 'Grafana/GoogleLyHyphens.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/LyHyphens.yml')), - 'Grafana/GoogleOptionalPlurals.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/OptionalPlurals.yml')), - // Replaced by Grafana/Ordinal.yml. - 'Grafana/GoogleOrdinal.yml': null, - 'Grafana/GoogleOxfordComma.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/OxfordComma.yml') { level: 'suggestion' }), - // Replaced by Grafana/Parentheses.yml. - 'Grafana/GoogleParens.yml': null, - 'Grafana/GooglePassive.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Passive.yml')), - 'Grafana/GooglePeriods.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Periods.yml')), + 'Grafana/styles/Grafana/GrafanaGoogleColons.yml': null, + 'Grafana/styles/Grafana/GrafanaGoogleContractions.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Contractions.yml')), + 'Grafana/styles/Grafana/GrafanaGoogleDateFormat.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/DateFormat.yml')), + 'Grafana/styles/Grafana/GrafanaGoogleEllipses.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Ellipses.yml')), + // Replaced by Grafana/styles/GrafanaExclamation.yml. + 'Grafana/styles/Grafana/GrafanaGoogleExclamation.yml': null, + 'Grafana/styles/Grafana/GrafanaGoogleFirstPerson.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/FirstPerson.yml')), + 'Grafana/styles/Grafana/GrafanaGoogleGender.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Gender.yml')), + 'Grafana/styles/Grafana/GrafanaGoogleGenderBias.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/GenderBias.yml')), + 'Grafana/styles/Grafana/GrafanaGoogleHeadingPunctuation.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/HeadingPunctuation.yml')), + // Replaced by Grafana/styles/GrafanaHeadings.yml. + 'Grafana/styles/Grafana/GrafanaGoogleHeadings.yml': null, + // Replaced by Grafana/styles/GrafanaLatin.yml. + 'Grafana/styles/Grafana/GrafanaGoogleLatin.yml': null, + 'Grafana/styles/Grafana/GrafanaGoogleLyHyphens.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/LyHyphens.yml')), + 'Grafana/styles/Grafana/GrafanaGoogleOptionalPlurals.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/OptionalPlurals.yml')), + // Replaced by Grafana/styles/GrafanaOrdinal.yml. + 'Grafana/styles/Grafana/GrafanaGoogleOrdinal.yml': null, + 'Grafana/styles/Grafana/GrafanaGoogleOxfordComma.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/OxfordComma.yml') { level: 'suggestion' }), + // Replaced by Grafana/styles/GrafanaParentheses.yml. + 'Grafana/styles/Grafana/GrafanaGoogleParens.yml': null, + 'Grafana/styles/Grafana/GrafanaGooglePassive.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Passive.yml')), + 'Grafana/styles/Grafana/GrafanaGooglePeriods.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Periods.yml')), // Google.Quotes more often a false positive for usage. - 'Grafana/GoogleQuotes.yml': null, - 'Grafana/GoogleRanges.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Ranges.yml')), - 'Grafana/GoogleSemicolons.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Semicolons.yml')), - 'Grafana/GoogleSlang.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Slang.yml')), - 'Grafana/GoogleSpacing.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Spacing.yml')), - 'Grafana/GoogleSpelling.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Spelling.yml')), + 'Grafana/styles/Grafana/GrafanaGoogleQuotes.yml': null, + 'Grafana/styles/Grafana/GrafanaGoogleRanges.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Ranges.yml')), + 'Grafana/styles/Grafana/GrafanaGoogleSemicolons.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Semicolons.yml')), + 'Grafana/styles/Grafana/GrafanaGoogleSlang.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Slang.yml')), + 'Grafana/styles/Grafana/GrafanaGoogleSpacing.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Spacing.yml')), + 'Grafana/styles/Grafana/GrafanaGoogleSpelling.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Spelling.yml')), // More often than not, we need to be consistent with Prometheus units or units used Grafana UI which are not represented in the form encouraged by SI. - 'Grafana/GoogleUnits.yml': null, - // Replaced by Grafana/We.yml. - 'Grafana/GoogleWe.yml': null, - 'Grafana/GoogleWill.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Will.yml') { + 'Grafana/styles/Grafana/GrafanaGoogleUnits.yml': null, + // Replaced by Grafana/styles/GrafanaWe.yml. + 'Grafana/styles/Grafana/GrafanaGoogleWe.yml': null, + 'Grafana/styles/Grafana/GrafanaGoogleWill.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Will.yml') { message: super.message + '\n\n' + ||| Use present tense for statements that describe general behavior that's not associated with a particular time. |||, }), - // Replaced by Grafana/WordList.yml. - 'Grafana/GoogleWordList.yml': null, + // Replaced by Grafana/styles/GrafanaWordList.yml. + 'Grafana/styles/Grafana/GrafanaGoogleWordList.yml': null, }) diff --git a/vale/readability.jsonnet b/vale/readability.jsonnet index b64592013..b9c6836f9 100644 --- a/vale/readability.jsonnet +++ b/vale/readability.jsonnet @@ -1,35 +1,35 @@ std.prune({ - 'Grafana/ReadabilityAutomatedReadability.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/AutomatedReadability.yml') { + 'Grafana/styles/Grafana/ReadabilityAutomatedReadability.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/AutomatedReadability.yml') { condition: '> 0', level: 'suggestion', message: '%s aim for below 8.', }), - 'Grafana/ReadabilityColemanLiau.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/ColemanLiau.yml') { + 'Grafana/styles/Grafana/ReadabilityColemanLiau.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/ColemanLiau.yml') { condition: '> 0', level: 'suggestion', message: '%s aim for below 9.', }), - 'Grafana/ReadabilityFleschKincaid.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/FleschKincaid.yml') { + 'Grafana/styles/Grafana/ReadabilityFleschKincaid.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/FleschKincaid.yml') { condition: '> 0', level: 'suggestion', message: '%s aim for below 8.', }), - 'Grafana/ReadabilityFleschReadingEase.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/FleschReadingEase.yml') { + 'Grafana/styles/Grafana/ReadabilityFleschReadingEase.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/FleschReadingEase.yml') { condition: '< 100', level: 'suggestion', message: '%s aim for above 70.', }), - 'Grafana/ReadabilityGunningFog.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/GunningFog.yml') { + 'Grafana/styles/Grafana/ReadabilityGunningFog.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/GunningFog.yml') { condition: '> 0', level: 'suggestion', message: '%s aim for below 10.', }), - 'Grafana/ReadabilityLIX.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/LIX.yml') { + 'Grafana/styles/Grafana/ReadabilityLIX.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/LIX.yml') { condition: '> 0', level: 'suggestion', message: '%s aim for below 35.', }), - 'Grafana/ReadabilitySMOG.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/SMOG.yml') { + 'Grafana/styles/Grafana/ReadabilitySMOG.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Readability/SMOG.yml') { condition: '> 0', level: 'suggestion', message: '%s aim for below 10.', From 14627c37ef14457240c26178008d83c42f98f65e Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Fri, 22 Nov 2024 12:49:24 +0000 Subject: [PATCH 05/17] Add debug output for all commands Signed-off-by: Jack Baldry --- docs/make-docs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/make-docs b/docs/make-docs index 2dc6726d9..8cf171e34 100755 --- a/docs/make-docs +++ b/docs/make-docs @@ -6,6 +6,14 @@ # [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes. # Changes are relevant to this script and the support docs.mk GNU Make interface. # +# ## 8.2.0 (2024-11-22) +# +# ### Added +# +# - Debug output of the final command when DEBUG=true. +# +# Useful to inspect if the script is correctly constructing the final command. +# # ## 8.1.0 (2024-08-22) # # ### Added @@ -631,7 +639,7 @@ POSIX_HERESTRING case "${_project}" in # Workaround for arbitrary mounts where the version field is expected to be the local directory - # and the repo field is expected to be the container directory. + # and the repo field is expected to be the container directory. arbitrary) echo "${_project}^${_version}^${_repo}^" # TODO ;; @@ -801,6 +809,10 @@ case "${image}" in | sed "s#$(proj_dst "${proj}")#sources#" EOF + if [ -n "${DEBUG}" ]; then + debg "${cmd}" + fi + case "${OUTPUT_FORMAT}" in human) if ! command -v jq >/dev/null 2>&1; then @@ -837,6 +849,10 @@ EOF /hugo/content/docs EOF + if [ -n "${DEBUG}" ]; then + debg "${cmd}" + fi + case "${OUTPUT_FORMAT}" in human) ${cmd} --output=line \ From afe12bfc64e1f2f9337638afc41fa9ab53a1aa24 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Fri, 22 Nov 2024 12:49:37 +0000 Subject: [PATCH 06/17] WIP: Need to get fixtures working Signed-off-by: Jack Baldry From 854e7ba27d278610d489e44ab63edc189b40e893 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Thu, 5 Dec 2024 07:40:50 +0000 Subject: [PATCH 07/17] Fix rules documentation generation Signed-off-by: Jack Baldry --- docs/sources/review/lint-prose/rules.md | 2 +- vale/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/review/lint-prose/rules.md b/docs/sources/review/lint-prose/rules.md index f0455b714..1183a48ac 100755 --- a/docs/sources/review/lint-prose/rules.md +++ b/docs/sources/review/lint-prose/rules.md @@ -2,7 +2,7 @@ date: "2024-06-25" description: A description of every Grafana Labs prose linting rule. menuTitle: Rules -review_date: "2024-09-19" +review_date: "2024-12-05" title: Vale rules --- diff --git a/vale/Makefile b/vale/Makefile index 686bf123e..e227764c0 100644 --- a/vale/Makefile +++ b/vale/Makefile @@ -22,7 +22,7 @@ DOCUMENTATION := ../docs/sources/review/lint-prose/rules.md all: $(DICTIONARIES) $(DOCUMENTATION) $(RULES) $(STYLES) $(TESTS) ## Build all the Grafana Vale rules and styles. $(DOCUMENTATION): $(wildcard Grafana/styles/Grafana/*) $(wildcard ../tools/cmd/generate-documentation/*) - cd ../tools/ && go run ./cmd/generate-documentation ../ tools/cmd/generate-documentation vale/Grafana docs/sources/review/lint-prose/rules.md + cd ../tools/ && go run ./cmd/generate-documentation ../ tools/cmd/generate-documentation vale/Grafana/styles/Grafana docs/sources/review/lint-prose/rules.md prettier -w $(DOCUMENTATION) Grafana/styles/config/dictionaries/en_US-grafana.%: dictionary.libsonnet From 7618ba36fff44e2b49fb0cc420a4e56633d47e31 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Thu, 5 Dec 2024 07:45:03 +0000 Subject: [PATCH 08/17] Fix Google rule generation Signed-off-by: Jack Baldry --- docs/sources/review/lint-prose/rules.md | 84 +++++++++---------- vale/Grafana/styles/Grafana/GoogleAMPM.yml | 4 +- vale/Grafana/styles/Grafana/GoogleEmDash.yml | 2 +- .../styles/Grafana/GoogleGenderBias.yml | 6 +- .../Grafana/GoogleHeadingPunctuation.yml | 2 +- .../styles/Grafana/GoogleLyHyphens.yml | 4 +- .../styles/Grafana/GoogleOptionalPlurals.yml | 2 +- vale/Makefile | 10 +-- vale/google.jsonnet | 77 ++++++++--------- 9 files changed, 92 insertions(+), 99 deletions(-) diff --git a/docs/sources/review/lint-prose/rules.md b/docs/sources/review/lint-prose/rules.md index 1183a48ac..a3c5b52f7 100755 --- a/docs/sources/review/lint-prose/rules.md +++ b/docs/sources/review/lint-prose/rules.md @@ -102,8 +102,8 @@ Use 'AM' or 'PM' (preceded by a space). _``_ was matched by one or more of the following regular expressions: -- `\d{1,2}[AP]M` -- `\d{1,2} ?[ap]m` +- `\d{1,2}[AP]M\b` +- `\d{1,2} ?[ap]m\b` - `\d{1,2} ?[aApP]\.[mM]\.` [More information ->](https://developers.google.com/style/word-list) @@ -165,47 +165,43 @@ Extends: substitution Consider using _``_ instead of _``_. -| Current text | Replacement text | -| ------------------------------ | ----------------------------- | -| `(?:alumnae\|alumni)` | `graduates` | -| `(?:alumna\|alumnus)` | `graduate` | -| `air(?:m[ae]n\|wom[ae]n)` | `pilot(s)` | -| `anchor(?:m[ae]n\|wom[ae]n)` | `anchor(s)` | -| `authoress` | `author` | -| `camera(?:m[ae]n\|wom[ae]n)` | `camera operator(s)` | -| `chair(?:m[ae]n\|wom[ae]n)` | `chair(s)` | -| `congress(?:m[ae]n\|wom[ae]n)` | `member(s) of congress` | -| `door(?:m[ae]\|wom[ae]n)` | `concierge(s)` | -| `draft(?:m[ae]n\|wom[ae]n)` | `drafter(s)` | -| `fire(?:m[ae]n\|wom[ae]n)` | `firefighter(s)` | -| `fisher(?:m[ae]n\|wom[ae]n)` | `fisher(s)` | -| `fresh(?:m[ae]n\|wom[ae]n)` | `first-year student(s)` | -| `garbage(?:m[ae]n\|wom[ae]n)` | `waste collector(s)` | -| `lady lawyer` | `lawyer` | -| `ladylike` | `courteous` | -| `landlord` | `building manager` | -| `mail(?:m[ae]n\|wom[ae]n)` | `mail carriers` | -| `man and wife` | `husband and wife` | -| `man enough` | `strong enough` | -| `mankind` | `human kind` | -| `manmade` | `manufactured` | -| `manpower` | `personnel` | -| `men and girls` | `men and women` | -| `middle(?:m[ae]n\|wom[ae]n)` | `intermediary` | -| `news(?:m[ae]n\|wom[ae]n)` | `journalist(s)` | -| `ombuds(?:man\|woman)` | `ombuds` | -| `oneupmanship` | `upstaging` | -| `poetess` | `poet` | -| `police(?:m[ae]n\|wom[ae]n)` | `police officer(s)` | -| `repair(?:m[ae]n\|wom[ae]n)` | `technician(s)` | -| `sales(?:m[ae]n\|wom[ae]n)` | `salesperson or sales people` | -| `service(?:m[ae]n\|wom[ae]n)` | `soldier(s)` | -| `steward(?:ess)?` | `flight attendant` | -| `tribes(?:m[ae]n\|wom[ae]n)` | `tribe member(s)` | -| `waitress` | `waiter` | -| `woman doctor` | `doctor` | -| `woman scientist[s]?` | `scientist(s)` | -| `work(?:m[ae]n\|wom[ae]n)` | `worker(s)` | +| Current text | Replacement text | +| ----------------------------- | ----------------------------- | +| `(?:alumnae\|alumni)` | `graduates` | +| `(?:alumna\|alumnus)` | `graduate` | +| `air(?:m[ae]n\|wom[ae]n)` | `pilot(s)` | +| `anchor(?:m[ae]n\|wom[ae]n)` | `anchor(s)` | +| `authoress` | `author` | +| `camera(?:m[ae]n\|wom[ae]n)` | `camera operator(s)` | +| `door(?:m[ae]\|wom[ae]n)` | `concierge(s)` | +| `draft(?:m[ae]n\|wom[ae]n)` | `drafter(s)` | +| `fire(?:m[ae]n\|wom[ae]n)` | `firefighter(s)` | +| `fisher(?:m[ae]n\|wom[ae]n)` | `fisher(s)` | +| `fresh(?:m[ae]n\|wom[ae]n)` | `first-year student(s)` | +| `garbage(?:m[ae]n\|wom[ae]n)` | `waste collector(s)` | +| `lady lawyer` | `lawyer` | +| `ladylike` | `courteous` | +| `mail(?:m[ae]n\|wom[ae]n)` | `mail carriers` | +| `man and wife` | `husband and wife` | +| `man enough` | `strong enough` | +| `mankind` | `human kind\|humanity` | +| `manmade` | `manufactured` | +| `manpower` | `personnel` | +| `middle(?:m[ae]n\|wom[ae]n)` | `intermediary` | +| `news(?:m[ae]n\|wom[ae]n)` | `journalist(s)` | +| `ombuds(?:man\|woman)` | `ombuds` | +| `oneupmanship` | `upstaging` | +| `poetess` | `poet` | +| `police(?:m[ae]n\|wom[ae]n)` | `police officer(s)` | +| `repair(?:m[ae]n\|wom[ae]n)` | `technician(s)` | +| `sales(?:m[ae]n\|wom[ae]n)` | `salesperson or sales people` | +| `service(?:m[ae]n\|wom[ae]n)` | `soldier(s)` | +| `steward(?:ess)?` | `flight attendant` | +| `tribes(?:m[ae]n\|wom[ae]n)` | `tribe member(s)` | +| `waitress` | `waiter` | +| `woman doctor` | `doctor` | +| `woman scientist[s]?` | `scientist(s)` | +| `work(?:m[ae]n\|wom[ae]n)` | `worker(s)` | [More information ->](https://developers.google.com/style/inclusive-documentation) @@ -217,7 +213,7 @@ _``_ doesn't need a hyphen. _``_ was matched by one or more of the following regular expressions: -- `\s[^\s-]+ly-` +- `\b[^\s-]+ly-\w+\b` [More information ->](https://developers.google.com/style/hyphens) diff --git a/vale/Grafana/styles/Grafana/GoogleAMPM.yml b/vale/Grafana/styles/Grafana/GoogleAMPM.yml index d9ead755e..41548350d 100644 --- a/vale/Grafana/styles/Grafana/GoogleAMPM.yml +++ b/vale/Grafana/styles/Grafana/GoogleAMPM.yml @@ -4,6 +4,6 @@ "message": "Use 'AM' or 'PM' (preceded by a space)." "nonword": true "tokens": - - "\\d{1,2}[AP]M" - - "\\d{1,2} ?[ap]m" + - "\\d{1,2}[AP]M\\b" + - "\\d{1,2} ?[ap]m\\b" - "\\d{1,2} ?[aApP]\\.[mM]\\." diff --git a/vale/Grafana/styles/Grafana/GoogleEmDash.yml b/vale/Grafana/styles/Grafana/GoogleEmDash.yml index c50c20c83..13236a660 100644 --- a/vale/Grafana/styles/Grafana/GoogleEmDash.yml +++ b/vale/Grafana/styles/Grafana/GoogleEmDash.yml @@ -1,7 +1,7 @@ "action": "name": "edit" "params": - - "remove" + - "trim" - " " "extends": "existence" "level": "error" diff --git a/vale/Grafana/styles/Grafana/GoogleGenderBias.yml b/vale/Grafana/styles/Grafana/GoogleGenderBias.yml index 56586b717..c5f08310d 100644 --- a/vale/Grafana/styles/Grafana/GoogleGenderBias.yml +++ b/vale/Grafana/styles/Grafana/GoogleGenderBias.yml @@ -12,8 +12,6 @@ "anchor(?:m[ae]n|wom[ae]n)": "anchor(s)" "authoress": "author" "camera(?:m[ae]n|wom[ae]n)": "camera operator(s)" - "chair(?:m[ae]n|wom[ae]n)": "chair(s)" - "congress(?:m[ae]n|wom[ae]n)": "member(s) of congress" "door(?:m[ae]|wom[ae]n)": "concierge(s)" "draft(?:m[ae]n|wom[ae]n)": "drafter(s)" "fire(?:m[ae]n|wom[ae]n)": "firefighter(s)" @@ -22,14 +20,12 @@ "garbage(?:m[ae]n|wom[ae]n)": "waste collector(s)" "lady lawyer": "lawyer" "ladylike": "courteous" - "landlord": "building manager" "mail(?:m[ae]n|wom[ae]n)": "mail carriers" "man and wife": "husband and wife" "man enough": "strong enough" - "mankind": "human kind" + "mankind": "human kind|humanity" "manmade": "manufactured" "manpower": "personnel" - "men and girls": "men and women" "middle(?:m[ae]n|wom[ae]n)": "intermediary" "news(?:m[ae]n|wom[ae]n)": "journalist(s)" "ombuds(?:man|woman)": "ombuds" diff --git a/vale/Grafana/styles/Grafana/GoogleHeadingPunctuation.yml b/vale/Grafana/styles/Grafana/GoogleHeadingPunctuation.yml index 83497997c..49ec04fa3 100644 --- a/vale/Grafana/styles/Grafana/GoogleHeadingPunctuation.yml +++ b/vale/Grafana/styles/Grafana/GoogleHeadingPunctuation.yml @@ -1,7 +1,7 @@ "action": "name": "edit" "params": - - "remove" + - "trim_right" - "." "extends": "existence" "level": "warning" diff --git a/vale/Grafana/styles/Grafana/GoogleLyHyphens.yml b/vale/Grafana/styles/Grafana/GoogleLyHyphens.yml index bdf6e7a00..dca73521c 100644 --- a/vale/Grafana/styles/Grafana/GoogleLyHyphens.yml +++ b/vale/Grafana/styles/Grafana/GoogleLyHyphens.yml @@ -1,7 +1,7 @@ "action": "name": "edit" "params": - - "replace" + - "regex" - "-" - " " "extends": "existence" @@ -11,4 +11,4 @@ "message": "'%s' doesn't need a hyphen." "nonword": true "tokens": - - "\\s[^\\s-]+ly-" + - "\\b[^\\s-]+ly-\\w+\\b" diff --git a/vale/Grafana/styles/Grafana/GoogleOptionalPlurals.yml b/vale/Grafana/styles/Grafana/GoogleOptionalPlurals.yml index 6e777a69d..a43d97de7 100644 --- a/vale/Grafana/styles/Grafana/GoogleOptionalPlurals.yml +++ b/vale/Grafana/styles/Grafana/GoogleOptionalPlurals.yml @@ -1,7 +1,7 @@ "action": "name": "edit" "params": - - "remove" + - "trim_right" - "(s)" "extends": "existence" "level": "error" diff --git a/vale/Makefile b/vale/Makefile index e227764c0..5bd8bd0a5 100644 --- a/vale/Makefile +++ b/vale/Makefile @@ -16,7 +16,7 @@ GIT_ROOT := $(shell git rev-parse --show-toplevel) DICTIONARIES := Grafana/styles/config/dictionaries/en_US-grafana.dic TESTS := fixtures/Grafana -STYLES := Grafana/styles/Grafana/GrafanaGoogle Grafana/styles/Grafana/Readability +STYLES := Grafana/styles/Grafana/Google Grafana/styles/Grafana/Readability RULES := Grafana/styles/Grafana/Acronyms.yml Grafana/styles/Grafana/AmazonProductNames.yml Grafana/styles/Grafana/ApacheProjectNames.yml Grafana/styles/Grafana/GoogleProductNames.yml Grafana/styles/Grafana/Headings.yml Grafana/styles/Grafana/ProductPossessives.yml Grafana/styles/Grafana/WordList.yml DOCUMENTATION := ../docs/sources/review/lint-prose/rules.md @@ -30,7 +30,7 @@ Grafana/styles/config/dictionaries/en_US-grafana.%: dictionary.libsonnet .PHONY: grafana/vale grafana/vale: ## Builds a container image for Vale with the Grafana style loaded. -grafana/vale: Grafana/styles/config/dictionaries/en_US-grafana.aff Grafana/styles/config/dictionaries/en_US-grafana.dic Grafana/styles/Grafana/GrafanaGoogle .vale.ini +grafana/vale: Grafana/styles/config/dictionaries/en_US-grafana.aff Grafana/styles/config/dictionaries/en_US-grafana.dic Grafana/styles/Grafana/Google .vale.ini $(PODMAN) build \ --platform linux/x86_64,linux/arm64 \ --progress plain \ @@ -60,9 +60,9 @@ sync: jsonnet -Se "(import '.vale.jsonnet').container" | sed '$${/^$$/d;}' > .vale.ini jsonnet -Se "(import '.vale.jsonnet').repository" | sed '$${/^$$/d;}' > ../.vale.ini -.PHONY: Grafana/styles/Grafana/GrafanaGoogle -Grafana/styles/Grafana/GrafanaGoogle: ## Generate the Grafana style from the Google style. -Grafana/styles/Grafana/GrafanaGoogle: google.jsonnet +.PHONY: Grafana/styles/Grafana/Google +Grafana/styles/Grafana/Google: ## Generate the Grafana style from the Google style. +Grafana/styles/Grafana/Google: google.jsonnet rm -f "$$(jsonnet -Se 'std.join(" ", std.objectFields(import "google.jsonnet"))')" jsonnet -S -m . google.jsonnet prettier -w $@*.yml diff --git a/vale/google.jsonnet b/vale/google.jsonnet index 6281d0ebd..329622f3a 100644 --- a/vale/google.jsonnet +++ b/vale/google.jsonnet @@ -1,47 +1,48 @@ std.prune({ - 'Grafana/styles/Grafana/GrafanaGoogleAMPM.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/AMPM.yml')), - // Replaced by Grafana/styles/GrafanaAcronyms.yml. - 'Grafana/styles/Grafana/GrafanaGoogleAcronyms.yml': null, + 'Grafana/styles/Grafana/GoogleAMPM.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/AMPM.yml')), + // Replaced by Grafana/Acronyms.yml. + 'Grafana/styles/Grafana/GoogleAcronyms.yml': null, // Not sure that this is that useful. - 'Grafana/styles/Grafana/GrafanaGoogleColons.yml': null, - 'Grafana/styles/Grafana/GrafanaGoogleContractions.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Contractions.yml')), - 'Grafana/styles/Grafana/GrafanaGoogleDateFormat.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/DateFormat.yml')), - 'Grafana/styles/Grafana/GrafanaGoogleEllipses.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Ellipses.yml')), - // Replaced by Grafana/styles/GrafanaExclamation.yml. - 'Grafana/styles/Grafana/GrafanaGoogleExclamation.yml': null, - 'Grafana/styles/Grafana/GrafanaGoogleFirstPerson.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/FirstPerson.yml')), - 'Grafana/styles/Grafana/GrafanaGoogleGender.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Gender.yml')), - 'Grafana/styles/Grafana/GrafanaGoogleGenderBias.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/GenderBias.yml')), - 'Grafana/styles/Grafana/GrafanaGoogleHeadingPunctuation.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/HeadingPunctuation.yml')), - // Replaced by Grafana/styles/GrafanaHeadings.yml. - 'Grafana/styles/Grafana/GrafanaGoogleHeadings.yml': null, - // Replaced by Grafana/styles/GrafanaLatin.yml. - 'Grafana/styles/Grafana/GrafanaGoogleLatin.yml': null, - 'Grafana/styles/Grafana/GrafanaGoogleLyHyphens.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/LyHyphens.yml')), - 'Grafana/styles/Grafana/GrafanaGoogleOptionalPlurals.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/OptionalPlurals.yml')), - // Replaced by Grafana/styles/GrafanaOrdinal.yml. - 'Grafana/styles/Grafana/GrafanaGoogleOrdinal.yml': null, - 'Grafana/styles/Grafana/GrafanaGoogleOxfordComma.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/OxfordComma.yml') { level: 'suggestion' }), - // Replaced by Grafana/styles/GrafanaParentheses.yml. - 'Grafana/styles/Grafana/GrafanaGoogleParens.yml': null, - 'Grafana/styles/Grafana/GrafanaGooglePassive.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Passive.yml')), - 'Grafana/styles/Grafana/GrafanaGooglePeriods.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Periods.yml')), + 'Grafana/styles/Grafana/GoogleColons.yml': null, + 'Grafana/styles/Grafana/GoogleContractions.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Contractions.yml')), + 'Grafana/styles/Grafana/GoogleDateFormat.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/DateFormat.yml')), + 'Grafana/styles/Grafana/GoogleEllipses.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Ellipses.yml')), + 'Grafana/styles/Grafana/GoogleEmDash.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/EmDash.yml')), + // Replaced by Grafana/Exclamation.yml. + 'Grafana/styles/Grafana/GoogleExclamation.yml': null, + 'Grafana/styles/Grafana/GoogleFirstPerson.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/FirstPerson.yml')), + 'Grafana/styles/Grafana/GoogleGender.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Gender.yml')), + 'Grafana/styles/Grafana/GoogleGenderBias.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/GenderBias.yml')), + 'Grafana/styles/Grafana/GoogleHeadingPunctuation.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/HeadingPunctuation.yml')), + // Replaced by Grafana/Headings.yml. + 'Grafana/styles/Grafana/GoogleHeadings.yml': null, + // Replaced by Grafana/Latin.yml. + 'Grafana/styles/Grafana/GoogleLatin.yml': null, + 'Grafana/styles/Grafana/GoogleLyHyphens.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/LyHyphens.yml')), + 'Grafana/styles/Grafana/GoogleOptionalPlurals.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/OptionalPlurals.yml')), + // Replaced by Grafana/Ordinal.yml. + 'Grafana/styles/Grafana/GoogleOrdinal.yml': null, + 'Grafana/styles/Grafana/GoogleOxfordComma.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/OxfordComma.yml') { level: 'suggestion' }), + // Replaced by Grafana/Parentheses.yml. + 'Grafana/styles/Grafana/GoogleParens.yml': null, + 'Grafana/styles/Grafana/GooglePassive.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Passive.yml')), + 'Grafana/styles/Grafana/GooglePeriods.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Periods.yml')), // Google.Quotes more often a false positive for usage. - 'Grafana/styles/Grafana/GrafanaGoogleQuotes.yml': null, - 'Grafana/styles/Grafana/GrafanaGoogleRanges.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Ranges.yml')), - 'Grafana/styles/Grafana/GrafanaGoogleSemicolons.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Semicolons.yml')), - 'Grafana/styles/Grafana/GrafanaGoogleSlang.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Slang.yml')), - 'Grafana/styles/Grafana/GrafanaGoogleSpacing.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Spacing.yml')), - 'Grafana/styles/Grafana/GrafanaGoogleSpelling.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Spelling.yml')), + 'Grafana/styles/Grafana/GoogleQuotes.yml': null, + 'Grafana/styles/Grafana/GoogleRanges.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Ranges.yml')), + 'Grafana/styles/Grafana/GoogleSemicolons.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Semicolons.yml')), + 'Grafana/styles/Grafana/GoogleSlang.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Slang.yml')), + 'Grafana/styles/Grafana/GoogleSpacing.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Spacing.yml')), + 'Grafana/styles/Grafana/GoogleSpelling.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Spelling.yml')), // More often than not, we need to be consistent with Prometheus units or units used Grafana UI which are not represented in the form encouraged by SI. - 'Grafana/styles/Grafana/GrafanaGoogleUnits.yml': null, - // Replaced by Grafana/styles/GrafanaWe.yml. - 'Grafana/styles/Grafana/GrafanaGoogleWe.yml': null, - 'Grafana/styles/Grafana/GrafanaGoogleWill.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Will.yml') { + 'Grafana/styles/Grafana/GoogleUnits.yml': null, + // Replaced by Grafana/We.yml. + 'Grafana/styles/Grafana/GoogleWe.yml': null, + 'Grafana/styles/Grafana/GoogleWill.yml': std.manifestYamlDoc(std.parseYaml(importstr 'Google/Will.yml') { message: super.message + '\n\n' + ||| Use present tense for statements that describe general behavior that's not associated with a particular time. |||, }), - // Replaced by Grafana/styles/GrafanaWordList.yml. - 'Grafana/styles/Grafana/GrafanaGoogleWordList.yml': null, + // Replaced by Grafana/WordList.yml. + 'Grafana/styles/Grafana/GoogleWordList.yml': null, }) From b147f833bed921d38cc639f7a24919cf66d69f50 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Thu, 5 Dec 2024 08:41:07 +0000 Subject: [PATCH 09/17] fixup! Document how to release the Vale package --- RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index e3dde3051..4f55ac05b 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -54,7 +54,7 @@ To release a new version of the Writers' Toolkit Vale package: The Vale package follow [semantic versioning](https://semver.org). -1. Using the checked out tag, create an archive of the [`vale`](./vale/) directory. +1. Using the checked out tag, create an archive of the [Vale package directory](./vale/Grafana). ```console cd vale && make Grafana.zip From 07381b874feb1ceda6cf410f83810c77b99f1167 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Thu, 5 Dec 2024 09:38:59 +0000 Subject: [PATCH 10/17] Fix podman builds Signed-off-by: Jack Baldry --- vale/Makefile | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/vale/Makefile b/vale/Makefile index 5bd8bd0a5..d78f9112b 100644 --- a/vale/Makefile +++ b/vale/Makefile @@ -12,6 +12,7 @@ help: @awk 'BEGIN {FS = ": ##"; printf "Usage:\n make \n\nTargets:\n"} /^[a-zA-Z0-9_\.\-\/% ]+: ##/ { printf " %-45s %s\n", $$1, $$2 }' $(MAKEFILE_LIST) PODMAN := $(shell if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi) +SHORT_SHA := $(shell git rev-parse --short HEAD) GIT_ROOT := $(shell git rev-parse --show-toplevel) DICTIONARIES := Grafana/styles/config/dictionaries/en_US-grafana.dic @@ -31,24 +32,25 @@ Grafana/styles/config/dictionaries/en_US-grafana.%: dictionary.libsonnet .PHONY: grafana/vale grafana/vale: ## Builds a container image for Vale with the Grafana style loaded. grafana/vale: Grafana/styles/config/dictionaries/en_US-grafana.aff Grafana/styles/config/dictionaries/en_US-grafana.dic Grafana/styles/Grafana/Google .vale.ini - $(PODMAN) build \ + podman manifest create --amend grafana/vale:latest + podman manifest create --amend grafana/vale:$(SHORT_SHA) + podman buildx build \ + --manifest grafana/vale:latest \ --platform linux/x86_64,linux/arm64 \ --progress plain \ - --tag grafana/vale:$(shell git rev-parse --short HEAD) \ - --tag grafana/vale:latest \ . - -.PHONY: grafana/vale/push -grafana/vale/push: ## Builds and pushes container image for Vale with the Grafana style loaded. -grafana/vale/push: dictionaries/en_US-grafana.aff dictionaries/en_US-grafana.dic Grafana/styles/Grafana/Google .vale.ini - $(PODMAN) build \ + podman buildx build \ + --manifest grafana/vale:$(SHORT_SHA) \ --platform linux/x86_64,linux/arm64 \ --progress plain \ - --push \ - --tag grafana/vale:$(shell git rev-parse --short HEAD) \ - --tag grafana/vale:latest \ . +.PHONY: grafana/vale/push +grafana/vale/push: ## Builds and pushes container image for Vale with the Grafana style loaded. +grafana/vale/push: grafana/vale + podman manifest push localhost/grafana/vale:latest docker://docker.io/grafana/vale:latest + podman manifest push localhost/grafana/vale:$(SHORT_SHA) docker://docker.io/grafana/vale:$(SHORT_SHA) + .PHONY: sync sync: ## Update the vendored Google style. sync: From 914ab592fc35c7a5b39025813b591ada31540742 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Fri, 6 Dec 2024 10:41:33 +0000 Subject: [PATCH 11/17] Remove Readability from Vale Packages Signed-off-by: Jack Baldry --- vale/Grafana/.vale.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vale/Grafana/.vale.ini b/vale/Grafana/.vale.ini index 1a4aa7f6c..000bac1b4 100644 --- a/vale/Grafana/.vale.ini +++ b/vale/Grafana/.vale.ini @@ -1,4 +1,4 @@ -Packages = Google, https://github.com/errata-ai/Hugo/releases/download/v0.2.0/Hugo.zip, Readability +Packages = Google, https://github.com/errata-ai/Hugo/releases/download/v0.2.0/Hugo.zip [*] BasedOnStyles = Grafana From 5a3f417024983fddeaa9d8bd6e20a35a43359a10 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Fri, 6 Dec 2024 10:52:40 +0000 Subject: [PATCH 12/17] Refactor GitHub workflow Signed-off-by: Jack Baldry --- .github/workflows/validate-documentation.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/validate-documentation.yml b/.github/workflows/validate-documentation.yml index b923c7365..43801edc0 100644 --- a/.github/workflows/validate-documentation.yml +++ b/.github/workflows/validate-documentation.yml @@ -75,10 +75,17 @@ jobs: uses: actions/checkout@v4 - name: Run linter run: > - /bin/reviewdog - --conf=/etc/vale/.reviewdog.yml + vale + '--glob=*.md' + --minAlertLevel=warning + --output=/etc/vale/rdjsonl.tmpl + docs/sources + | reviewdog + -f=rdjsonl --fail-on-error + --name=vale --reporter=github-pr-review + env: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 76d18ccc895602cdec4f528adb0f9e2316533b73 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Fri, 6 Dec 2024 10:52:48 +0000 Subject: [PATCH 13/17] Cause lint failure Signed-off-by: Jack Baldry --- docs/sources/_index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/sources/_index.md b/docs/sources/_index.md index 7989de41e..3e5b9fab1 100644 --- a/docs/sources/_index.md +++ b/docs/sources/_index.md @@ -39,3 +39,6 @@ If it's your first time using the guide, start with the [Get started](https://gr Writers' Toolkit is open source and available at [`grafana/writers-toolkit`](https://github.com/grafana/writers-toolkit). If you have questions, or feedback on how to improve this documentation, [open an issue](https://github.com/grafana/writers-toolkit/issues/new) and help make this an even better resource. +blah +blahlskadjflasjdflkasjdf +blah From 7a3abae116e6b7e0303afb04355f06cb254d2b38 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Fri, 6 Dec 2024 10:56:06 +0000 Subject: [PATCH 14/17] Run vale sync Signed-off-by: Jack Baldry --- .github/workflows/validate-documentation.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-documentation.yml b/.github/workflows/validate-documentation.yml index 43801edc0..a4164f0cb 100644 --- a/.github/workflows/validate-documentation.yml +++ b/.github/workflows/validate-documentation.yml @@ -73,6 +73,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + - name: Sync packages + run: vale sync - name: Run linter run: > vale @@ -85,7 +87,6 @@ jobs: --fail-on-error --name=vale --reporter=github-pr-review - env: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} From b27f25d6b0168a83b5a8503e5fa9c722583f1b7b Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Fri, 6 Dec 2024 11:00:28 +0000 Subject: [PATCH 15/17] Discard changes to docs/sources/_index.md --- docs/sources/_index.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/sources/_index.md b/docs/sources/_index.md index 3e5b9fab1..7989de41e 100644 --- a/docs/sources/_index.md +++ b/docs/sources/_index.md @@ -39,6 +39,3 @@ If it's your first time using the guide, start with the [Get started](https://gr Writers' Toolkit is open source and available at [`grafana/writers-toolkit`](https://github.com/grafana/writers-toolkit). If you have questions, or feedback on how to improve this documentation, [open an issue](https://github.com/grafana/writers-toolkit/issues/new) and help make this an even better resource. -blah -blahlskadjflasjdflkasjdf -blah From 9b44de10865853b19a71799ecc0abb3ffe5116fc Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Fri, 6 Dec 2024 16:21:10 +0000 Subject: [PATCH 16/17] Fix typo Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 682886650..ea28f43fb 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -52,7 +52,7 @@ To release a new version of the Writers' Toolkit Vale package: 1. Create a new tag for the release with the form `vale/`. - The Vale package follow [semantic versioning](https://semver.org). + The Vale package follows [semantic versioning](https://semver.org). 1. Using the checked out tag, create an archive of the [Vale package directory](./vale/Grafana). From 098293a3bc71f1074857cd35226486294692c401 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Mon, 16 Dec 2024 12:55:53 +0000 Subject: [PATCH 17/17] Update Headings Jsonnet using dictionary Signed-off-by: Jack Baldry --- docs/sources/review/lint-prose/rules.md | 6 +- vale/Grafana/styles/Grafana/Headings.yml | 30 +++++- vale/Headings.jsonnet | 132 ++++++++++++----------- vale/dictionary/a.jsonnet | 2 +- vale/dictionary/c.jsonnet | 1 + vale/dictionary/f.jsonnet | 2 +- vale/dictionary/r.jsonnet | 2 +- vale/dictionary/s.jsonnet | 4 +- 8 files changed, 105 insertions(+), 74 deletions(-) diff --git a/docs/sources/review/lint-prose/rules.md b/docs/sources/review/lint-prose/rules.md index a3c5b52f7..6bdebe05a 100755 --- a/docs/sources/review/lint-prose/rules.md +++ b/docs/sources/review/lint-prose/rules.md @@ -2,7 +2,7 @@ date: "2024-06-25" description: A description of every Grafana Labs prose linting rule. menuTitle: Rules -review_date: "2024-12-05" +review_date: "2024-12-16" title: Vale rules --- @@ -662,10 +662,10 @@ Extends: capitalization Use sentence-style capitalization for _``_. -If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/styles/GrafanaHeadings.yml for them to be considered correctly cased. - Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. +If your heading contains capitalized words that represent product names, you need to add those words to the Grafana dictionary or the list of static exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Headings.jsonnet for them to be considered correctly cased. + [More information ->](https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings) ### Grafana.Kubernetes diff --git a/vale/Grafana/styles/Grafana/Headings.yml b/vale/Grafana/styles/Grafana/Headings.yml index 9985f496d..2b1221a06 100644 --- a/vale/Grafana/styles/Grafana/Headings.yml +++ b/vale/Grafana/styles/Grafana/Headings.yml @@ -1,20 +1,27 @@ "exceptions": + - "Amazon ARN" + - "Amazon AWS Distro for OpenTelemetry Collector" + - "Amazon AWS X-Ray" - "Amazon CloudWatch" - "Amazon Data Firehose" - "Amazon Elastic Kubernetes Service" - "Amazon Firehose" - "Amazon Kinesis" - "Amazon Relational Database Service" + - "Amazon SSM" + - "ADOT" - "AI Observability" - "Agent" - "Alloy" + - "ARN" - "Asserts" - "AWS" + - "AWS Distro for OpenTelemetry Collector" + - "AWS X-Ray" - "Beyla" - "BoringCrypto" - "CentOS" - "CloudWatch" - - "CMS" - "Codespaces" - "Data Firehose" - "Databricks" @@ -23,6 +30,7 @@ - "EKS" - "Elastic Kubernetes Service" - "Firehose" + - "FreeBSD" - "GEM" - "GKE" - "Git" @@ -31,16 +39,20 @@ - "Grafana" - "Gravatar" - "Graylog" + - "hashmod" - "IBM" - "Jaeger" - "Jira" + - "journald" - "Jsonnet" - "Kibana" - "Killercoda" - "Kinesis" - "Kubernetes" - "Kubernetes Engine" + - "Kustomize" - "LangChain" + - "launchd" - "Loki" - "Markdown" - "Memcached" @@ -60,6 +72,7 @@ - "Podman" - "Postgres" - "PostgreSQL" + - "pprof" - "Prometheus" - "Promtail" - "Pyroscope" @@ -68,8 +81,11 @@ - "Relational Database Service" - "React" - "Redis" + - "RHEL" - "Rollup" - "Splunk" + - "SSM" + - "SUSE" - "Tempo" - "Thanos" - "Velero" @@ -79,8 +95,10 @@ - "windows_exporter" - "Zipkin" - "ACL" + - "ADOT" - "API" - "APT" + - "ARN" - "AWS" - "BPF" - "CDN" @@ -92,6 +110,7 @@ - "CRD" - "CSS" - "CSV" + - "DNS" - "DOM" - "eBPF" - "EKS" @@ -101,6 +120,7 @@ - "GEM" - "GKE" - "GNU" + - "GPG" - "GPU" - "GUI" - "HTML" @@ -117,6 +137,7 @@ - "LCP" - "LESS" - "LLM" + - "NAT" - "OSS" - "OTLP" - "PDF" @@ -128,6 +149,7 @@ - "RBAC" - "RDS" - "REPL" + - "RHEL" - "RPM" - "RSA" - "SCM" @@ -141,9 +163,11 @@ - "SQL" - "SRE" - "SSD" + - "SSM" - "SSH" - "SSL" - "SSO" + - "SUSE" - "SUT" - "SVG" - "TCP" @@ -281,8 +305,8 @@ "message": | Use sentence-style capitalization for '%s'. - If your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/styles/GrafanaHeadings.yml for them to be considered correctly cased. - Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. + + If your heading contains capitalized words that represent product names, you need to add those words to the Grafana dictionary or the list of static exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Headings.jsonnet for them to be considered correctly cased. "scope": "heading" "threshold": 0.29999999999999999 diff --git a/vale/Headings.jsonnet b/vale/Headings.jsonnet index 9aa1272f7..9d4f89922 100644 --- a/vale/Headings.jsonnet +++ b/vale/Headings.jsonnet @@ -1,7 +1,74 @@ +local static_exceptions = [ + 'Adaptive Metrics', + 'Ansible', + 'Application Observability', + 'AWS Observability', + 'AzureAD', + 'Beyla', + 'BoltDB', + 'Cloud Logs', + 'Cloud Metrics', + 'Cloud Traces', + 'Cluster', + 'Frontend Observability', + 'Generic OAuth', + 'GitHub', + 'GitLab', + 'Google', + 'GKE Autopilot', + 'Grafana', + 'Grafana Agent', + 'Grafana Agent Flow', + 'Grafana Cloud', + 'Grafana Cloud Traces', + 'Grafana Enterprise Logs', + 'Grafana Enterprise Metrics', + 'Grafana Enterprise Traces', + 'Grafana Labs', + 'Graylog', + 'Helm', + 'Hugo', + 'IBM Cloud', + 'Kibana', + 'Kubernetes Monitoring', + 'LogQL', + 'Loki', + 'macOS', + 'Memcached', + 'Microsoft', + 'Mimir', + 'Node Exporter', + 'OAuth', + 'Okta', + 'OpenCost', + 'OpenTelemetry', + 'OpenTelemetry Collector', + 'Personally Identifiable Information', + 'Prometheus', + 'PromQL', + 'Promtail', + 'Pyroscope', + 'Redis', + 'Service Level Objective', + 'Tempo', + 'Terraform', + 'Thanos', + 'TraceQL', + 'WebSockets', + "What's new", + "Writers' Toolkit", + 'YouTube', +]; local defs = (import './dictionary.libsonnet').words; std.manifestYamlDoc({ extends: 'capitalization', - message: "Use sentence-style capitalization for '%s'.\n\nIf your heading contains capitalized words that represent product names, you need to add those words as exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Grafana/styles/GrafanaHeadings.yml for them to be considered correctly cased.\n\nVale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word.\n", + message: ||| + Use sentence-style capitalization for '%s'. + + Vale considers multi-word exceptions such as _Grafana Enterprise Metrics_ as a single correctly cased word. + + If your heading contains capitalized words that represent product names, you need to add those words to the Grafana dictionary or the list of static exceptions in https://github.com/grafana/writers-toolkit/blob/main/vale/Headings.jsonnet for them to be considered correctly cased. + |||, link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings', level: 'warning', scope: 'heading', @@ -27,66 +94,5 @@ std.manifestYamlDoc({ def.elaboration for def in defs if ('abbreviation' in def && def.abbreviation) && ('elaboration' in def && std.any(std.map(function(c) local cp = std.codepoint(c); cp >= 65 && cp < 97, std.stringChars(def.elaboration)))) - ] + - [ - 'Adaptive Metrics', - 'Ansible', - 'Application Observability', - 'AWS Observability', - 'AzureAD', - 'Beyla', - 'BoltDB', - 'Cloud Logs', - 'Cloud Metrics', - 'Cloud Traces', - 'Cluster', - 'Frontend Observability', - 'Generic OAuth', - 'GitHub', - 'GitLab', - 'Google', - 'GKE Autopilot', - 'Grafana', - 'Grafana Agent', - 'Grafana Agent Flow', - 'Grafana Cloud', - 'Grafana Cloud Traces', - 'Grafana Enterprise Logs', - 'Grafana Enterprise Metrics', - 'Grafana Enterprise Traces', - 'Grafana Labs', - 'Graylog', - 'Helm', - 'Hugo', - 'IBM Cloud', - 'Kibana', - 'Kubernetes Monitoring', - 'LogQL', - 'Loki', - 'macOS', - 'Memcached', - 'Microsoft', - 'Mimir', - 'Node Exporter', - 'OAuth', - 'Okta', - 'OpenCost', - 'OpenTelemetry', - 'OpenTelemetry Collector', - 'Personally Identifiable Information', - 'Prometheus', - 'PromQL', - 'Promtail', - 'Pyroscope', - 'Redis', - 'Service Level Objective', - 'Tempo', - 'Terraform', - 'Thanos', - 'TraceQL', - 'WebSockets', - "What's new", - "Writers' Toolkit", - 'YouTube', - ], + ] + static_exceptions, }) diff --git a/vale/dictionary/a.jsonnet b/vale/dictionary/a.jsonnet index 0a0509e0c..ae3392985 100644 --- a/vale/dictionary/a.jsonnet +++ b/vale/dictionary/a.jsonnet @@ -1,7 +1,7 @@ local word = import './word.jsonnet'; [ word.new('ACL', 'S', 'noun') { abbreviation: true }, - word.new('ADOT', '', 'noun') { abbreviation: true, description: 'AWS Distro for OpenTelemetry', established_abbreviation: true product: true }, + word.new('ADOT', '', 'noun') { abbreviation: true, description: 'AWS Distro for OpenTelemetry', established_abbreviation: true, product: true }, word.new('AI Observability', '', 'noun') { product: true, swaps: { 'Grafana AI observability': 'Grafana AI Observability' } }, word.new('Adaptive Metrics', '', 'noun') { swaps: { '\\b(?:[aA]daptive metrics|adaptive Metrics)\\b': 'Adaptive Metrics' } }, word.new('Aerospike', '', 'noun'), diff --git a/vale/dictionary/c.jsonnet b/vale/dictionary/c.jsonnet index fe26a7d71..a544b5037 100644 --- a/vale/dictionary/c.jsonnet +++ b/vale/dictionary/c.jsonnet @@ -10,6 +10,7 @@ local word = import './word.jsonnet'; word.new('CLI', '', 'noun') { abbreviation: true, established_abbreviation: true }, word.new('CloudWatch', '', 'noun') { Amazon: true, product: true }, word.new('CLS', '', 'noun') { abbreviation: true, elaboration: 'Cumulative Layout Shift' }, + word.new('CMS', '', 'noun') { abbreviation: true, elaboration: 'content management system' }, word.new('codespace', 'S', 'noun') { description: "A codespace is a development environment that's hosted in the cloud. https://docs.github.com/en/codespaces/overview" }, word.new('Codespaces', '', 'noun') { description: 'GitHub Codespaces https://docs.github.com/en/codespaces/overview', product: true }, word.new('composable', '', 'adjective'), diff --git a/vale/dictionary/f.jsonnet b/vale/dictionary/f.jsonnet index 58c185f1a..c94970f25 100644 --- a/vale/dictionary/f.jsonnet +++ b/vale/dictionary/f.jsonnet @@ -7,6 +7,6 @@ local word = import './word.jsonnet'; word.new('filename', 'S', 'noun') { swaps: { 'file name': 'filename', 'file names': 'filenames' } }, word.new('Firehose', 'M', 'noun') { Amazon: true, product: true }, word.new('firewall rules', '', 'noun') { swaps: { firewalls: 'firewall rules' } }, - word.new('FreeBSD', '', 'noun'), { description: 'FreeBSD operating system', product: true } + word.new('FreeBSD', '', 'noun') { description: 'FreeBSD operating system', product: true }, word.new('frontend', 'S', 'noun') { swaps: { 'front[ -]end': 'frontend', 'front[ -]ends': 'frontends' } }, ] diff --git a/vale/dictionary/r.jsonnet b/vale/dictionary/r.jsonnet index e22d86b00..d5cac9d8d 100644 --- a/vale/dictionary/r.jsonnet +++ b/vale/dictionary/r.jsonnet @@ -16,7 +16,7 @@ local word = import './word.jsonnet'; word.new('retry', 'DGS', 'verb'), word.new('retryable', '', 'adjective'), word.new('REPL', '', 'noun') { abbreviation: true, elaboration: 'read-eval-print loop', established_abbreviation: true }, - word.new('RHEL', '', 'noun') { abbreviation: true, description: 'RedHat Enterprise Linux', established_abbreviation: true product: true }, + word.new('RHEL', '', 'noun') { abbreviation: true, description: 'RedHat Enterprise Linux', established_abbreviation: true, product: true }, word.new('rollout', 'S', 'noun'), word.new('Rollup', '', 'noun') { description: 'The JavaScript module bundler (https://rollupjs.org/)', product: true }, word.new('RPM', '', 'noun') { abbreviation: true, description: 'https://en.wikipedia.org/wiki/RPM_Package_Manager', elaboration: 'RPM Package Manager', established_abbreviation: true }, diff --git a/vale/dictionary/s.jsonnet b/vale/dictionary/s.jsonnet index 0b7ada8d2..cb2548f81 100644 --- a/vale/dictionary/s.jsonnet +++ b/vale/dictionary/s.jsonnet @@ -24,7 +24,7 @@ local word = import './word.jsonnet'; word.new('SQLite', '', 'noun') { swaps: { sqlite: 'SQLite' } }, word.new('SRE', 'S', 'noun') { abbreviation: true, elaboration: 'site reliability engineering' }, word.new('SSD', 'S', 'noun') { abbreviation: true, elaboration: 'solid-state drive', established_abbreviation: true }, - word.new('SSM', '', 'noun') { Amazon: true, abbreviation: true, description: 'Amazon Services Systems Manager', established_abbreviation: true product: true }, + word.new('SSM', '', 'noun') { Amazon: true, abbreviation: true, description: 'Amazon Services Systems Manager', established_abbreviation: true, product: true }, word.new('SSH', '', 'noun') { abbreviation: true, elaboration: 'Secure Shell', established_abbreviation: true }, word.new('SSL', '', 'noun') { abbreviation: true, elaboration: 'Secure Sockets Layer', established_abbreviation: true }, word.new('SSO', '', 'noun') { abbreviation: true, elaboration: 'single sign-on', established_abbreviation: true }, @@ -33,7 +33,7 @@ local word = import './word.jsonnet'; word.new('subnet', 'S', 'noun'), word.new('subquery', 'S', 'noun'), word.new('subtask', 'S', 'noun'), - word.new('SUSE', '', 'noun') { abbreviation: true, description: 'SUSE Linux', established_abbreviation: true product: true }, + word.new('SUSE', '', 'noun') { abbreviation: true, description: 'SUSE Linux', established_abbreviation: true, product: true }, word.new('SUT', '', 'noun') { abbreviation: true, elaboration: 'System Under Test' }, word.new('SVG', '', 'noun') { abbreviation: true, elaboration: 'Scalable Vector Graphics', established_abbreviation: true }, word.new('sync', 'DG', 'verb') { swaps: { synch: 'sync', synched: 'synced', synching: 'syncing' } },