github.com/Finschia/finschia-sdk@v0.48.1/contrib/githooks/README.md (about)

     1  # Git hooks
     2  
     3  Installation:
     4  
     5  ```
     6  git config core.hooksPath contrib/githooks
     7  ```
     8  
     9  ## pre-commit
    10  
    11  The hook automatically runs `gofmt`, `goimports`, and `misspell`
    12  to correctly format the `.go` files included in the commit, provided
    13  that all the aforementioned commands are installed and available
    14  in the user's search `$PATH` environment variable:
    15  
    16  ```
    17  go get golang.org/x/tools/cmd/goimports
    18  go get github.com/golangci/misspell/cmd/misspell@master
    19  ```
    20  
    21  It also runs `go mod tidy` and `golangci-lint` if available.