pre-commit-golang
pre-commit-golang copied to clipboard
How To Pass Flags to staticcheck Command
The staticcheck
command provides options to pass in flags like -tags
(to specify which build flags to use) - more examples here: https://staticcheck.io/docs/running-staticcheck/cli/
So it's possible to run:
staticcheck -tags=mybuildtag ./...
How can one pass similar tags to the pre-commit hook?
Options tried
- id: go-static-check
args:
- "-tags=mybuildtag"
However, it seems these are parsed as directory options.
Any guidance would be highly appreciated, thanks!