diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea15529e7681..72c76171818f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,10 +9,19 @@ repos: - id: trailing-whitespace # rustfmt handles rust files, and in some snapshots we expect trailing spaces. exclude: '.*\.(rs|snap)$' - - repo: https://github.com/crate-ci/typos - rev: v1 + # A local hook rather than the crate-ci/typos repo hook: that repo's moving + # tags (`v1`, `typos-dict-*`) make autoupdate rewrite any pinned rev back to + # a mutable reference (#5481 and #5510 both pinned; the next autoupdate + # reverted each). A local hook has no rev, so the pin below sticks. + - repo: local hooks: - id: typos + name: typos + language: python + additional_dependencies: ["typos==1.48.0"] + entry: typos + args: [--write-changes, --force-exclude] + types: [text] # https://github.com/crate-ci/typos/issues/347 pass_filenames: false - repo: https://github.com/rbubley/mirrors-prettier