Add nolintlint linter.

Signed-off-by: Xun Jiang <jxun@vmware.com>
pull/7151/head
Xun Jiang 2023-11-28 12:26:13 +08:00
parent ec03d1ebce
commit d70535b6d2
3 changed files with 3 additions and 2 deletions

View File

@ -331,6 +331,7 @@ linters:
- ginkgolinter
- nilerr
- noctx
- nolintlint
fast: false

View File

@ -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.
}
}

View File

@ -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 {