Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade golangci-lint in CI to v1.21.0 #2023

Merged
merged 2 commits into from
Oct 18, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ linters:
- interfacer
- lll
- scopelint
- wsl # added in 1.20
- gocognit # added in 1.20
- whitespace # added in 1.19
- godox # added in 1.19
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