scorecard
scorecard copied to clipboard
golangci-lint warnings
Running golangci-lint, either locally or in GitHub Actions, outputs a lot of warnings:
WARN The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar.
WARN [linters_context] gocritic: no need to enable check "appendAssign": it's already enabled
WARN [linters_context] gocritic: no need to enable check "badCond": it's already enabled
WARN [linters_context] gocritic: no need to enable check "caseOrder": it's already enabled
WARN [linters_context] gocritic: no need to enable check "codegenComment": it's already enabled
WARN [linters_context] gocritic: no need to enable check "deprecatedComment": it's already enabled
WARN [linters_context] gocritic: no need to enable check "dupBranchBody": it's already enabled
WARN [linters_context] gocritic: no need to enable check "dupCase": it's already enabled
WARN [linters_context] gocritic: no need to enable check "dupSubExpr": it's already enabled
WARN [linters_context] gocritic: no need to enable check "exitAfterDefer": it's already enabled
WARN [linters_context] gocritic: no need to enable check "flagName": it's already enabled
WARN [linters_context] gocritic: no need to enable check "captLocal": it's already enabled
WARN [linters_context] gocritic: no need to enable check "commentFormatting": it's already enabled
WARN [linters_context] gocritic: no need to enable check "defaultCaseOrder": it's already enabled
WARN [linters_context] gocritic: no need to enable check "elseif": it's already enabled
WARN [linters_context] gocritic: no need to enable check "ifElseChain": it's already enabled
WARN [linters_context] gocritic: no need to enable check "singleCaseSwitch": it's already enabled
WARN [linters_context] gocritic: no need to enable check "typeSwitchVar": it's already enabled
WARN [linters_context] gocritic: no need to enable check "underef": it's already enabled
WARN [linters_context] gocritic: no need to enable check "unlambda": it's already enabled
using copyloopvar will likely be a larger diff since we declare 1.22 in our go.mod, so my guess is it will want all of our tt := tt gone (maybe make fix-linter can auto fix it).
for gocritic, it's kind of annoying that it warns for that, but we can explore https://golangci-lint.run/usage/linters/#gocritic:
- using disable-all
- using presets
- just deleting the rules it's complaining about being enabled already
This issue has been marked stale because it has been open for 60 days with no activity.
commandeering this issue for a few other linters todo in #4641