Uh oh!
There was an error while loading. Please reload this page.
chore: enable and fixes rules from gocritic - #246
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kolyshkin
commented
Aug 17, 2026
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>
| disabled-checks: | ||
| - appendAssign | ||
| - builtinShadow | ||
| - deferInLoop | ||
| - hugeParam | ||
| - importShadow | ||
| - paramTypeCombine | ||
| - rangeValCopy | ||
| - sloppyReassign | ||
| - unnamedResult | ||
| - whyNoLint |
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.
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.
Enables all gocritic rules by default, then excludes the one non compliant then fix one rule per commit
Covers #245 gocritic part only