From d70535b6d28727278b516708e591d802ffa586ae Mon Sep 17 00:00:00 2001 From: Xun Jiang Date: Tue, 28 Nov 2023 12:26:13 +0800 Subject: [PATCH] Add nolintlint linter. Signed-off-by: Xun Jiang --- golangci.yaml | 1 + pkg/plugin/clientmgmt/process/client_builder.go | 2 +- pkg/restic/command.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/golangci.yaml b/golangci.yaml index d3de5a0b35..88b3b77237 100644 --- a/golangci.yaml +++ b/golangci.yaml @@ -331,6 +331,7 @@ linters: - ginkgolinter - nilerr - noctx + - nolintlint fast: false diff --git a/pkg/plugin/clientmgmt/process/client_builder.go b/pkg/plugin/clientmgmt/process/client_builder.go index 38c350f033..d414457796 100644 --- a/pkg/plugin/clientmgmt/process/client_builder.go +++ b/pkg/plugin/clientmgmt/process/client_builder.go @@ -80,7 +80,7 @@ func (b *clientBuilder) clientConfig() *hcplugin.ClientConfig { string(common.PluginKindDeleteItemAction): framework.NewDeleteItemActionPlugin(common.ClientLogger(b.clientLogger)), }, Logger: b.pluginLogger, - Cmd: exec.Command(b.commandName, b.commandArgs...), //nolint + Cmd: exec.Command(b.commandName, b.commandArgs...), //nolint:gosec // Internal call. No need to check the command line. } } diff --git a/pkg/restic/command.go b/pkg/restic/command.go index a484a53161..ef0ba56553 100644 --- a/pkg/restic/command.go +++ b/pkg/restic/command.go @@ -77,7 +77,7 @@ func (c *Command) String() string { // Cmd returns an exec.Cmd for the command. func (c *Command) Cmd() *exec.Cmd { parts := c.StringSlice() - cmd := exec.Command(parts[0], parts[1:]...) //nolint + cmd := exec.Command(parts[0], parts[1:]...) //nolint:gosec // Internal call. No need to check the parameter. cmd.Dir = c.Dir if len(c.Env) > 0 {