Skip to content

Commit

Permalink
golangci-lint: enable copyloopvar linter
Browse files Browse the repository at this point in the history
go1.22 now creates a copy of variables when assigned in a loop; enable the
copyloopvar linter to find locations where we capture loop vars that are
now redundant; https://go.dev/ref/spec#Go_1.22

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Nov 12, 2024
1 parent d67a21b commit 7d89d83
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
linters:
enable:
- copyloopvar # Detects places where loop variables are copied.
- depguard
- dupword # Detects duplicate words.
- goimports
Expand Down

0 comments on commit 7d89d83

Please sign in to comment.