Skip to content

Commit 79d4fd9

Browse files
dependabot[bot]erikdubbelboer
authored andcommitted
Bump golangci/golangci-lint-action in the github-actions group
Bumps the github-actions group with 1 update: [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action). Updates `golangci/golangci-lint-action` from 6 to 7 - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@v6...v7) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <[email protected]>
1 parent 1819598 commit 79d4fd9

File tree

4 files changed

+31
-19
lines changed

4 files changed

+31
-19
lines changed

.github/workflows/golang.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- uses: actions/setup-go@v5
2121
with:
22-
go-version: '1.22.2'
22+
go-version: '1.24.1'
2323
cache-dependency-path: "**/*.sum"
2424
- uses: actions/checkout@v4
2525
- run: go mod verify
@@ -31,7 +31,7 @@ jobs:
3131
steps:
3232
- uses: actions/setup-go@v5
3333
with:
34-
go-version: '1.22.2'
34+
go-version: '1.24.1'
3535
cache-dependency-path: "**/*.sum"
3636
- uses: actions/checkout@v4
3737
- run: go mod verify
@@ -44,7 +44,7 @@ jobs:
4444
steps:
4545
- uses: actions/setup-go@v5
4646
with:
47-
go-version: '1.22.2'
47+
go-version: '1.24.1'
4848
cache-dependency-path: "**/*.sum"
4949
- uses: actions/checkout@v4
5050
- run: go mod verify
@@ -61,7 +61,7 @@ jobs:
6161
steps:
6262
- uses: actions/setup-go@v5
6363
with:
64-
go-version: '1.22.2'
64+
go-version: '1.24.1'
6565
cache-dependency-path: "**/*.sum"
6666
- uses: actions/checkout@v4
6767
- run: go vet ./...
@@ -78,17 +78,17 @@ jobs:
7878
steps:
7979
- uses: actions/setup-go@v5
8080
with:
81-
go-version: '1.22.2'
81+
go-version: '1.24.1'
8282
cache-dependency-path: "**/*.sum"
8383
- uses: actions/checkout@v4
84-
- uses: golangci/golangci-lint-action@v6
84+
- uses: golangci/golangci-lint-action@v7
8585
with:
86-
version: 'v1.57.2'
87-
- uses: golangci/golangci-lint-action@v6
86+
version: 'v2.0.1'
87+
- uses: golangci/golangci-lint-action@v7
8888
with:
8989
working-directory: 'fuzz'
90-
version: 'v1.57.2'
91-
- uses: golangci/golangci-lint-action@v6
90+
version: 'v2.0.1'
91+
- uses: golangci/golangci-lint-action@v7
9292
with:
9393
working-directory: 'integration'
94-
version: 'v1.57.2'
94+
version: 'v2.0.1'

filter/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func isValidPostgresIdentifier(s string) bool {
5858
}
5959

6060
// The first character needs to be a letter or _
61-
if !(s[0] >= 'a' && s[0] <= 'z') && !(s[0] >= 'A' && s[0] <= 'Z') && s[0] != '_' {
61+
if (s[0] < 'a' || s[0] > 'z') && (s[0] < 'A' || s[0] > 'Z') && s[0] != '_' {
6262
return false
6363
}
6464

integration/postgres_test.go

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ func TestIntegration_ReadmeExample(t *testing.T) {
7373
if err != nil {
7474
t.Fatal(err)
7575
}
76-
defer rows.Close()
7776
ids := []int{}
7877
for rows.Next() {
7978
var id int
@@ -82,6 +81,9 @@ func TestIntegration_ReadmeExample(t *testing.T) {
8281
}
8382
ids = append(ids, id)
8483
}
84+
if err := rows.Err(); err != nil {
85+
t.Fatal(err)
86+
}
8587

8688
if len(ids) != 2 {
8789
t.Fatalf("expected 2 rows, got %d", len(ids))
@@ -137,7 +139,6 @@ func TestIntegration_InAny_PQ(t *testing.T) {
137139
if err != nil {
138140
t.Fatal(err)
139141
}
140-
defer rows.Close()
141142
ids := []int{}
142143
for rows.Next() {
143144
var id int
@@ -146,6 +147,9 @@ func TestIntegration_InAny_PQ(t *testing.T) {
146147
}
147148
ids = append(ids, id)
148149
}
150+
if err := rows.Err(); err != nil {
151+
t.Fatal(err)
152+
}
149153

150154
if len(ids) != 8 {
151155
t.Fatalf("expected 8 rows, got %d", len(ids))
@@ -202,7 +206,6 @@ func TestIntegration_InAny_PGX(t *testing.T) {
202206
if err != nil {
203207
t.Fatal(err)
204208
}
205-
defer rows.Close()
206209
ids := []int{}
207210
for rows.Next() {
208211
var id int
@@ -211,6 +214,9 @@ func TestIntegration_InAny_PGX(t *testing.T) {
211214
}
212215
ids = append(ids, id)
213216
}
217+
if err := rows.Err(); err != nil {
218+
t.Fatal(err)
219+
}
214220

215221
if len(ids) != 8 {
216222
t.Fatalf("expected 8 rows, got %d", len(ids))
@@ -466,7 +472,6 @@ func TestIntegration_BasicOperators(t *testing.T) {
466472
}
467473
return
468474
}
469-
defer rows.Close()
470475
players := []int{}
471476
for rows.Next() {
472477
var id int
@@ -475,6 +480,9 @@ func TestIntegration_BasicOperators(t *testing.T) {
475480
}
476481
players = append(players, id)
477482
}
483+
if err := rows.Err(); err != nil {
484+
t.Fatal(err)
485+
}
478486

479487
if !reflect.DeepEqual(players, tt.expectedPlayers) {
480488
t.Fatalf("expected %v, got %v", tt.expectedPlayers, players)
@@ -536,7 +544,6 @@ func TestIntegration_NestedJSONB(t *testing.T) {
536544
if err != nil {
537545
t.Fatal(err)
538546
}
539-
defer rows.Close()
540547
players := []int{}
541548
for rows.Next() {
542549
var id int
@@ -545,6 +552,9 @@ func TestIntegration_NestedJSONB(t *testing.T) {
545552
}
546553
players = append(players, id)
547554
}
555+
if err := rows.Err(); err != nil {
556+
t.Fatal(err)
557+
}
548558

549559
if !reflect.DeepEqual(players, tt.expectedPlayers) {
550560
t.Fatalf("%q expected %v, got %v (conditions used: %q)", tt.input, tt.expectedPlayers, players, conditions)
@@ -604,7 +614,6 @@ func TestIntegration_Logic(t *testing.T) {
604614
if err != nil {
605615
t.Fatal(err)
606616
}
607-
defer rows.Close()
608617
players := []int{}
609618
for rows.Next() {
610619
var id int
@@ -613,6 +622,9 @@ func TestIntegration_Logic(t *testing.T) {
613622
}
614623
players = append(players, id)
615624
}
625+
if err := rows.Err(); err != nil {
626+
t.Fatal(err)
627+
}
616628

617629
if !reflect.DeepEqual(players, tt.expectedPlayers) {
618630
t.Fatalf("%q expected %v, got %v (conditions used: %q)", tt.input, tt.expectedPlayers, players, conditions)

integration/setup_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func setupPQ(t *testing.T) *sql.DB {
2929
return db.PingContext(ctx)
3030
})
3131
t.Cleanup(func() {
32-
db.Close()
32+
db.Close() //nolint:errcheck
3333
})
3434

3535
return db

0 commit comments

Comments
 (0)