A collection of pre-commit hooks
format .go
files
except vendor and protobuf generated
.pb.go
files
format .go
file imports
except vendor and protobuf generated
.pb.go
files
run go vet
for .go
files
run go mod tidy
format .thrift
idl files
use github.com/uber/prototool
to lint and format .proto
files
in .pre-commit-config.yaml
repos:
- repo: https://github.com/zerosnake0/pre-commit-hooks
rev: v0.0.9
hooks:
- id: gofmt
- id: goimports
- id: go-vet
- id: go-mod-tidy