mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-15 00:21:57 +00:00
The previous hook scoped lint to staged packages but still surfaced all pre-existing violations in those packages on every commit, which turned long-standing technical debt (errcheck on test mock helpers, dupl warnings on poll providers) into a per-commit blocker. Add --new-from-rev=HEAD so golangci-lint only reports issues introduced by the staged diff. Pre-existing violations on untouched lines are filtered out; new violations on changed lines still fail the commit. Override with GOLANGCI_LINT_NEW_FROM_REV (set to "" to lint the whole package, or to a base revision such as HEAD~5 to broaden the comparison window). |
||
|---|---|---|
| .. | ||
| pre-commit | ||
| pre-push | ||