Skip to content

Commit de6e426

Browse files
authored
bump deps and go to 1.24. Linter migration (#284)
1 parent d9d5725 commit de6e426

File tree

11 files changed

+134
-117
lines changed

11 files changed

+134
-117
lines changed

.github/workflows/build_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup Go
2424
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
2525
with:
26-
go-version: '1.23'
26+
go-version: '1.24'
2727
- name: Install dependencies
2828
run: go mod download
2929
- name: Verify dependencies

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1919
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # 5.3.0
2020
with:
21-
go-version: '1.23'
21+
go-version: '1.24'
2222
cache: false
2323
- name: golangci-lint
24-
uses: golangci/golangci-lint-action@e60da84bfae8c7920a47be973d75e15710aa8bd7 # v6.3.0
24+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
2525
with:
26-
version: v1.63
26+
version: v2.0
2727
only-new-issues: true
2828
args: --timeout=5m

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- "v1.[0-9]+.[0-9]+"
99

1010
env:
11-
GO_VERSION: 1.23
11+
GO_VERSION: 1.24
1212
GO_RELEASER_VERSION: v2.4.7
1313

1414
permissions: {}

.golangci.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,38 @@
1+
version: "2"
12
linters:
2-
disable-all: true
3+
default: none
34
enable:
5+
- copyloopvar
46
- errcheck
5-
- gosimple
7+
- errorlint
68
- govet
79
- ineffassign
8-
- staticcheck
9-
- unused
10-
- gofmt
11-
- errorlint
10+
- perfsprint
1211
- prealloc
1312
- predeclared
1413
- protogetter
14+
- staticcheck
1515
- testifylint
16-
- zerologlint
17-
- copyloopvar
16+
- unused
1817
- wrapcheck
19-
- perfsprint
18+
- zerologlint
19+
exclusions:
20+
generated: lax
21+
presets:
22+
- comments
23+
- common-false-positives
24+
- legacy
25+
- std-error-handling
26+
paths:
27+
- third_party$
28+
- builtin$
29+
- examples$
30+
formatters:
31+
enable:
32+
- gofmt
33+
exclusions:
34+
generated: lax
35+
paths:
36+
- third_party$
37+
- builtin$
38+
- examples$

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Before you start contributing, please make sure to read and abide by our [Code o
1212

1313
To contribute to Poutine, you'll need the following:
1414

15-
- [Go toolchain v1.23](https://golang.org/dl/) or higher.
15+
- [Go toolchain v1.24](https://golang.org/dl/) or higher.
1616

1717
### Contributing Process
1818

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ See [.poutine.sample.yml](.poutine.sample.yml) for an example configuration file
119119

120120
## Building from source
121121

122-
Building `poutine` requires Go 1.23.
122+
Building `poutine` requires Go 1.24+.
123123

124124
```bash
125125
git clone https://github.com/boostsecurityio/poutine.git

dagger/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module dagger/poutine
22

3-
go 1.23.0
3+
go 1.24.0

formatters/json/json.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package json
22

33
import (
44
"context"
5+
"errors"
56
"fmt"
67
"github.com/boostsecurityio/poutine/models"
78
"github.com/boostsecurityio/poutine/opa"
@@ -40,7 +41,7 @@ func (f *Format) Format(ctx context.Context, packages []*models.PackageInsights)
4041
report.Rules[rule.Id] = rule
4142
}
4243
}
43-
err := f.opa.Eval(ctx,
44+
if err := f.opa.Eval(ctx,
4445
"data.poutine.queries.format.result",
4546
map[string]interface{}{
4647
"packages": packages,
@@ -49,13 +50,12 @@ func (f *Format) Format(ctx context.Context, packages []*models.PackageInsights)
4950
"builtin_formats": []string{"sarif", "pretty"},
5051
},
5152
&result,
52-
)
53-
if err != nil {
53+
); err != nil {
5454
return err
5555
}
5656

5757
if result.Error != "" {
58-
return fmt.Errorf(result.Error)
58+
return errors.New(result.Error)
5959
}
6060

6161
fmt.Fprint(f.out, result.Output)

go.mod

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
module github.com/boostsecurityio/poutine
22

3-
go 1.23.0
3+
go 1.24
4+
45
toolchain go1.24.1
56

67
require (
7-
github.com/gofri/go-github-ratelimit v1.1.0
8+
github.com/gofri/go-github-ratelimit v1.1.1
89
github.com/google/go-github/v59 v59.0.0
910
github.com/hashicorp/go-version v1.7.0
1011
github.com/olekukonko/tablewriter v0.0.5
1112
github.com/open-policy-agent/opa v1.3.0
1213
github.com/owenrumney/go-sarif/v2 v2.3.3
1314
github.com/package-url/packageurl-go v0.1.3
14-
github.com/rs/zerolog v1.33.0
15+
github.com/rs/zerolog v1.34.0
1516
github.com/schollz/progressbar/v3 v3.18.0
1617
github.com/shurcooL/githubv4 v0.0.0-20240727222349-48295856cce7
1718
github.com/spf13/cobra v1.9.1
18-
github.com/spf13/viper v1.19.0
19+
github.com/spf13/viper v1.20.1
1920
github.com/stretchr/testify v1.10.0
20-
gitlab.com/gitlab-org/api/client-go v0.122.0
21-
golang.org/x/oauth2 v0.26.0
22-
golang.org/x/sync v0.12.0
21+
gitlab.com/gitlab-org/api/client-go v0.127.0
22+
golang.org/x/oauth2 v0.29.0
23+
golang.org/x/sync v0.13.0
2324
gopkg.in/yaml.v3 v3.0.1
2425
)
2526

@@ -28,39 +29,38 @@ require (
2829
github.com/beorn7/perks v1.0.1 // indirect
2930
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3031
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
31-
github.com/fsnotify/fsnotify v1.8.0 // indirect
32+
github.com/dgraph-io/badger/v4 v4.7.0 // indirect
33+
github.com/fsnotify/fsnotify v1.9.0 // indirect
3234
github.com/go-ini/ini v1.67.0 // indirect
3335
github.com/go-logr/logr v1.4.2 // indirect
3436
github.com/go-logr/stdr v1.2.2 // indirect
37+
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
3538
github.com/gobwas/glob v0.2.3 // indirect
3639
github.com/google/go-querystring v1.1.0 // indirect
3740
github.com/google/uuid v1.6.0 // indirect
3841
github.com/gorilla/mux v1.8.1 // indirect
42+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
3943
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
4044
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
41-
github.com/hashicorp/hcl v1.0.0 // indirect
4245
github.com/inconshreveable/mousetrap v1.1.0 // indirect
43-
github.com/magiconair/properties v1.8.9 // indirect
4446
github.com/mattn/go-colorable v0.1.14 // indirect
4547
github.com/mattn/go-isatty v0.0.20 // indirect
4648
github.com/mattn/go-runewidth v0.0.16 // indirect
4749
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
48-
github.com/mitchellh/mapstructure v1.5.0 // indirect
4950
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
50-
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
51+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
5152
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
52-
github.com/prometheus/client_golang v1.21.1 // indirect
53-
github.com/prometheus/client_model v0.6.1 // indirect
54-
github.com/prometheus/common v0.62.0 // indirect
55-
github.com/prometheus/procfs v0.15.1 // indirect
56-
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
53+
github.com/prometheus/client_golang v1.22.0 // indirect
54+
github.com/prometheus/client_model v0.6.2 // indirect
55+
github.com/prometheus/common v0.63.0 // indirect
56+
github.com/prometheus/procfs v0.16.0 // indirect
57+
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect
5758
github.com/rivo/uniseg v0.4.7 // indirect
58-
github.com/sagikazarmark/locafero v0.7.0 // indirect
59-
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
59+
github.com/sagikazarmark/locafero v0.9.0 // indirect
6060
github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 // indirect
6161
github.com/sirupsen/logrus v1.9.3 // indirect
6262
github.com/sourcegraph/conc v0.3.0 // indirect
63-
github.com/spf13/afero v1.12.0 // indirect
63+
github.com/spf13/afero v1.14.0 // indirect
6464
github.com/spf13/cast v1.7.1 // indirect
6565
github.com/spf13/pflag v1.0.6 // indirect
6666
github.com/subosito/gotenv v1.6.0 // indirect
@@ -74,12 +74,15 @@ require (
7474
go.opentelemetry.io/otel/sdk v1.35.0 // indirect
7575
go.opentelemetry.io/otel/trace v1.35.0 // indirect
7676
go.uber.org/multierr v1.11.0 // indirect
77-
golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c // indirect
78-
golang.org/x/sys v0.31.0 // indirect
79-
golang.org/x/term v0.30.0 // indirect
80-
golang.org/x/text v0.23.0 // indirect
77+
golang.org/x/net v0.39.0 // indirect
78+
golang.org/x/sys v0.32.0 // indirect
79+
golang.org/x/term v0.31.0 // indirect
80+
golang.org/x/text v0.24.0 // indirect
8181
golang.org/x/time v0.11.0 // indirect
82-
google.golang.org/protobuf v1.36.5 // indirect
83-
gopkg.in/ini.v1 v1.67.0 // indirect
82+
golang.org/x/tools v0.29.0 // indirect
83+
google.golang.org/genproto/googleapis/api v0.0.0-20250414145226-207652e42e2e // indirect
84+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect
85+
google.golang.org/grpc v1.71.1 // indirect
86+
google.golang.org/protobuf v1.36.6 // indirect
8487
sigs.k8s.io/yaml v1.4.0 // indirect
8588
)

0 commit comments

Comments
 (0)