Skip to content

Commit 922a36d

Browse files
authored
Add typos as a pre-commit hook (#168)
* Add pre-commit hooks * Add _typos.toml * Exclude _typos.toml from codespell * Exclude plugins from typos check * Fix pre-commit config
1 parent 4538e1c commit 922a36d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ repos:
2727
args: [--write-changes]
2828
additional_dependencies:
2929
- tomli
30+
exclude: _typos.toml
31+
32+
- repo: https://github.com/crate-ci/typos
33+
rev: v1.22.0
34+
hooks:
35+
- id: typos
36+
name: typos (add false positives to _typos.toml)
37+
exclude: plugins
3038

3139
- repo: https://github.com/python-jsonschema/check-jsonschema
3240
rev: 0.28.4

_typos.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[default]
2+
3+
[default.extend-words]
4+
nd = "nd"

0 commit comments

Comments
 (0)