Skip to content

Commit

Permalink
Upgrade golangci-lint in CI to v1.21.0 (#2023)
Browse files Browse the repository at this point in the history
* Upgrade golangci-lint in CI to v1.21.0
  • Loading branch information
nkvoll authored Oct 18, 2019
1 parent d5fe365 commit 55b9b17
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ linters:
- funlen
- gochecknoglobals
- gochecknoinits
- gocognit # added in 1.20
- godox # added in 1.19
- interfacer
- lll
- scopelint
- whitespace # added in 1.19
- wsl # added in 1.20
linters-settings:
maligned:
suggest-new: true
Expand Down Expand Up @@ -86,3 +90,6 @@ issues:
text: 'Consider preallocating `errs`'
- path: test/e2e/test/elasticsearch/steps_license\.go
text: 'G101: Potential hardcoded credentials'
- linters:
- stylecheck
text: 'ST1016: methods on the same type should have the same receiver name.*"in".*'
2 changes: 1 addition & 1 deletion build/ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV KUBEBUILDER_VERSION=2.0.0
ENV GCLOUD_VERSION=232.0.0
ENV KUBECTL_VERSION=1.14.7
ENV DOCKER_VERSION=18.03.1-ce
ENV GOLANGCILINT_VERSION=1.18.0
ENV GOLANGCILINT_VERSION=1.21.0
ENV GOTESTSUM_VERSION=0.3.5

# Install golangci-lint
Expand Down
2 changes: 1 addition & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
"k8s.io/client-go/kubernetes"
"sigs.k8s.io/controller-runtime/pkg/cache"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/runtime/signals"
"sigs.k8s.io/controller-runtime/pkg/manager/signals"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion hack/deployer/runner/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (c *Command) output() (string, error) {
c.command = b.String()
}

cmd := exec.Command("/usr/bin/env", "bash", "-c", c.command)
cmd := exec.Command("/usr/bin/env", "bash", "-c", c.command) // #nosec G204
cmd.Env = append(os.Environ(), c.variables...)

b := bytes.Buffer{}
Expand Down

0 comments on commit 55b9b17

Please sign in to comment.