Skip to content

Commit

Permalink
chore: error on cspell issues in docs (#3886)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

This PR updates the spellcheck workflow to run a separate pass over the
docs which will error rather than raising a warning. This is as it's
more important to catch spelling issues in the docs rather than in the
code (plus the docs is going to use fewer non-standard-english library
names, etc. so false positives will be rarer.

## Additional Context



## Documentation\*

Check one:
- [ ] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [ ] I have tested the changes locally.
- [ ] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench authored Dec 20, 2023
1 parent b8c7078 commit d025731
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,32 @@ concurrency:
cancel-in-progress: true

jobs:
spellcheck:
name: Spellcheck
uses: noir-lang/.github/.github/workflows/spellcheck.yml@main
code:
name: Code
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Check spelling
uses: streetsidesoftware/cspell-action@v2
with:
strict: false # Do not fail, if a spelling mistake is found (This can be annoying for contributors)
incremental_files_only: true # Run this action on files which have changed in PR
files: |
**/*.{md,rs}
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Check spelling
uses: streetsidesoftware/cspell-action@v2
with:
strict: true # Documentation has higher standards for correctness.
incremental_files_only: true # Run this action on files which have changed in PR
files: |
./docs/**/*.md
4 changes: 4 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
"srem",
"stdlib",
"struct",
"structs",
"subexpression",
"subshell",
"subtyping",
Expand All @@ -148,5 +149,8 @@
"wasi",
"Weierstraß",
"zshell"
],
"ignorePaths": [
"./**/node_modules/**"
]
}

0 comments on commit d025731

Please sign in to comment.