From ae8bea1b3b0b88faa0dc600a25ebce6b05ab4196 Mon Sep 17 00:00:00 2001 From: Eric Van Norman Date: Tue, 25 May 2021 12:59:13 -0500 Subject: [PATCH] Update common-files and fix lint failure --- common/.commonfiles.sha | 2 +- common/config/.golangci-format.yml | 2 +- common/config/.golangci.yml | 3 ++- prow/config/generate.go | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common/.commonfiles.sha b/common/.commonfiles.sha index c46e7050b6d..24b11f43d75 100644 --- a/common/.commonfiles.sha +++ b/common/.commonfiles.sha @@ -1 +1 @@ -6dd7adf938419af5876a29c2b7922ee9feac9c1f +113cffa1db6902f54432c3c42083db2f6385d4c9 diff --git a/common/config/.golangci-format.yml b/common/config/.golangci-format.yml index 0b459294083..cbac3094a7e 100644 --- a/common/config/.golangci-format.yml +++ b/common/config/.golangci-format.yml @@ -7,7 +7,7 @@ service: # When updating this, also update the version stored in docker/build-tools/Dockerfile in the istio/tools repo. - golangci-lint-version: 1.27.x # use the fixed version to not introduce new linters unexpectedly + golangci-lint-version: 1.38.x # use the fixed version to not introduce new linters unexpectedly run: # timeout for analysis, e.g. 30s, 5m, default is 1m deadline: 20m diff --git a/common/config/.golangci.yml b/common/config/.golangci.yml index 8acee660597..7eb8308d2ee 100644 --- a/common/config/.golangci.yml +++ b/common/config/.golangci.yml @@ -7,7 +7,7 @@ service: # When updating this, also update the version stored in docker/build-tools/Dockerfile in the istio/tools repo. - golangci-lint-version: 1.27.x # use the fixed version to not introduce new linters unexpectedly + golangci-lint-version: 1.38.x # use the fixed version to not introduce new linters unexpectedly run: # timeout for analysis, e.g. 30s, 5m, default is 1m deadline: 20m @@ -37,6 +37,7 @@ linters: enable: - deadcode - errcheck + - exportloopref - gocritic - gofumpt - goimports diff --git a/prow/config/generate.go b/prow/config/generate.go index a92c9c184cc..58962f982b7 100644 --- a/prow/config/generate.go +++ b/prow/config/generate.go @@ -591,6 +591,7 @@ func diffConfigPostsubmit(result config.JobConfig, pj config.JobConfig) { known[job.Name] = struct{}{} var current *config.Postsubmit for _, ps := range allCurrentPostsubmits { + ps := ps if ps.Name == job.Name { current = &ps break