Skip to content

Commit

Permalink
pre-commit: check toml, rst, yml and .in files (#2636)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeweerd authored Dec 9, 2022
1 parent f010d35 commit 26c7d2d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codespell-private.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- run: codespell --version
- run: make check
- uses: codecov/codecov-action@v3
- run: codespell --check-filenames --skip="./.git/*,*.pyc,./codespell_lib/tests/test_basic.py,./codespell_lib/data/*,./example/code.c,./build/lib/codespell_lib/tests/test_basic.py,./build/lib/codespell_lib/data/*,README.rst,*.egg-info/*"
- run: codespell --check-filenames --skip="./.git/*,*.pyc,./codespell_lib/tests/test_basic.py,./codespell_lib/data/*,./example/code.c,./build/lib/codespell_lib/tests/test_basic.py,./build/lib/codespell_lib/data/*,README.rst,*.egg-info/*,pyproject-codespell.precommit-toml"
# this file has an error
- run: "! codespell codespell_lib/tests/test_basic.py"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
with:
check_filenames: true
# When using this Action in other repos, the --skip option below can be removed
skip: "./.git,./codespell_lib/data,./example/code.c,test_basic.py,*.pyc,README.rst"
skip: "./.git,./codespell_lib/data,./example/code.c,test_basic.py,*.pyc,README.rst,pyproject-codespell.precommit-toml"
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
files: ^(.*\.(py|json|md|sh|yaml|cfg|txt))$
files: ^(.*\.(py|json|md|sh|yaml|yml|in|cfg|txt|rst|toml|precommit-toml))$
exclude: ^(\.[^/]*cache/.*)$
repos:
- repo: https://github.com/executablebooks/mdformat
Expand All @@ -21,6 +21,10 @@ repos:
- mdformat-black
- mdformat-web
- mdformat-gfm
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
rev: v1.0.1
hooks:
- id: rst-linter
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
Expand Down Expand Up @@ -56,7 +60,7 @@ repos:
- -d
- '{extends: relaxed, rules: {line-length: {max: 90}}}'
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 22.12.0
hooks:
- id: black
- repo: https://github.com/Lucas-C/pre-commit-hooks-bandit
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ exclude .git-blame-ignore-revs
exclude example example/* snap snap/* tools tools/*
exclude Makefile
exclude codespell.1.include
exclude pyproject-codespell.precommit-toml
exclude pyproject-codespell.precommit-toml
2 changes: 1 addition & 1 deletion pyproject-codespell.precommit-toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
#builtin = ["clear","rare","informal","usage","code","names"]
builtin = "clear,rare,informal,usage,code,names"
#ignore-words-list = ["uint"]
ignore-words-list = "uint"
ignore-words-list = "adn,master,uint"
#skip=[ "./.*","codespell_lib/data/*","codespell_lib/tests/*"]
skip="./.*,codespell_lib/data/*,codespell_lib/tests/*"

0 comments on commit 26c7d2d

Please sign in to comment.