Skip to content

Commit 4e81f49

Browse files
bhundvenactions-user
authored andcommitted
chore: Update README.md for release
1 parent d6d2fcf commit 4e81f49

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
# golang-pre-commit
22

3-
This is a collection of golang [pre-commit](http://pre-commit.com/) hooks.
3+
This is a collection of golang [pre-commit](http://pre-commit.com/) hooks
4+
specifcally for build, generate, unit tests, and other build-time workflow
5+
checks.
6+
7+
If you need a pre-commit for a linter or formatter, check out the official
8+
[golangci-lint](https://golangci-lint.run/) pre-commit: https://github.com/golangci/golangci-lint/blob/main/.pre-commit-hooks.yaml
49
## Usage
510

611
```yaml
712
- repo: https://github.com/bhundven/golang-pre-commit.git
813
rev: v1
914
hooks:
10-
- id: go-fmt
15+
- id: go-generate
1116
```
1217
1318
## Available Hooks
1419
15-
* `go-fmt` - Runs `gofmt`. Requires golang: https://go.dev/doc/install
16-
* `go-fumpt` - Runs `gofumpt`. Requires gofumpt: https://github.com/mvdan/gofumpt
17-
* `go-imports` - Runs `goimports`. Requires goimports: https://pkg.go.dev/golang.org/x/tools/cmd/goimports
18-
* `go-vet` - Runs `go vet`. Requires golang: https://go.dev/doc/install
19-
* `go-lint` - [DEPRECATED] Runs `golint`. Requires golint: https://github.com/golang/lint
20-
* `golangci-lint` - Runs `golangci-lint`. Requires golangci-lint: https://github.com/golangci/golangci-lint
21-
* `go-critic` - Runs `gocritic`. Requires gocritic: https://github.com/go-critic/go-critic
2220
* `go-unit-tests` - Runs `go test`. Requires golang: https://go.dev/doc/install
2321
* `go-build` - Runs `go build`. Requires golang: https://go.dev/doc/install
2422
* `go-generate` - Runs `go generate`. Requires golang: https://go.dev/doc/install
2523
* `go-mod-tidy` - Runs `go mod tidy -v`. Requires golang: https://go.dev/doc/install
2624
* `go-mod-vendor` - Runs `go mod vendor`. Requires golang: https://go.dev/doc/install
25+
`go-build` - Runs `go build`. Requires golang: https://go.dev/doc/install
26+
* `go-generate` - Runs `go generate`. Requires golang: https://go.dev/doc/install
27+
* `go-mod-tidy` - Runs `go mod tidy -v`. Requires golang: https://go.dev/doc/install
28+
* `go-mod-vendor` - Runs `go mod vendor`. Requires golang: https://go.dev/doc/install
2729
all

0 commit comments

Comments
 (0)