update golangci-lint to v1.52, fix linting issues#3906
Merged
milosgajdos merged 6 commits intodistribution:mainfrom May 9, 2023
Merged
update golangci-lint to v1.52, fix linting issues#3906milosgajdos merged 6 commits intodistribution:mainfrom
milosgajdos merged 6 commits intodistribution:mainfrom
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. |
Member
|
Do you wanna rebase @thaJeztah now that #3885 was merged in? Besides, there is a conflict now |
f138bd9 to
7af569c
Compare
Member
Author
|
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 <[email protected]>
…inate
registry/auth/token/types_test.go:83:3: SA4004: the surrounding loop is unconditionally terminated (staticcheck)
return
^
Signed-off-by: Sebastiaan van Stijn <[email protected]>
We need to use this for backward compatibility. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
…recated We need to look into this; can we remove it, or is there a replacement? Signed-off-by: Sebastiaan van Stijn <[email protected]>
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 <[email protected]>
7af569c to
dec03ea
Compare
Member
Author
|
Alright; this one's green now @milosgajdos @corhere @justincormack |
Merged
corhere
approved these changes
May 9, 2023
milosgajdos
approved these changes
May 9, 2023
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.
The remaining linting failures are addressed in #3885