From 088fa3b44cd104102e5de94afed2dee888232da5 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sun, 2 Jul 2023 16:47:31 +0200 Subject: [PATCH] codespell: workflow, config + 1 single uno only typo fixed! (#426) * Add github action to codespell main on push and PRs * Add rudimentary codespell config * Add pre-commit definition for codespell * Fixed a single typo codespell identifier --- .github/workflows/codespell.yml | 22 ++++++++++++++++++++++ .pre-commit-config.yaml | 7 +++++++ benchmark/RESULTS.md | 2 +- pyproject.toml | 5 +++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..3ebbf55 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,22 @@ +--- +name: Codespell + +on: + push: + branches: [main] + pull_request: + branches: [main] + +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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2bc8970..fa50906 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,3 +31,10 @@ repos: - id: detect-private-key - id: end-of-file-fixer - id: trailing-whitespace + +- repo: https://github.com/codespell-project/codespell + rev: v2.2.5 + hooks: + - id: codespell + additional_dependencies: + - tomli diff --git a/benchmark/RESULTS.md b/benchmark/RESULTS.md index 5e39d2e..6125b30 100644 --- a/benchmark/RESULTS.md +++ b/benchmark/RESULTS.md @@ -74,6 +74,6 @@ failing tests, 'WebDriver' object has no attribute 'find_element_by_id' pomodoro: doesn't run it only tests -currency_converter: backend doesnt return anything +currency_converter: backend doesn't return anything weather_app only runs test, no code existed diff --git a/pyproject.toml b/pyproject.toml index d6a00f0..d7ff26f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,3 +99,8 @@ exclude = ''' )/ ) ''' + +[tool.codespell] +skip = '.git,*.pdf,*.svg' +# +# ignore-words-list = ''