From d0257318fee0683d4b9e026f6e7606b8912eded4 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 20 Dec 2023 23:21:49 +0000 Subject: [PATCH] chore: error on cspell issues in docs (#3886) # Description ## Problem\* Resolves ## 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. --- .github/workflows/spellcheck.yml | 32 +++++++++++++++++++++++++++++--- cspell.json | 4 ++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 89fcdd12d12..83d67325775 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -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 diff --git a/cspell.json b/cspell.json index d8f04ed6069..9b6ea53f9b2 100644 --- a/cspell.json +++ b/cspell.json @@ -124,6 +124,7 @@ "srem", "stdlib", "struct", + "structs", "subexpression", "subshell", "subtyping", @@ -148,5 +149,8 @@ "wasi", "Weierstraß", "zshell" + ], + "ignorePaths": [ + "./**/node_modules/**" ] }