Skip to content

Commit

Permalink
GolangCI-lint updating version to 1.30 (#1785)
Browse files Browse the repository at this point in the history
Add exportloopref which is a successor of obsoleted scopelint.
Disable unnecessaryDefer which are located right before return.

Co-authored-by: Mark Mandel <markmandel@google.com>
  • Loading branch information
aLekSer and markmandel authored Sep 3, 2020
1 parent bbb8119 commit 42776b6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ output:

linters:
enable:
- exportloopref
- deadcode
- megacheck
- govet
Expand Down Expand Up @@ -77,6 +78,7 @@ linters-settings:
disabled-checks:
- paramTypeCombine
- unnamedResult
- unnecessaryDefer
settings: # settings passed to gocritic
hugeParam:
sizeThreshold: 512
Expand Down
2 changes: 1 addition & 1 deletion build/build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN curl -L ${HELM_URL} > /tmp/helm.tar.gz \
RUN echo "source <(helm completion bash)" >> /root/.bashrc

# install golang-ci linter
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.27.0
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.30.0

#
# \ \ / /__| |__ ___(_) |_ ___
Expand Down
4 changes: 2 additions & 2 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ func parseEnvFlags() config {
viper.SetDefault(sidecarMemoryLimitFlag, "0")
viper.SetDefault(pullSidecarFlag, false)
viper.SetDefault(sdkServerAccountFlag, "agones-sdk")
viper.SetDefault(certFileFlag, filepath.Join(base, "certs/server.crt"))
viper.SetDefault(keyFileFlag, filepath.Join(base, "certs/server.key"))
viper.SetDefault(certFileFlag, filepath.Join(base, "certs", "server.crt"))
viper.SetDefault(keyFileFlag, filepath.Join(base, "certs", "server.key"))
viper.SetDefault(enablePrometheusMetricsFlag, true)
viper.SetDefault(enableStackdriverMetricsFlag, false)
viper.SetDefault(stackdriverLabels, "")
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func NewFromFlags() (*Framework, error) {
return nil, err
}

viper.SetDefault(kubeconfigFlag, filepath.Join(usr.HomeDir, "/.kube/config"))
viper.SetDefault(kubeconfigFlag, filepath.Join(usr.HomeDir, ".kube", "config"))
viper.SetDefault(gsimageFlag, "gcr.io/agones-images/udp-server:0.21")
viper.SetDefault(pullSecretFlag, "")
viper.SetDefault(stressTestLevelFlag, 0)
Expand Down
2 changes: 1 addition & 1 deletion test/load/allocation/allocationload.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func main() {
if err != nil {
logrus.Fatalf("Unable to determine the current user: %v", err)
}
kubeconfig := flag.String("kubeconfig", filepath.Join(usr.HomeDir, "/.kube/config"),
kubeconfig := flag.String("kubeconfig", filepath.Join(usr.HomeDir, ".kube", "config"),
"kube config path, e.g. $HOME/.kube/config")
fleetName := flag.String("fleet_name", "simple-udp", "The fleet name that the tests will run against")
qps := flag.Int("qps", 1000, "The QPS value that will overwrite the default value")
Expand Down

0 comments on commit 42776b6

Please sign in to comment.