Skip to content

Commit

Permalink
Merge pull request #17 from ninerealmlabs/fix/typos
Browse files Browse the repository at this point in the history
fix: exclude '.git*' files from spellchecks
  • Loading branch information
ahgraber authored Jun 8, 2024
2 parents 9aaebe7 + e8dcfeb commit db8e14f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,16 @@ repos:
### in order for typos pre-commit hook to read it.
### In this case, comment out this block until ".typos.toml" has been committed successfully
- repo: https://github.com/crate-ci/typos
rev: "v1.22.1"
rev: "v1.22.2"
hooks:
- id: typos
name: Spellcheck with Typos
args: ["--config", ".typos.toml"]
exclude: |
(?x)^(
# need to include typos configs in templates/ as well
^.*(\.typos\.toml).*$
^.*(\.typos\.toml).*$ |
^.*(\.git.*)$
)$
stages: [commit]
- repo: https://github.com/adrienverge/yamllint.git
Expand Down
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ extend-exclude = [
"*.typos.toml*",
"*_typos.toml*",
"*typos.toml*",
"*.git*",
]
ignore-hidden = false # ignore hidden files/dirs
ignore-files = true # respect ignore files
Expand Down
5 changes: 3 additions & 2 deletions template/.pre-commit-config.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,15 @@ repos:
### in order for typos pre-commit hook to read it.
### In this case, comment out this block until ".typos.toml" has been committed successfully
- repo: https://github.com/crate-ci/typos
rev: "v1.21.0"
rev: "v1.22.2"
hooks:
- id: typos
name: Spellcheck with Typos
args: ["--config", ".typos.toml"]
exclude: |
(?x)^(
^.*(\.typos\.toml)$
^.*(\.typos\.toml)$ |
^.*(\.git.*)$
)$
stages: [commit]
{%- endif %}{% if yamllint %}
Expand Down

0 comments on commit db8e14f

Please sign in to comment.