Skip to content

Bump golangci/golangci-lint-action from 6 to 7 in the github-actions group #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.22.2'
go-version: '1.24.1'
cache-dependency-path: "**/*.sum"
- uses: actions/checkout@v4
- run: go mod verify
Expand All @@ -31,7 +31,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.22.2'
go-version: '1.24.1'
cache-dependency-path: "**/*.sum"
- uses: actions/checkout@v4
- run: go mod verify
Expand All @@ -44,7 +44,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.22.2'
go-version: '1.24.1'
cache-dependency-path: "**/*.sum"
- uses: actions/checkout@v4
- run: go mod verify
Expand All @@ -61,7 +61,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.22.2'
go-version: '1.24.1'
cache-dependency-path: "**/*.sum"
- uses: actions/checkout@v4
- run: go vet ./...
Expand All @@ -78,17 +78,17 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.22.2'
go-version: '1.24.1'
cache-dependency-path: "**/*.sum"
- uses: actions/checkout@v4
- uses: golangci/golangci-lint-action@v6
- uses: golangci/golangci-lint-action@v7
with:
version: 'v1.57.2'
- uses: golangci/golangci-lint-action@v6
version: 'v2.0.1'
- uses: golangci/golangci-lint-action@v7
with:
working-directory: 'fuzz'
version: 'v1.57.2'
- uses: golangci/golangci-lint-action@v6
version: 'v2.0.1'
- uses: golangci/golangci-lint-action@v7
with:
working-directory: 'integration'
version: 'v1.57.2'
version: 'v2.0.1'
2 changes: 1 addition & 1 deletion filter/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func isValidPostgresIdentifier(s string) bool {
}

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

Expand Down
24 changes: 18 additions & 6 deletions integration/postgres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func TestIntegration_ReadmeExample(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer rows.Close()
ids := []int{}
for rows.Next() {
var id int
Expand All @@ -82,6 +81,9 @@ func TestIntegration_ReadmeExample(t *testing.T) {
}
ids = append(ids, id)
}
if err := rows.Err(); err != nil {
t.Fatal(err)
}

if len(ids) != 2 {
t.Fatalf("expected 2 rows, got %d", len(ids))
Expand Down Expand Up @@ -137,7 +139,6 @@ func TestIntegration_InAny_PQ(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer rows.Close()
ids := []int{}
for rows.Next() {
var id int
Expand All @@ -146,6 +147,9 @@ func TestIntegration_InAny_PQ(t *testing.T) {
}
ids = append(ids, id)
}
if err := rows.Err(); err != nil {
t.Fatal(err)
}

if len(ids) != 8 {
t.Fatalf("expected 8 rows, got %d", len(ids))
Expand Down Expand Up @@ -202,7 +206,6 @@ func TestIntegration_InAny_PGX(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer rows.Close()
ids := []int{}
for rows.Next() {
var id int
Expand All @@ -211,6 +214,9 @@ func TestIntegration_InAny_PGX(t *testing.T) {
}
ids = append(ids, id)
}
if err := rows.Err(); err != nil {
t.Fatal(err)
}

if len(ids) != 8 {
t.Fatalf("expected 8 rows, got %d", len(ids))
Expand Down Expand Up @@ -466,7 +472,6 @@ func TestIntegration_BasicOperators(t *testing.T) {
}
return
}
defer rows.Close()
players := []int{}
for rows.Next() {
var id int
Expand All @@ -475,6 +480,9 @@ func TestIntegration_BasicOperators(t *testing.T) {
}
players = append(players, id)
}
if err := rows.Err(); err != nil {
t.Fatal(err)
}

if !reflect.DeepEqual(players, tt.expectedPlayers) {
t.Fatalf("expected %v, got %v", tt.expectedPlayers, players)
Expand Down Expand Up @@ -536,7 +544,6 @@ func TestIntegration_NestedJSONB(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer rows.Close()
players := []int{}
for rows.Next() {
var id int
Expand All @@ -545,6 +552,9 @@ func TestIntegration_NestedJSONB(t *testing.T) {
}
players = append(players, id)
}
if err := rows.Err(); err != nil {
t.Fatal(err)
}

if !reflect.DeepEqual(players, tt.expectedPlayers) {
t.Fatalf("%q expected %v, got %v (conditions used: %q)", tt.input, tt.expectedPlayers, players, conditions)
Expand Down Expand Up @@ -604,7 +614,6 @@ func TestIntegration_Logic(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer rows.Close()
players := []int{}
for rows.Next() {
var id int
Expand All @@ -613,6 +622,9 @@ func TestIntegration_Logic(t *testing.T) {
}
players = append(players, id)
}
if err := rows.Err(); err != nil {
t.Fatal(err)
}

if !reflect.DeepEqual(players, tt.expectedPlayers) {
t.Fatalf("%q expected %v, got %v (conditions used: %q)", tt.input, tt.expectedPlayers, players, conditions)
Expand Down
2 changes: 1 addition & 1 deletion integration/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func setupPQ(t *testing.T) *sql.DB {
return db.PingContext(ctx)
})
t.Cleanup(func() {
db.Close()
db.Close() //nolint:errcheck
})

return db
Expand Down
Loading