diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3ca0e1f..3ca4889 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,6 +41,18 @@ repos: args: ["--config=.github/bake.toml"] - id: mbake-validate + - repo: https://github.com/crate-ci/typos + rev: v1.46.1 + hooks: + - id: typos + + - repo: https://github.com/codespell-project/codespell + rev: v2.4.2 + hooks: + - id: codespell + additional_dependencies: + - tomli + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index d02057b..4f2a82d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -171,3 +171,23 @@ enable_error_code = [ "unimported-reveal", "deprecated", ] + + +[tool.codespell] +# codespell configuration: https://github.com/codespell-project/codespell +skip = [ + "__pycache__", + "_build", + ".mypy_cache", + "*.lock", +] + + +[tool.typos.files] +# typos configuration: https://github.com/crate-ci/typos/ +extend-exclude = [ + "__pycache__", + "_build", + ".mypy_cache", + "*.lock", +] diff --git a/tests/test_project_generation.py b/tests/test_project_generation.py index 4d924cc..c4aac64 100644 --- a/tests/test_project_generation.py +++ b/tests/test_project_generation.py @@ -108,7 +108,7 @@ def test_pyproject_toml(cookies: Cookies, context: dict[str, str]) -> None: ('prompt', 'entered_value'), [ ('project_name', 'myProject'), - ('project_name', '43prject'), + ('project_name', '43project'), ('project_name', '_test'), ('project_name', '-test'), ('project_name', 'test-'), diff --git a/{{cookiecutter.project_name}}/.pre-commit-config.yaml b/{{cookiecutter.project_name}}/.pre-commit-config.yaml index ac97119..93af3a1 100644 --- a/{{cookiecutter.project_name}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_name}}/.pre-commit-config.yaml @@ -25,6 +25,7 @@ repos: hooks: - id: shellcheck args: ["--severity=style"] + - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.14.11 hooks: @@ -46,6 +47,18 @@ repos: args: ["--config=.github/bake.toml"] - id: mbake-validate + - repo: https://github.com/crate-ci/typos + rev: v1.46.1 + hooks: + - id: typos + + - repo: https://github.com/codespell-project/codespell + rev: v2.4.2 + hooks: + - id: codespell + additional_dependencies: + - tomli + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: diff --git a/{{cookiecutter.project_name}}/pyproject.toml b/{{cookiecutter.project_name}}/pyproject.toml index 4ae9527..a632989 100644 --- a/{{cookiecutter.project_name}}/pyproject.toml +++ b/{{cookiecutter.project_name}}/pyproject.toml @@ -179,3 +179,23 @@ enable_error_code = [ "unimported-reveal", "deprecated", ] + + +[tool.codespell] +# codespell configuration: https://github.com/codespell-project/codespell +skip = [ + "__pycache__", + "_build", + ".mypy_cache", + "*.lock", +] + + +[tool.typos.files] +# typos configuration: https://github.com/crate-ci/typos/ +extend-exclude = [ + "__pycache__", + "_build", + ".mypy_cache", + "*.lock", +]