Skip to content

Commit

Permalink
feat(golangcilint): replace exportloopref with copyloopvar
Browse files Browse the repository at this point in the history
We currently get the following warning when running the linter:
"The linter 'exportloopref' is deprecated (since v1.60.2) due to:
Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar."
  • Loading branch information
christka1 authored and odsod committed Aug 28, 2024
1 parent 4afe0c0 commit 55ef3d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/sggolangcilint/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ linters:
# [fast: false, auto-fix: false]
- bodyclose

# Copyloopvar is a linter detects places where loop variables are copied.
# [fast: false, auto-fix: false]
- copyloopvar

# Check for two durations multiplied together.
# [fast: false, auto-fix: false]
- durationcheck
Expand All @@ -34,10 +38,6 @@ linters:
# [fast: false, auto-fix: false]
- errorlint

# Check for pointers to enclosing loop variables.
# [fast: false, auto-fix: false]
- exportloopref

# Check package import order and make it always deterministic.
# [fast: true, auto-fix: true]
- gci
Expand Down

0 comments on commit 55ef3d1

Please sign in to comment.