From ae5cd7f060b1f40b2ae87505b9f8f3d40413bb06 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 5 Sep 2023 13:03:03 -0400 Subject: [PATCH 1/3] Add github action to codespell master on push and PRs --- .github/workflows/codespell.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..7373affc --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,22 @@ +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From f2b7eb9f669c6e82905b9023a582c0934dd13d64 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 5 Sep 2023 13:03:03 -0400 Subject: [PATCH 2/3] Add rudimentary codespell config --- .codespellrc | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..cebf9aa2 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = .git,*.pdf,*.svg,venvs +# +# ignore-words-list = From 273388bc5cda110ab1ed7cee0c5896ace0be55e8 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 5 Sep 2023 13:03:03 -0400 Subject: [PATCH 3/3] Add pre-commit definition for codespell --- .pre-commit-config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c429bfa6..0bc50cbd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,3 +12,7 @@ repos: rev: 19.3b0 hooks: - id: black +- repo: https://github.com/codespell-project/codespell + rev: v2.2.5 + hooks: + - id: codespell