Skip to content

Commit 7444536

Browse files
authored
Add spell check tools, refs #682 (#685)
1 parent b13e9ec commit 7444536

5 files changed

Lines changed: 66 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ repos:
4141
args: ["--config=.github/bake.toml"]
4242
- id: mbake-validate
4343

44+
- repo: https://github.com/crate-ci/typos
45+
rev: v1.46.1
46+
hooks:
47+
- id: typos
48+
49+
- repo: https://github.com/codespell-project/codespell
50+
rev: v2.4.2
51+
hooks:
52+
- id: codespell
53+
additional_dependencies:
54+
- tomli
55+
4456
- repo: https://github.com/pre-commit/pre-commit-hooks
4557
rev: v6.0.0
4658
hooks:

pyproject.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,23 @@ enable_error_code = [
171171
"unimported-reveal",
172172
"deprecated",
173173
]
174+
175+
176+
[tool.codespell]
177+
# codespell configuration: https://github.com/codespell-project/codespell
178+
skip = [
179+
"__pycache__",
180+
"_build",
181+
".mypy_cache",
182+
"*.lock",
183+
]
184+
185+
186+
[tool.typos.files]
187+
# typos configuration: https://github.com/crate-ci/typos/
188+
extend-exclude = [
189+
"__pycache__",
190+
"_build",
191+
".mypy_cache",
192+
"*.lock",
193+
]

tests/test_project_generation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_pyproject_toml(cookies: Cookies, context: dict[str, str]) -> None:
108108
('prompt', 'entered_value'),
109109
[
110110
('project_name', 'myProject'),
111-
('project_name', '43prject'),
111+
('project_name', '43project'),
112112
('project_name', '_test'),
113113
('project_name', '-test'),
114114
('project_name', 'test-'),

{{cookiecutter.project_name}}/.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ repos:
2525
hooks:
2626
- id: shellcheck
2727
args: ["--severity=style"]
28+
2829
- repo: https://github.com/astral-sh/ruff-pre-commit
2930
rev: v0.14.11
3031
hooks:
@@ -46,6 +47,18 @@ repos:
4647
args: ["--config=.github/bake.toml"]
4748
- id: mbake-validate
4849

50+
- repo: https://github.com/crate-ci/typos
51+
rev: v1.46.1
52+
hooks:
53+
- id: typos
54+
55+
- repo: https://github.com/codespell-project/codespell
56+
rev: v2.4.2
57+
hooks:
58+
- id: codespell
59+
additional_dependencies:
60+
- tomli
61+
4962
- repo: https://github.com/pre-commit/pre-commit-hooks
5063
rev: v6.0.0
5164
hooks:

{{cookiecutter.project_name}}/pyproject.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,23 @@ enable_error_code = [
179179
"unimported-reveal",
180180
"deprecated",
181181
]
182+
183+
184+
[tool.codespell]
185+
# codespell configuration: https://github.com/codespell-project/codespell
186+
skip = [
187+
"__pycache__",
188+
"_build",
189+
".mypy_cache",
190+
"*.lock",
191+
]
192+
193+
194+
[tool.typos.files]
195+
# typos configuration: https://github.com/crate-ci/typos/
196+
extend-exclude = [
197+
"__pycache__",
198+
"_build",
199+
".mypy_cache",
200+
"*.lock",
201+
]

0 commit comments

Comments
 (0)