You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not production ready, lots to do. I'll eventually get these to a point where I
can recommend them to people, and as CI tools.
Purpose
These tools exist almost entirely to mitigate human error. I make mistakes, and
these automations are safety-switches that future-me will thank present-me for.
There are occasions when I'll use $ git --no-verify, but I would like that to
be the exception.
Ideally when these tools declare a failure, it means things are broken and need
to be fixed - not that I should just override the verifications.
Use
Either run ./build.sh, or:
go install ./...
git config --global core.hooksPath ${PWD}/hooks
The hook scripts merely call the tools in this repository in sequence.
All tools are intended to be "smart" enough to know when they are and are not
relevant. They're all written in Go, and currently without any external dependencies.
These hooks can be installed easily on an air-gapped machine.
When invoked (when a tool deems itself "relevant" to the current commit) the tool
will either exit with an error, halting the git operation, or will print an explicit
"all clear" to indicate it has run but encountered no errors.
Tools
Some of these tools may be broken out into separate sub-tools in the future,
ex: hook-go becomes hook-go, hook-go-security, hook-go-test, hook-go-mod,
etc. Applying any sort of configuration to these tools is beyond their scope. Better
to just enable/disable tools entirely.