-
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
add extra linters from gopls #4829
Conversation
@@ -5,6 +5,9 @@ ARG ALPINE_VERSION=3.19 | |||
ARG XX_VERSION=1.4.0 | |||
ARG PROTOLINT_VERSION=0.45.0 | |||
ARG GOLANGCI_LINT_VERSION=1.57.1 | |||
ARG GOPLS_VERSION=v0.20.0 | |||
# disabled: deprecated unusedvariable simplifyrange |
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.
simplifyrange can't be enabled as secrets.pb.go generated code invalidates it atm. and there doesn't seem to be a way to disable checks on these files like you can do in golangci-lint.
unusedvariable disabled because it is disabled in gopls by default as well. It doesn't actually match anything in buildkit.
deprecated should be manually checked periodically but I don't think we can keep it as a requirement in CI.
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.
deprecated should be manually checked periodically but I don't think we can keep it as a requirement in CI.
If you want this to be included on schedule event only on ci this is possible.
11d062c
to
9ac54ad
Compare
@@ -1,88 +1 @@ | |||
//go:build !linux |
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.
@profnandaa When you are adding runc wcow support you likely need to add this file back, but atm I didn't find any way this file can be called. Only importer from cmd/oci_worker
already had linux-only build tags.
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.
Noted, thanks for letting me know.
00edd3c
to
80a5ce1
Compare
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
80a5ce1
to
cdb90c0
Compare
The new CI job is quite long with all the platform combinations added. Options:
|
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.
LGTM
I can look at ci stuff as follow-up
@@ -1,3 +1,6 @@ | |||
//go:build linux | |||
// +build linux |
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.
Can we just use the _linux.go
suffix?
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.
Why is it better in this case where there are no other files with other suffixes?
Btw, this is so that go vet ./...
does not try to build this package for windows.
@AkihiroSuda Is this ready to merge? |
depends on #4828Some useful linters seem to be only available as part of gopls. I couldn't figure out a better way of including them as this addition to linters Dockerfile - only unusedparams has a main pkg in upstream.