From d4be23b0b7b21c2865ff34c9c97ecfe7e0b5f904 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 18 Sep 2024 08:29:16 -0400 Subject: [PATCH 1/3] Add github action to codespell master on push and PRs --- .github/workflows/codespell.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 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 000000000..e21712e4b --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,25 @@ +# Codespell configuration is within pyproject.toml +--- +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@v4 + - name: Annotate locations with typos + uses: codespell-project/codespell-problem-matcher@v1 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From e7268e89043fb7890e5ce6d1c5a2098c8a018069 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 18 Sep 2024 08:29:16 -0400 Subject: [PATCH 2/3] Add rudimentary codespell config --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 5d8b689e2..e2d0d9416 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -132,3 +132,10 @@ exclude_lines = [ "if __name__ == .__main__.:", "if TYPE_CHECKING:", ] + +[tool.codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = '.git*,*.svg,venv,*.css' +check-hidden = true +# ignore-regex = '' +# ignore-words-list = '' From d39044091e14aa01de8fae573955e02cfd14310b Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 18 Sep 2024 08:30:08 -0400 Subject: [PATCH 3/3] Ignore one word from codespell present in nginx.conf --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e2d0d9416..8c6f0748e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -137,5 +137,5 @@ exclude_lines = [ # Ref: https://github.com/codespell-project/codespell#using-a-config-file skip = '.git*,*.svg,venv,*.css' check-hidden = true -# ignore-regex = '' +ignore-regex = '\baNULL\b' # ignore-words-list = ''