Skip to content

Conversation

thaJeztah
Copy link
Member

The remaining linting failures are addressed in #3885

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)
					                       ^

@codecov-commenter
Copy link

codecov-commenter commented May 9, 2023

Codecov Report

Patch coverage: 75.00% and project coverage change: -0.01 ⚠️

Comparison is base (8900e90) 56.76% compared to head (9ef4cc8) 56.76%.

📣 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              
Impacted Files Coverage Δ
registry/storage/schema2manifesthandler.go 62.35% <0.00%> (ø)
registry/handlers/manifests.go 54.17% <66.66%> (ø)
registry/registry.go 47.03% <80.00%> (-0.18%) ⬇️
registry/storage/signedmanifesthandler.go 42.52% <83.33%> (ø)
registry/storage/manifeststore.go 76.74% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@milosgajdos
Copy link
Member

Do you wanna rebase @thaJeztah now that #3885 was merged in? Besides, there is a conflict now

@thaJeztah thaJeztah force-pushed the update_golangci_lint branch 2 times, most recently from f138bd9 to 7af569c Compare May 9, 2023 13:29
@thaJeztah
Copy link
Member Author

Oh! Looks like the one above wasn't handled by the other PR; rebased, and pushed an additional commit 😅

thaJeztah added 6 commits May 9, 2023 16:04
    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>
@thaJeztah
Copy link
Member Author

Alright; this one's green now @milosgajdos @corhere @justincormack

@thaJeztah thaJeztah mentioned this pull request May 9, 2023
@milosgajdos milosgajdos requested a review from squizzi May 9, 2023 14:42
@milosgajdos milosgajdos merged commit 681d7dc into distribution:main May 9, 2023
@thaJeztah thaJeztah deleted the update_golangci_lint branch May 9, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants