Pass an exclude to a linter package?
febbraro opened this issue · comments
Frank Febbraro commented
The gosec
package is flagging an error that I don't care to evaluate across my entire codebase.
gosec
has a way to pass an exclude for a particular rule
# Run everything except for rule G303
$ gosec -exclude=G303 ./...
Is there a way to pass something like that down to the gosec
package?
Daniel Nephin commented
Yes, you can customize the command that is run from the config:
{
"Linters": {
"gosec": {"Command": "gosec -exclude=G303"}
}
}
https://github.com/alecthomas/gometalinter#adding-custom-linters
Frank Febbraro commented
@dnephin Thanks so much for that pointer. Works like a charm!