It would be nice to support gas linter options like -include and -exclude as part of the linters-settings in the golangci-lint config files.
Thanks.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@jirfag Just checking in. I haven't checked myself recently, but are gosec (gas) linter options supported?
Yes to try it with the latest golangci-lint. From the docs, https://golangci-lint.run/usage/linters/ it says its possible to enable gosec. Will post back after trying
Yeah I think enabling gosec will work. Just curious about the linters-settings in the configuration - https://golangci-lint.run/usage/configuration/.
Thanks for checking @ats0stv
Thanks @wfernandes.
I checked, with -E option and also in another attempt to disable all other linters and enable just gosec. However, in both cases, it does not seem to work. I believe this bug is still valid.
It would be nice to be able to fully configure it. Right now golangci-lint is using the default configuration. Being able to set options on every single rule they have (like using 644 instead of 600 for G306) would be much more useful. Right now I have to silence most rules because they are too strict, even though they can be configured.
Edit: To add some clarity, what @wfernandes was asking was to be able to enable/disable rules like G110, G306 in an easier way than "silencing" them using exclude-rules.
I have the same problem, that I would like to configure gosec's rules via golangci-lint.
Most helpful comment
It would be nice to be able to fully configure it. Right now golangci-lint is using the default configuration. Being able to set options on every single rule they have (like using 644 instead of 600 for G306) would be much more useful. Right now I have to silence most rules because they are too strict, even though they can be configured.
Edit: To add some clarity, what @wfernandes was asking was to be able to enable/disable rules like
G110,G306in an easier way than "silencing" them usingexclude-rules.