Skip to content

Commit

Permalink
ci: bump golangci-lint to v1.61
Browse files Browse the repository at this point in the history
The new version produces the following warnings:

WARN [config_reader] The configuration option `linters.govet.check-shadowing` is deprecated. Please enable `shadow` instead, if you are not using `enable-all`.
WARN The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar.

so fix the configuration accordingly.

Note we do not enable copyloopvar since it requires Go 1.22 and we're
currently have it set to Go 1.21.

Signed-off-by: Kir Kolyshkin <[email protected]>
  • Loading branch information
kolyshkin committed Oct 17, 2024
1 parent 50360f5 commit 992e7ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
cache: false # golangci-lint-action does its own caching
- uses: golangci/golangci-lint-action@v6
with:
version: v1.56
version: v1.61

codespell:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
cache: false # golangci-lint-action does its own caching
- uses: golangci/golangci-lint-action@v6
with:
version: v1.56
version: v1.61
- name: test-stubs
run: make test

Expand Down
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ linters:
enable:
- dupword # Detects duplicate words.
- errorlint # Detects code that may cause problems with Go 1.13 error wrapping.
- exportloopref # Detects pointers to enclosing loop variables.
- gocritic # Metalinter; detects bugs, performance, and styling issues.
- gofumpt # Detects whether code was gofumpt-ed.
- gosec # Detects security problems.
Expand All @@ -22,7 +21,6 @@ linters:
- unconvert # Detects unnecessary type conversions.
linters-settings:
govet:
check-shadowing: true
enable-all: true
settings:
shadow:
Expand Down

0 comments on commit 992e7ce

Please sign in to comment.