From 0e2831dfb17675fcc630757bdb83450478d3bcd9 Mon Sep 17 00:00:00 2001 From: Gustavo Valverde Date: Wed, 25 May 2022 20:27:44 -0400 Subject: [PATCH] feat(ci): add a codespell linting action (#4482) * feat(ci): add a codespell linting action * fix(ci): run this job if the lint workflow is changed * ci(codespell): add configuration file * ci(codespell): exclude mermaid.min.js * fix: wrong mermaid.min.js location * ci(codespell): Sur from "Big Sur" is being considered as misspelled * ci(codespell): make warning the max level This won't restrict PRs from merging * ci(codespell): lint on every push * test: create a misspelling * Revert "test: create a misspelling" This reverts commit a2c91cda1e6fab578acbd6612801bb9e2b2439a6. --- .codespellrc | 3 +++ .github/workflows/lint.yml | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..ac6ff6767 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +ignore-words-list=crate,Sur +exclude-file=book/mermaid.min.js diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1f3542e9e..391a5cd01 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,6 +33,7 @@ jobs: **/Cargo.lock clippy.toml .cargo/config.toml + .github/workflows/lint.yml - name: Workflow files id: changed-files-workflows @@ -118,3 +119,13 @@ jobs: with: level: warning fail_on_error: false + + codespell: + runs-on: ubuntu-latest + needs: changed-files + steps: + - uses: actions/checkout@v3.0.2 + - uses: plettich/action-codespell@master + with: + github_token: ${{ secrets.github_token }} + level: warning