add extra linters from gopls#4829
Conversation
| 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.
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.
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.
@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.
Noted, thanks for letting me know.
00edd3c to
80a5ce1
Compare
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
80a5ce1 to
cdb90c0
Compare
|
The new CI job is quite long with all the platform combinations added. Options:
|
crazy-max
left a comment
There was a problem hiding this comment.
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.
Can we just use the _linux.go suffix?
There was a problem hiding this comment.
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.