Skip to content

Commit 681a3eb

Browse files
authored
Remove some lint deprecation warnings (#407)
And switch to use the new `copyloopvar` check for Go > 1.22
1 parent 0cab124 commit 681a3eb

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

.golangci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
goVersion: &goVersion "1.21"
1+
goVersion: &goVersion "1.23"
22

33
run:
44
go: *goVersion
@@ -10,7 +10,7 @@ linters:
1010
# https://golangci-lint.run/usage/linters/#enabled-by-default-linters
1111
enable:
1212
- errorlint
13-
- exportloopref
13+
- copyloopvar
1414
- forcetypeassert
1515
- goconst
1616
- gocritic
@@ -56,16 +56,13 @@ linters-settings:
5656
- commentFormatting
5757

5858
gofumpt:
59-
lang-version: *goVersion
6059
module-path: "pgroll"
6160
extra-rules: false
6261

6362
staticcheck:
64-
go: *goVersion
6563
checks: ["all"]
6664

6765
stylecheck:
68-
go: *goVersion
6966
checks: ["all", "-ST1000", "-ST1005"]
7067

7168
unused:

pkg/migrations/trigger_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ func TestBuildFunction(t *testing.T) {
188188
}
189189

190190
for _, tc := range testCases {
191-
tc := tc
192191
t.Run(tc.name, func(t *testing.T) {
193192
t.Parallel()
194193

@@ -221,7 +220,6 @@ func TestBuildTrigger(t *testing.T) {
221220
}
222221

223222
for _, tc := range testCases {
224-
tc := tc
225223
t.Run(tc.name, func(t *testing.T) {
226224
t.Parallel()
227225

0 commit comments

Comments
 (0)