mirror of
https://github.com/opencontainers/runc.git
synced 2026-11-06 05:17:05 +00:00
ci: bump golangci-lint to v2.13
Two things have to change together with the version, as neither is valid for v2.12: - The gofumpt extra-rules setting is deprecated in favor of the individual extra.* options; v2.12 rejects the latter (its config schema does not know them). Enable all three, which is what extra-rules: true used to mean, so the formatting stays the same. - The newer staticcheck flags the deprecated Hooks.Prestart and LinuxMemory.Kernel fields in the specconv tests. These exercise those fields on purpose, since runc still supports them, so silence it the same way as in the code under test. v2.12 does not report these, so nolintlint would call the directives unused there. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
1 parent
b655235288
commit
dca87c9e34
3 files changed
+7
-4
No files matched your search
@@ -53,7 +53,7 @@ jobs:
|
||||
sudo apt -qy install libseccomp-dev
|
||||
- uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
|
||||
with:
|
||||
version: v2.12
|
||||
version: v2.13
|
||||
skip-cache: true
|
||||
# Extra linters, only checking new code from a pull request to main.
|
||||
- name: lint-extra
|
||||
|
||||
+4
-1
@@ -9,7 +9,10 @@ formatters:
|
||||
- gofumpt
|
||||
settings:
|
||||
gofumpt:
|
||||
extra-rules: true
|
||||
extra:
|
||||
balance-calls: true
|
||||
clothe-returns: true
|
||||
group-params: true
|
||||
|
||||
linters:
|
||||
enable:
|
||||
|
||||
@@ -32,7 +32,7 @@ func TestCreateCommandHookTimeout(t *testing.T) {
|
||||
func TestCreateHooks(t *testing.T) {
|
||||
rspec := &specs.Spec{
|
||||
Hooks: &specs.Hooks{
|
||||
Prestart: []specs.Hook{
|
||||
Prestart: []specs.Hook{ //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
|
||||
{
|
||||
Path: "/some/hook/path",
|
||||
},
|
||||
@@ -364,7 +364,7 @@ func TestLinuxCgroupWithMemoryResource(t *testing.T) {
|
||||
Limit: &limit,
|
||||
Reservation: &reservation,
|
||||
Swap: &swap,
|
||||
Kernel: &kernel,
|
||||
Kernel: &kernel, //nolint:staticcheck // Ignore SA1019. Need to keep deprecated package for compatibility.
|
||||
KernelTCP: &kernelTCP,
|
||||
Swappiness: swappinessPtr,
|
||||
DisableOOMKiller: &disableOOMKiller,
|
||||
|
||||
Reference in new issue
Block a user