diff options
-rw-r--r-- | .github/workflows/checks.yaml | 8 | ||||
-rw-r--r-- | .pre-commit-config.yaml | 11 | ||||
-rw-r--r-- | pylintrc | 2 |
3 files changed, 18 insertions, 3 deletions
diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 27f7b26bd..b0e9aa6b2 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -114,14 +114,18 @@ jobs: run: | echo "Failed to restore pre-commit environment from cache" exit 1 + - name: Install enchant and aspell + run: | + sudo apt-get update + sudo apt-get install enchant aspell-en - name: Run pylint checks run: | . venv/bin/activate pip install -e . - pre-commit run pylint --all-files + pre-commit run --hook-stage manual pylint-with-spelling --all-files spelling: - name: spelling + name: spelling tests runs-on: ubuntu-latest timeout-minutes: 5 needs: prepare-base diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 68562346b..ccf6ddd14 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -63,6 +63,17 @@ repos: types: [python] args: ["-rn", "-sn", "--rcfile=pylintrc", "--fail-on=I"] exclude: tests/functional/|tests/input|tests(/\w*)*data/|doc/ + # We define an additional manual step to allow running pylint with a spelling + # checker in CI. + - id: pylint + alias: pylint-with-spelling + name: pylint + entry: pylint + language: system + types: [python] + args: ["-rn", "-sn", "--rcfile=pylintrc", "--fail-on=I", "--spelling-dict=en"] + exclude: tests/functional/|tests/input|tests(/\w*)*data/|doc/ + stages: [manual] - id: fix-documentation name: Fix documentation entry: python3 -m script.fix_documentation @@ -392,7 +392,7 @@ missing-member-max-choices=1 # Spelling dictionary name. Available dictionaries: none. To make it working # install python-enchant package. -spelling-dict=en_US +spelling-dict= # List of comma separated words that should not be checked. spelling-ignore-words= |