Skip to content

Commit e02448a

Browse files
cristimclaude
andauthored
chore(pre-commit): arm the pre-push hooks on a plain install (#2223)
default_stages includes pre-push, but without default_install_hook_types a plain `pre-commit install` wired only the pre-commit git hook, so the pre-push stage (including go test -short -race) silently never ran locally. Set default_install_hook_types and update the hook comment that told developers to pass --hook-type pre-push. Closes #1113 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent c877d28 commit e02448a

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ repos:
187187
# is run by ci.yml's `unit-tests` job with -race AND an integration pass
188188
# with -tags=integration.
189189
#
190-
# Moving it to the pre-push stage keeps the local safety net (devs who
191-
# run `pre-commit install --hook-type pre-push` still get it on `git
192-
# push`) while letting the CI pre-commit workflow stay focused on
193-
# style/security/syntax. Pre-commit's default stage filter is
190+
# Moving it to the pre-push stage keeps the local safety net (a plain
191+
# `pre-commit install` arms pre-push too, via default_install_hook_types,
192+
# so devs get it on `git push`) while letting the CI pre-commit workflow
193+
# stay focused on style/security/syntax. Pre-commit's default stage filter is
194194
# `pre-commit`, so the CI workflow's `pre-commit run --all-files` skips
195195
# this hook automatically.
196196
- repo: local
@@ -205,4 +205,5 @@ repos:
205205

206206
# Global configuration
207207
default_stages: [pre-commit, pre-push]
208+
default_install_hook_types: [pre-commit, pre-push]
208209
fail_fast: false

0 commit comments

Comments
 (0)