From eff98f397d2978141b7c616e9c373d4663e6206c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jer=C3=B3nimo=20Albi?= Date: Mon, 16 Oct 2023 12:21:56 +0200 Subject: [PATCH] ci: update `golangci-lint` to version `v1.54.2 ` (#3697) * ci: change `golangci-lint` setup to compile the binary Pre-compiled binary for the current version doesn't support the features released with Go `1.21` because is compiled with a previous Go version. This change makes sure the binary is cached and compiled with the right Go version. * ci: update `golangci-lint` to version `v1.54.2` Depguard is disabled to avoid "not allowed from list" errors. --- .github/workflows/test-lint.yml | 7 ++++++- .golangci.yml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-lint.yml b/.github/workflows/test-lint.yml index 34ec364ef9..46cc7973c2 100644 --- a/.github/workflows/test-lint.yml +++ b/.github/workflows/test-lint.yml @@ -24,9 +24,14 @@ jobs: **/*.go go.mod go.sum + - uses: actions/setup-go@v4 + if: env.GIT_DIFF + with: + go-version-file: go.mod - uses: golangci/golangci-lint-action@v3 if: env.GIT_DIFF with: - version: v1.52.1 + version: v1.54.2 + install-mode: goinstall args: --timeout 10m github-token: ${{ secrets.github_token }} diff --git a/.golangci.yml b/.golangci.yml index 5cdf2c1089..ed09a7a08e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,7 +10,7 @@ linters: enable: - bodyclose - decorder - - depguard + # - depguard - dogsled - dupword # - errcheck