Its been a busy week since the v1.0.0-beta.1 announcement.
Here's a quick recap of recent additions:
- v1.0.0-beta.4
- Support for staticcheck
- v1.0.0-beta.2
- Support for go mod tidy
- Support for gofumpt
- v1.0.0-beta.1
- Support for invoking custom tools
As an example of invoking custom tools, here's a snippit I gave to a user recently who wanted to invoke golines
:
# ... hooks: # Run 'golines -l --dry-run $FILE' for each staged .go file - id: my-cmd name: go-lines alias: go-lines args: [ golines, -l, --dry-run ] # Run 'golines -l --dry-run .' in the repo root folder - id: my-cmd-repo name: go-lines-repo alias: go-lines-preo args: [ golines, -l, --dry-run, . ]
You can read about all pre-commit-golang features on project's homepage:
Top comments (0)