Switch to golangci lint v2, fix or suppress found warnings#797
Merged
kolyshkin merged 12 commits intoopencontainers:masterfrom Nov 11, 2025
Merged
Switch to golangci lint v2, fix or suppress found warnings#797kolyshkin merged 12 commits intoopencontainers:masterfrom
kolyshkin merged 12 commits intoopencontainers:masterfrom
Conversation
Generated by go fix ./... Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1. Replaces interface{} with any.
2. Use slices.Contains where appropriate.
Generated by
modernize -fix ./...
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
The same package is imported twice for no reason. Reported by staticcheck: > generate/seccomp/seccomp_default.go:6:2: ST1019: package "github.com/opencontainers/runtime-spec/specs-go" is being imported more than once (staticcheck) > "github.com/opencontainers/runtime-spec/specs-go" > ^ >generate/seccomp/seccomp_default.go:7:2: ST1019(related information): other import of "github.com/opencontainers/runtime-spec/specs-go" (staticcheck) > rspec "github.com/opencontainers/runtime-spec/specs-go" Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Use switch instead of if/else where appropriate. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
These are the ones we don't want to fix. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Staticcheck complains: > validation/linux_cgroups_relative_cpus/linux_cgroups_relative_cpus.go:14:17: ST1023: should omit type string from declaration; it will be inferred from the right-hand side (staticcheck) > var cpus, mems string = "0-1", "0" > ^ Fix this, and while at it, use constants. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Or, in other words, un-Yoda-fy. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
While at it, bump lint job actions to latest versions. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
b2d3d2d to
1216466
Compare
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
In addition to the one from go.mod (currently 1.21). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
cyphar
approved these changes
Nov 6, 2025
aojea
approved these changes
Nov 6, 2025
Contributor
|
/cc @thaJeztah |
|
@AkihiroSuda @giuseppe is this something you can help here? containerd/nri#242 and NVIDIA/nvidia-container-toolkit#1423 depends on #795 and that depends on this |
|
Thanks it seems merge criteria was met now, so we just need someone to click the button 😅 |
AkihiroSuda
reviewed
Nov 7, 2025
AkihiroSuda
approved these changes
Nov 7, 2025
Member
AkihiroSuda
left a comment
There was a problem hiding this comment.
LGTM, but I don't think I should click the merge button as I'm not a maintainer here
https://github.com/opencontainers/runtime-tools/blob/master/MAINTAINERS
Member
|
ping @opencontainers/runtime-tools-maintainers |
Contributor
|
@mrunalp Could you merge this ? |
Contributor
|
@giuseppe Would you be willing to merge this so we could kick things moving forward ? |
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.
Please see individual commits for details.