Support for revive - v0.8.3
Release v0.8.3
Adds support for the revive style checker
go-revive
~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint.
Hook ID | Description |
---|---|
go-revive |
Run 'revive [$ARGS] $FILE' for each staged .go file |
go-revive-mod |
Run 'cd $(mod_root $FILE); revive [$ARGS] ./...' for each staged .go file |
go-revive-repo-mod |
Run 'cd $(mod_root); revive [$ARGS] ./...' for each module in the repo |
Install
go get -u github.com/mgechev/revive
Useful Args
-config [PATH] : Path to config file (TOML)
-exclude [PATTERN] : Pattern for files/directories/packages to be excluded from linting
-formatter [NAME] : formatter to be used for the output
Displaying Warnings
By default, revive
doesn't generate errors on warnings, so warning messages may not be displayed if there are no accompanying error messages.
You can use the "verbose: true"
hook configuration to always show hook output.
Help
- https://github.com/mgechev/revive#usage
revive -h