https://github.com/miloas/pre-commit-golang
https://github.com/miloas/pre-commit-golang
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/miloas/pre-commit-golang
- Owner: Miloas
- License: mit
- Created: 2019-11-20T07:00:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-03T08:44:17.000Z (about 3 years ago)
- Last Synced: 2025-02-22T22:21:46.860Z (over 1 year ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
pre-commit-golang
=================
golang hooks for http://pre-commit.com/
### Using these hooks
Add this to your `.pre-commit-config.yaml`
- repo: git://github.com/dnephin/pre-commit-golang
rev: master
hooks:
- id: go-fmt
- id: validate-toml
- id: go-unit-tests
- id: go-build
- id: go-mod-tidy
- id: revive
### Available hooks
- `go-fmt` - Runs `gofmt`, requires golang
- `validate-toml` - Runs `tomlv`, requires
https://github.com/BurntSushi/toml/tree/master/cmd/tomlv
- `go-unit-tests` - run `go test -tags=unit -timeout 30s -short -v`
- `go-build` - run `go build`, requires golang
- `revive` - run `revive -config defaults.toml --formatter friendly ./...`, requires [revive](https://github.com/mgechev/revive)
- `buf` - run `buf lint`, requires [buf](https://github.com/bufbuild/buf)
### NOTICE
This project fork from `https://github.com/dnephin/pre-commit-golang`