chore: enable and fixes rules from gocritic - #246
Open
mmorel-35 wants to merge 5 commits into
Open
Conversation
kolyshkin
reviewed
Aug 17, 2026
kolyshkin
reviewed
Aug 17, 2026
Collaborator
|
Overall LGTM, left some nits. |
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
ccoVeille
approved these changes
Aug 19, 2026
thaJeztah
reviewed
Aug 19, 2026
Comment on lines
+16
to
+26
| disabled-checks: | ||
| - appendAssign | ||
| - builtinShadow | ||
| - deferInLoop | ||
| - hugeParam | ||
| - importShadow | ||
| - paramTypeCombine | ||
| - rangeValCopy | ||
| - sloppyReassign | ||
| - unnamedResult | ||
| - whyNoLint |
Member
There was a problem hiding this comment.
Is the intent to address all of these (in follow-ups), or are there that cannot (yet) be addressed (e.g. due to go versions).
It's good to leave a comment for each to outline if it's either a permanent (won't fix because) or temporary (TODO).
At least some of them stood out as "should likely be fixed" (whyNoLint, rangeValCopy, importShadow), and I know the builtinShadow is a bit too opinionated (it's "OK", but sometimes not worth the code-churn.
Author
There was a problem hiding this comment.
Do you already know if you don't want some of them ? Otherwise the intention is indeed to try to comply with those that are the moby group and the sys project particularly usual practices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables all gocritic rules by default, then excludes the one non compliant then fix one rule per commit
Covers #245 gocritic part only