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

gosec: disable G407 #4983

Merged
merged 2 commits into from
Sep 4, 2024
Merged

gosec: disable G407 #4983

merged 2 commits into from
Sep 4, 2024

Conversation

ldez
Copy link
Member

@ldez ldez commented Sep 4, 2024

G407 has been introduced by gosec v2.21.0 (#4981) but there are problems:

So I globally disabled this rule (no user bypass like the previous try to disable G115) because I don't want to live the same stories as G115.

@ldez ldez added bug Something isn't working linter: update Update the linter implementation inside golangci-lint labels Sep 4, 2024
@ldez ldez added this to the next milestone Sep 4, 2024
@ldez ldez requested a review from bombsimon September 4, 2024 15:45
Copy link
Member

@bombsimon bombsimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this feels more obvious as a temporary workaround that adding it to default exclude list!

@ldez
Copy link
Member Author

ldez commented Sep 4, 2024

I agree, the previous time I wanted to be friendly with users who wanted to enable the rule but it was not the right solution.

This solution is a bit more extreme but at least it will not create regressions.

@ldez ldez merged commit bf4a66a into golangci:master Sep 4, 2024
16 checks passed
@ldez ldez deleted the fix/disable-gosec-G407 branch September 4, 2024 18:49
@ldez ldez modified the milestones: next, v1.61 Sep 9, 2024
uudashr pushed a commit to uudashr/golangci-lint that referenced this pull request Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linter: update Update the linter implementation inside golangci-lint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants