-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
bump up golangci-lint to v1.52.2 #3796
Conversation
8ba005e
to
0386ef9
Compare
I don't have strong opinions on enabling Could you reorder the commits so that the refactor comes before the bump, so that the linter can pass on each commit? |
0386ef9
to
d50906c
Compare
cache/blobs.go
Outdated
} | ||
|
||
return nil | ||
return sr.commitMetadata() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too strict
cache/compression.go
Outdated
@@ -11,6 +11,6 @@ import ( | |||
ocispecs "github.com/opencontainers/image-spec/specs-go/v1" | |||
) | |||
|
|||
func needsForceCompression(ctx context.Context, cs content.Store, source ocispecs.Descriptor, refCfg config.RefConfig) bool { | |||
func needsForceCompression(_ context.Context, _ content.Store, _ ocispecs.Descriptor, refCfg config.RefConfig) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too strict
d50906c
to
b96586f
Compare
Looks like mgechev/revive#799 added the following rules which make
Let's disable all of them until the become needing them. |
b96586f
to
7c66dfb
Compare
Thanks, SGTM. |
@ktock woops sorry, didn't mean to close this, looks like it got accidentally linked to another PR 😢 |
Signed-off-by: Kohei Tokunaga <[email protected]>
7c66dfb
to
60776f2
Compare
Sorry, I thought that PR fixed this 🤦♂️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused-parameter
unreachable-code
look meaningful and we should try to enable them in follow-up
This PR bumps up golangci-lint to v1.52.2 https://github.com/golangci/golangci-lint/releases/tag/v1.52.2
With this version, the linter fails with a lot of
unused-parameter
failures. Though this PR fixes the code to pass the linter, maybe we can disable it if unnecessary.