chore: add gofumpt to pre-commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
张泊明518370910136 2024-03-15 22:07:18 -04:00
parent 38d1c18471
commit ab0e7417c2
GPG Key ID: D47306D7062CDA9D
3 changed files with 7 additions and 1 deletions

View File

@ -3,7 +3,9 @@ linters:
enable:
- gosec
- gocritic
- gofumpt
- gofmt
- goimports
issues:
exclude-rules:
- linters:

View File

@ -14,6 +14,10 @@ repos:
rev: 0.2.2
hooks:
- id: checkmake
- repo: https://github.com/Bahjat/pre-commit-golang
rev: v1.0.2
hooks:
- id: gofumpt
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.1
hooks:

View File

@ -29,7 +29,7 @@ go build -o ./build/joj3 ./cmd/joj3
### For developers
Install [`pre-commit`](https://pre-commit.com/), [`golangci-lint`](https://golangci-lint.run), [`goimports`](https://golang.org/x/tools/cmd/goimports).
Install [`pre-commit`](https://pre-commit.com/), [`golangci-lint`](https://golangci-lint.run), [`goimports`](https://golang.org/x/tools/cmd/goimports), [`gofumpt`](https://github.com/mvdan/gofumpt).
Then install the pre-commit hooks. It will run some checks before you commit.