Skip to content

Commit

Permalink
Add a Vale spelling rule
Browse files Browse the repository at this point in the history
Closes #46191

This change adds a Vale spelling rule that replaces the current cspell
workflow. The Vale spelling rule ignores spelling errors in code-style
text by default, and includes more configuration options for filtering
spelling errors. This also allows us to reduce the number of linting
workflows.

This change also adds a file containing words to ignore in the
spellcheck rule, based on the current `cspell.json`.

While this change introduces new spelling errors, we can remove these
incrementally, since the Vale spellchecker only flags issues in files
changed by a PR.

This change also configures the Vale spellcheck rule to ignore
abbreviations.

For consistency with the cspell configuration, this change ignores
spelling errors in Terraform and Kubernetes operator reference pages. To
do so, it adds the `{/* vale spelling.spelling = OFF */}` comment
directive in relevant auto-generated reference pages.
  • Loading branch information
ptgott committed Dec 18, 2024
1 parent b2dc107 commit de0631b
Show file tree
Hide file tree
Showing 67 changed files with 1,059 additions and 1,030 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/doc-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ jobs:
cat <<< "$(jq '.scripts."git-update" = "echo Skipping submodule update"' package.json)" > package.json
yarn build-node
- name: Check spelling
working-directory: 'docs'
run: yarn spellcheck content/teleport

- name: Lint docs formatting
working-directory: 'docs'
run: yarn markdown-lint
Expand All @@ -129,7 +125,7 @@ jobs:
- name: Run the linter
uses: errata-ai/vale-action@d89dee975228ae261d22c15adcd03578634d429c # v2.1.1
with:
version: 2.30.0
version: 3.8.0
# Take the comma-separated list of files returned by the "Check for
# relevant changes" job.
separator: ","
Expand Down
5 changes: 4 additions & 1 deletion docs/.vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ MinAlertLevel = suggestion
mdx = md

[*.md]
BasedOnStyles = messaging,examples,3rd-party-products,structure
BasedOnStyles = messaging,examples,3rd-party-products,structure,spelling
# Allow ignoring vale style rules in MDX comments
CommentDelimiters = '{/*,*/}'

Loading

0 comments on commit de0631b

Please sign in to comment.