From a65b90d479c66b61bed8cfc7b029ad3bca409910 Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Wed, 6 Mar 2024 10:19:45 +0100 Subject: [PATCH] Ensure to use latest golangci-lint (#15413) Signed-off-by: Dirkjan Bussink --- .github/workflows/static_checks_etc.yml | 2 +- .golangci.yml | 1 - misc/git/hooks/golangci-lint | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/static_checks_etc.yml b/.github/workflows/static_checks_etc.yml index 13c062c5b88..afef29a748d 100644 --- a/.github/workflows/static_checks_etc.yml +++ b/.github/workflows/static_checks_etc.yml @@ -173,7 +173,7 @@ jobs: - name: Install golangci-lint if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true' - run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.0 + run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2 - name: Clean Env if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true' diff --git a/.golangci.yml b/.golangci.yml index ce554ad99ba..74c55100516 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -27,7 +27,6 @@ linters: # Extras - gofmt - goimports - - exportloopref - bodyclose # revive is a replacement for golint, but we do not run it in CI for now. diff --git a/misc/git/hooks/golangci-lint b/misc/git/hooks/golangci-lint index 3ad4775271a..d152cb965a3 100755 --- a/misc/git/hooks/golangci-lint +++ b/misc/git/hooks/golangci-lint @@ -16,7 +16,7 @@ GOLANGCI_LINT=$(command -v golangci-lint >/dev/null 2>&1) if [ $? -eq 1 ]; then echo "Downloading golangci-lint..." - go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2 + go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2 fi gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '^go/.*\.go$')