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 <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato 2021-02-04 11:39:14 -08:00
parent b14ccd2053
commit 07db46ee23
2 changed files with 3 additions and 3 deletions

View File

@ -310,7 +310,7 @@ func (c *criService) containerSpecOpts(config *runtime.ContainerConfig, imageCon
asp := securityContext.GetApparmor() asp := securityContext.GetApparmor()
if asp == nil { 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 { if err != nil {
return nil, errors.Wrap(err, "failed to generate apparmor spec opts") 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() ssp := securityContext.GetSeccomp()
if ssp == nil { if ssp == nil {
ssp, err = generateSeccompSecurityProfile( 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) c.config.UnsetSeccompProfile)
if err != nil { if err != nil {
return nil, errors.Wrap(err, "failed to generate seccomp spec opts") return nil, errors.Wrap(err, "failed to generate seccomp spec opts")

View File

@ -170,7 +170,7 @@ func (c *criService) sandboxContainerSpecOpts(config *runtime.PodSandboxConfig,
ssp := securityContext.GetSeccomp() ssp := securityContext.GetSeccomp()
if ssp == nil { if ssp == nil {
ssp, err = generateSeccompSecurityProfile( 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) c.config.UnsetSeccompProfile)
if err != nil { if err != nil {
return nil, errors.Wrap(err, "failed to generate seccomp spec opts") return nil, errors.Wrap(err, "failed to generate seccomp spec opts")