From 11ea46b899fd2d17938c67e04b1df8ec0fbe98d2 Mon Sep 17 00:00:00 2001 From: Cristian Magherusan-Stanciu Date: Fri, 16 Oct 2026 15:26:50 +0200 Subject: [PATCH] chore(pre-commit): arm the pre-push hooks on a plain install 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 --- .pre-commit-config.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7d499836c..009d82165 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -187,10 +187,10 @@ repos: # is run by ci.yml's `unit-tests` job with -race AND an integration pass # with -tags=integration. # - # Moving it to the pre-push stage keeps the local safety net (devs who - # run `pre-commit install --hook-type pre-push` still get it on `git - # push`) while letting the CI pre-commit workflow stay focused on - # style/security/syntax. Pre-commit's default stage filter is + # Moving it to the pre-push stage keeps the local safety net (a plain + # `pre-commit install` arms pre-push too, via default_install_hook_types, + # so devs get it on `git push`) while letting the CI pre-commit workflow + # stay focused on style/security/syntax. Pre-commit's default stage filter is # `pre-commit`, so the CI workflow's `pre-commit run --all-files` skips # this hook automatically. - repo: local @@ -205,4 +205,5 @@ repos: # Global configuration default_stages: [pre-commit, pre-push] +default_install_hook_types: [pre-commit, pre-push] fail_fast: false