diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index bcdefbcc4f8..f9042f999e4 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -16,7 +16,7 @@ jobs: with: python-version: 3.x - - name: Install flake8 + - name: Install linting tools run: python -m pip install -r ci/linting_requirements.txt - name: Set up reviewdog @@ -40,4 +40,14 @@ jobs: env: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + set -o pipefail doc8 docs | reviewdog -efm='%f:%l: %m' -name=doc8 -reporter=github-check -filter-mode=nofilter + + - name: Run codespell + # Don't skip codespell if any other steps fail + if: ${{ always() }} + env: + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -o pipefail + codespell | reviewdog -efm='%f:%l: %m' -name=codespell -reporter=github-check -filter-mode=nofilter diff --git a/ci/linting_requirements.txt b/ci/linting_requirements.txt index 53cf4fe8023..82e934a539d 100644 --- a/ci/linting_requirements.txt +++ b/ci/linting_requirements.txt @@ -21,3 +21,5 @@ pydocstyle==6.1.1 doc8==0.8.1 restructuredtext_lint==1.3.2 + +codespell==2.1.0 diff --git a/setup.cfg b/setup.cfg index 3645f2efd5d..7641c8d0ee9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -113,3 +113,7 @@ max-line-length = 95 match = (?!(test_|setup)).*\.py match-dir = (?!(build|docs|examples|tutorials|_nexrad_msgs))[^.].* convention = numpy + +[codespell] +skip = *.tbl,*.ipynb,AUTHORS.txt,gempak.rst,.git,./staticdata,./docs/build +ignore-words-list = pres,thta