A GO Lang module to perform actions on git hooks. Say linting or code formating on pre-commit among other possibilities.
go get github.com/varmakarthik12/git-hooks
Root should have a .git-hooks.yaml
file like below.
# Any supported hooks
pre-commit:
#optional glob to execute on specific file paths.
files:
include:
- "*.go"
- "*.md"
exclude:
- "*.js"
# Execute an action / code.
run:
- echo "Single line command "
- |
echo "Muti line command"
gofmt -l -w
pre-commit
- Supports files config