Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pre-commit

pre-commit-hooks

A collection of pre-commit hooks

Hooks


gofmt

format .go files

except vendor and protobuf generated .pb.go files


goimports

format .go file imports

except vendor and protobuf generated .pb.go files


go-vet

run go vet for .go files


go-mod-tidy

run go mod tidy

thriftfmt

format .thrift idl files


prototool

use github.com/uber/prototool to lint and format .proto files


Example

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

References

About

Useful git pre-commit hooks

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages