-
Notifications
You must be signed in to change notification settings - Fork 2.6k
update golangci-lint to v1.52, fix linting issues #3906
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
Conversation
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #3906 +/- ##
==========================================
- Coverage 56.76% 56.76% -0.01%
==========================================
Files 106 106
Lines 10681 10680 -1
==========================================
- Hits 6063 6062 -1
Misses 3944 3944
Partials 674 674
☔ View full report in Codecov by Sentry. |
Do you wanna rebase @thaJeztah now that #3885 was merged in? Besides, there is a conflict now |
f138bd9
to
7af569c
Compare
Oh! Looks like the one above wasn't handled by the other PR; rebased, and pushed an additional commit 😅 |
reference/normalize_test.go:274:40: loopclosure: loop variable r captured by func literal (govet) named, err := ParseNormalizedNamed(r) ^ reference/normalize_test.go:276:29: loopclosure: loop variable r captured by func literal (govet) t.Fatalf("ref=%s: %v", r, err) ^ registry/api/errcode/errors_test.go:45:7: loopclosure: loop variable ec captured by func literal (govet) if ec != desc.Code { ^ registry/api/errcode/errors_test.go:46:66: loopclosure: loop variable ec captured by func literal (govet) t.Fatalf("error code in descriptor isn't correct, %q != %q", ec, desc.Code) ^ registry/api/errcode/errors_test.go:49:23: loopclosure: loop variable desc captured by func literal (govet) if idToDescriptors[desc.Value].Code != ec { ^ registry/api/errcode/errors_test.go:50:80: loopclosure: loop variable desc captured by func literal (govet) t.Fatalf("error code in idToDesc isn't correct, %q != %q", idToDescriptors[desc.Value].Code, ec) ^ registry/api/errcode/errors_test.go:53:7: loopclosure: loop variable ec captured by func literal (govet) if ec.Message() != desc.Message { ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…inate registry/auth/token/types_test.go:83:3: SA4004: the surrounding loop is unconditionally terminated (staticcheck) return ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
We need to use this for backward compatibility. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…recated We need to look into this; can we remove it, or is there a replacement? Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Removing the "structcheck" and "varcheck" linters as they've been deprecated. level=warning msg="[runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused." level=warning msg="[runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused." Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
7af569c
to
dec03ea
Compare
Alright; this one's green now @milosgajdos @corhere @justincormack |
The remaining linting failures are addressed in #3885