diff --git a/.golangci.yml b/.golangci.yml index 44382f6..f2bec79 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -43,7 +43,6 @@ linters-settings: # https://github.com/golangci/golangci-lint/blob/master/pkg/golinters/nolintlint nolintlint: - allow-leading-space: true # allow non-"machine-readable" format (ie. with leading space) allow-unused: false # allow nolint directives that don't address a linting issue require-explanation: true # require an explanation for nolint directives require-specific: true # require nolint directives to be specific about which linter is being skipped diff --git a/cmd/vela-docker/build.go b/cmd/vela-docker/build.go index 52c7737..048dc45 100644 --- a/cmd/vela-docker/build.go +++ b/cmd/vela-docker/build.go @@ -354,7 +354,8 @@ var buildFlags = []cli.Flag{ // Command formats and outputs the Build command from // the provided configuration to build a Docker image. -// nolint:funlen,gocyclo // Ignore line length +// +//nolint:funlen,gocyclo // Ignore line length func (b *Build) Command() *exec.Cmd { logrus.Trace("creating docker build command from plugin configuration") @@ -555,7 +556,7 @@ func (b *Build) Command() *exec.Cmd { // add the required directory param flags = append(flags, b.Context) - // nolint:gosec // this functionality is not exploitable the way + //nolint:gosec // this functionality is not exploitable the way // the plugin accepts configuration return exec.Command(_docker, append([]string{buildAction}, flags...)...) } diff --git a/cmd/vela-docker/build_test.go b/cmd/vela-docker/build_test.go index d496e54..97bda93 100644 --- a/cmd/vela-docker/build_test.go +++ b/cmd/vela-docker/build_test.go @@ -53,7 +53,7 @@ func TestDocker_Build_Command(t *testing.T) { Ulimits: []string{"1"}, } - // nolint:gosec // this functionality is not exploitable the way + //nolint:gosec // this functionality is not exploitable the way // the plugin accepts configuration want := exec.Command( _docker, diff --git a/cmd/vela-docker/daemon_test.go b/cmd/vela-docker/daemon_test.go index 48c7a88..fea6e95 100644 --- a/cmd/vela-docker/daemon_test.go +++ b/cmd/vela-docker/daemon_test.go @@ -28,7 +28,7 @@ func TestDocker_Daemon_Command(t *testing.T) { }, } - // nolint:gosec // this functionality is not exploitable the way + //nolint:gosec // this functionality is not exploitable the way // the plugin accepts configuration want := exec.Command( _dockerd, diff --git a/cmd/vela-docker/plugin_test.go b/cmd/vela-docker/plugin_test.go index d1b0c63..456b518 100644 --- a/cmd/vela-docker/plugin_test.go +++ b/cmd/vela-docker/plugin_test.go @@ -6,7 +6,7 @@ import ( "testing" ) -func TestDocker_Plugin_Exec(t *testing.T) { +func TestDocker_Plugin_Exec(_ *testing.T) { // TODO Write test } diff --git a/cmd/vela-docker/push.go b/cmd/vela-docker/push.go index 0cf3957..d1b3fba 100644 --- a/cmd/vela-docker/push.go +++ b/cmd/vela-docker/push.go @@ -46,7 +46,7 @@ func (p *Push) Command() *exec.Cmd { // add tag to command flags = append(flags, p.Tag) - // nolint: gosec // this functionality is not exploitable the way + //nolint: gosec // this functionality is not exploitable the way // the plugin accepts configuration return exec.Command(_docker, append([]string{pushAction}, flags...)...) } diff --git a/cmd/vela-docker/registry.go b/cmd/vela-docker/registry.go index 282bb19..bd76030 100644 --- a/cmd/vela-docker/registry.go +++ b/cmd/vela-docker/registry.go @@ -126,7 +126,7 @@ func (r *Registry) Login() error { // add flag for registry name flags = append(flags, r.Name) - // nolint: gosec // ignore executing command as subprocess + //nolint: gosec // ignore executing command as subprocess e := exec.Command(_docker, append([]string{loginAction}, flags...)...) // set command stdout to OS stdout