From b14ccd2053627be5a0ef8a2fe2e5e6bf24874d65 Mon Sep 17 00:00:00 2001 From: Kazuyoshi Kato Date: Thu, 4 Feb 2021 11:45:25 -0800 Subject: [PATCH 1/2] ci/gha: upgrade golangci-lint from v1.29.0 to v1.36.0 Signed-off-by: Kazuyoshi Kato --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35bb691e5..fe4258850 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: - uses: golangci/golangci-lint-action@v2 with: - version: v1.29.0 + version: v1.36.0 working-directory: src/github.com/containerd/containerd args: --timeout=5m From 07db46ee2314097abf02390a5964f8970633950a Mon Sep 17 00:00:00 2001 From: Kazuyoshi Kato Date: Thu, 4 Feb 2021 11:39:14 -0800 Subject: [PATCH 2/2] lint: update nolint syntax for golangci-lint Newer golangci-lint needs explicit `//` separator. Otherwise it treats the entire line (`staticcheck deprecated ... yet`) as a name. https://golangci-lint.run/usage/false-positives/#nolint Signed-off-by: Kazuyoshi Kato --- pkg/cri/server/container_create_linux.go | 4 ++-- pkg/cri/server/sandbox_run_linux.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/cri/server/container_create_linux.go b/pkg/cri/server/container_create_linux.go index a62e1e5a9..99998405a 100644 --- a/pkg/cri/server/container_create_linux.go +++ b/pkg/cri/server/container_create_linux.go @@ -310,7 +310,7 @@ func (c *criService) containerSpecOpts(config *runtime.ContainerConfig, imageCon asp := securityContext.GetApparmor() if asp == nil { - asp, err = generateApparmorSecurityProfile(securityContext.GetApparmorProfile()) // nolint:staticcheck deprecated but we don't want to remove yet + asp, err = generateApparmorSecurityProfile(securityContext.GetApparmorProfile()) //nolint:staticcheck // Deprecated but we don't want to remove yet if err != nil { return nil, errors.Wrap(err, "failed to generate apparmor spec opts") } @@ -329,7 +329,7 @@ func (c *criService) containerSpecOpts(config *runtime.ContainerConfig, imageCon ssp := securityContext.GetSeccomp() if ssp == nil { ssp, err = generateSeccompSecurityProfile( - securityContext.GetSeccompProfilePath(), // nolint:staticcheck deprecated but we don't want to remove yet + securityContext.GetSeccompProfilePath(), //nolint:staticcheck // Deprecated but we don't want to remove yet c.config.UnsetSeccompProfile) if err != nil { return nil, errors.Wrap(err, "failed to generate seccomp spec opts") diff --git a/pkg/cri/server/sandbox_run_linux.go b/pkg/cri/server/sandbox_run_linux.go index 8558a0a1a..aa9cc35ec 100644 --- a/pkg/cri/server/sandbox_run_linux.go +++ b/pkg/cri/server/sandbox_run_linux.go @@ -170,7 +170,7 @@ func (c *criService) sandboxContainerSpecOpts(config *runtime.PodSandboxConfig, ssp := securityContext.GetSeccomp() if ssp == nil { ssp, err = generateSeccompSecurityProfile( - securityContext.GetSeccompProfilePath(), // nolint:staticcheck deprecated but we don't want to remove yet + securityContext.GetSeccompProfilePath(), //nolint:staticcheck // Deprecated but we don't want to remove yet c.config.UnsetSeccompProfile) if err != nil { return nil, errors.Wrap(err, "failed to generate seccomp spec opts")