mirror of https://github.com/astral-sh/ruff
Fix pre-commit typos action (#4876)
The typos pre-commit action would also edit test fixtures and snapshots. Unfortunately the pre-commit action also doesn't respect _typos.toml and typos action doesn't allow for an exclude key, so i've added a top level exclude key. I have confirmed that this does stop typos from rewriting my fixtures and snapshots
This commit is contained in:
parent
7b0fb1a3b4
commit
775326790e
|
|
@ -1,4 +1,12 @@
|
||||||
fail_fast: true
|
fail_fast: true
|
||||||
|
|
||||||
|
exclude: |
|
||||||
|
(?x)^(
|
||||||
|
crates/ruff/resources/.*|
|
||||||
|
crates/ruff_python_formatter/resources/.*|
|
||||||
|
crates/ruff_python_formatter/src/snapshots/.*
|
||||||
|
)$
|
||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/abravalheri/validate-pyproject
|
- repo: https://github.com/abravalheri/validate-pyproject
|
||||||
rev: v0.12.1
|
rev: v0.12.1
|
||||||
|
|
@ -19,7 +27,7 @@ repos:
|
||||||
- id: markdownlint-fix
|
- id: markdownlint-fix
|
||||||
|
|
||||||
- repo: https://github.com/crate-ci/typos
|
- repo: https://github.com/crate-ci/typos
|
||||||
rev: v1.14.8
|
rev: v1.14.12
|
||||||
hooks:
|
hooks:
|
||||||
- id: typos
|
- id: typos
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
[files]
|
[files]
|
||||||
extend-exclude = ["snapshots", "black"]
|
extend-exclude = ["resources", "snapshots"]
|
||||||
|
|
||||||
[default.extend-words]
|
[default.extend-words]
|
||||||
trivias = "trivias"
|
trivias = "trivias"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue