Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support gosec (gas) linter options #177

Closed
wfernandes opened this issue Aug 2, 2018 · 7 comments · Fixed by #1930
Closed

Support gosec (gas) linter options #177

wfernandes opened this issue Aug 2, 2018 · 7 comments · Fixed by #1930
Labels
enhancement New feature or improvement

Comments

@wfernandes
Copy link

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.

@jirfag jirfag changed the title Support gas linter options Support gosec (gas) linter options Apr 1, 2019
@tpounds tpounds added area: config Related to .golangci.yml and/or cli options enhancement New feature or improvement labels Oct 1, 2019
@stale
Copy link

stale bot commented Mar 29, 2020

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.

@stale stale bot added the stale No recent correspondence or work activity label Mar 29, 2020
@wfernandes
Copy link
Author

@jirfag Just checking in. I haven't checked myself recently, but are gosec (gas) linter options supported?

@stale stale bot removed the stale No recent correspondence or work activity label Mar 30, 2020
@ats0stv
Copy link

ats0stv commented May 26, 2020

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

@wfernandes
Copy link
Author

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

@ats0stv
Copy link

ats0stv commented May 26, 2020

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.

@Nivl
Copy link
Member

Nivl commented Jun 19, 2020

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.

@aknuds1
Copy link

aknuds1 commented Jun 25, 2020

I have the same problem, that I would like to configure gosec's rules via golangci-lint.

@ldez ldez removed the area: config Related to .golangci.yml and/or cli options label Apr 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants