A simple pre-commit hook for Go developers. Runs gofmt, go vet, and ensures no large files are being added.
Go to file
Laurence Withers fcb78985c9 Initial commit 2020-02-16 09:46:26 +00:00
README.md Initial commit 2020-02-16 09:46:26 +00:00

README.md

Git pre-commit hook

This commit hook only runs if it detects a Go source repository (by testing for the presence of a go.mod within the first 3 levels of directory).

Tests:

  • runs go vet on each module
  • runs goimports on all source (excluding generating protobuf .pb.go files)
  • checks for large (>1MiB) files