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 Oct 25, 2024
1 parent 458a32a commit a52ff2d
Show file tree
Hide file tree
Showing 69 changed files with 1,061 additions and 1,020 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/doc-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ jobs:
yarn install
yarn build-node
- name: Check spelling
run: cd $GITHUB_WORKSPACE/docs && yarn spellcheck content/teleport

- name: Lint the docs
run: cd $GITHUB_WORKSPACE/docs && yarn markdown-lint

Expand All @@ -111,7 +108,7 @@ jobs:
- name: Run the linter
uses: errata-ai/vale-action@38bf078c328061f59879b347ca344a718a736018 # v2.1.0
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 a52ff2d

Please sign in to comment.