diff --git a/.codespellexclude b/.codespellexclude new file mode 100644 index 000000000..e69de29bb diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 000000000..e6280f217 --- /dev/null +++ b/.codespellignore @@ -0,0 +1 @@ +NAM \ No newline at end of file diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 3e3727922..c17369f44 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -46,4 +46,13 @@ jobs: 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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/ci/linting_requirements.txt b/ci/linting_requirements.txt index 8dfa68b07..72b7325fd 100644 --- a/ci/linting_requirements.txt +++ b/ci/linting_requirements.txt @@ -12,4 +12,6 @@ flake8-requirements==2.2.1 flake8-rst-docstrings==0.2.7 doc8==1.0.0 -restructuredtext_lint==1.4.0 \ No newline at end of file +restructuredtext_lint==1.4.0 + +codespell==2.3.0 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 662c958db..601b92b14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,11 @@ extras = [ "Bug Tracker" = "https://github.com/Unidata/siphon/issues" "Source Code" = "https://github.com/Unidata/siphon" +[tool.codespell] +skip = "*.ipynb,*.pdf,.git,./docs/build,./docs/examples,./tests/fixtures,./tests/cdmr/fixtures,AUTHORS.txt" +exclude-file = ".codespellexclude" +ignore-words = ".codespellignore" + [tool.doc8] ignore-path = ["docs/build", "docs/api/generated", "docs/_templates", "docs/examples"] file-encoding = "utf8"