Skip to content

Commit 31fdaf3

Browse files
authored
Merge pull request #3759 from alexandear/chore/dependabot-tools
chore: enable dependabot for upgrading Go tools
2 parents 7523447 + 3ac32b6 commit 31fdaf3

File tree

6 files changed

+1338
-17
lines changed

6 files changed

+1338
-17
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
version: 2
22
updates:
33
- package-ecosystem: gomod
4-
directory: "/"
4+
directories:
5+
- "/"
6+
- "/hack/tools"
57
schedule:
68
interval: daily
79
open-pull-requests-limit: 10

.github/workflows/test.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ jobs:
3333
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3434
with:
3535
go-version: 1.24.x
36-
- name: Install protoc
36+
- name: Install protoc and Go plugins
3737
run: |
3838
sudo apt-get update
3939
sudo apt-get install -y protobuf-compiler
40+
make install-protoc-tools
4041
- name: Verify generated files
41-
run: make install-tools generate check-generated
42+
run: make generate check-generated
4243
- name: Run yamllint
4344
run: yamllint .
4445
- name: Install shellcheck
@@ -49,27 +50,22 @@ jobs:
4950
uses: ls-lint/action@02e380fe8733d499cbfc9e22276de5085508a5bd # v2.3.1
5051
- name: Run shellcheck
5152
run: find . -name '*.sh' | xargs shellcheck
52-
- name: Install shfmt
53-
run: go install mvdan.cc/sh/v3/cmd/[email protected]
5453
- name: Run shfmt
55-
run: find . -name '*.sh' | xargs shfmt -s -d
54+
run: find . -name '*.sh' | xargs go tool -modfile=./hack/tools/go.mod shfmt -s -d
5655
- name: Check hyperlinks
5756
uses: docker://dkhamsing/awesome_bot:latest@sha256:a8adaeb3b3bd5745304743e4d8a6d512127646e420544a6d22d9f58a07f35884
5857
with:
5958
args: /github/workspace/README.md --allow-dupe --allow-redirect --request-delay 1 --white-list https://img.shields.io,http://127.0.0.1:8080,https://github.com/lima-vm/lima/releases/download,https://xbarapp.com,https://api.github.com
6059
- name: Install go-licenses
60+
# TODO: move to `go tool` after upgrading to v2
6161
run: go install github.com/google/[email protected]
6262
- name: Check licenses
6363
# the allow list corresponds to https://github.com/cncf/foundation/blob/e5db022a0009f4db52b89d9875640cf3137153fe/allowed-third-party-license-policy.md
6464
run: go-licenses check --include_tests ./... --allowed_licenses=$(cat ./hack/allowed-licenses.txt)
65-
- name: Install ltag
66-
run: go install github.com/containerd/[email protected]
6765
- name: Check license boilerplates
68-
run: ltag -t ./hack/ltag --check -v
69-
- name: Install protolint
70-
run: go install github.com/yoheimuta/protolint/cmd/[email protected]
66+
run: go tool -modfile=./hack/tools/go.mod ltag -t ./hack/ltag --check -v
7167
- name: Check protobuf files
72-
run: protolint .
68+
run: go tool -modfile=./hack/tools/go.mod protolint .
7369

7470
lint-go:
7571
name: "Lint Go"
@@ -92,10 +88,15 @@ jobs:
9288
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
9389
with:
9490
go-version: 1.24.x
91+
- id: golangci-lint-version
92+
shell: bash
93+
working-directory: hack/tools
94+
run: |
95+
echo "GOLANGCI_LINT_VERSION=$(go list -m -f '{{.Version}}' github.com/golangci/golangci-lint/v2)" >> $GITHUB_OUTPUT
9596
- name: Run golangci-lint
9697
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
9798
with:
98-
version: v2.2
99+
version: ${{ steps.golangci-lint-version.outputs.GOLANGCI_LINT_VERSION }}
99100
args: --verbose
100101

101102
security:

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,10 +520,10 @@ lint: check-generated
520520
clean:
521521
rm -rf _output vendor
522522

523-
.PHONY: install-tools
524-
install-tools:
525-
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
526-
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
523+
.PHONY: install-protoc-tools
524+
install-protoc-tools:
525+
go install -modfile=./hack/tools/go.mod google.golang.org/protobuf/cmd/protoc-gen-go
526+
go install -modfile=./hack/tools/go.mod google.golang.org/grpc/cmd/protoc-gen-go-grpc
527527

528528
.PHONY: generate
529529
generate:

hack/tools/go.mod

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
module tools
2+
3+
go 1.24.0
4+
5+
// Should be in sync with pinversion.go
6+
tool (
7+
github.com/containerd/ltag
8+
github.com/golangci/golangci-lint/v2/cmd/golangci-lint
9+
github.com/yoheimuta/protolint/cmd/protolint
10+
google.golang.org/grpc/cmd/protoc-gen-go-grpc
11+
google.golang.org/protobuf/cmd/protoc-gen-go
12+
mvdan.cc/sh/v3/cmd/shfmt
13+
)
14+
15+
require (
16+
github.com/containerd/ltag v0.3.0
17+
github.com/golangci/golangci-lint/v2 v2.2.2
18+
github.com/yoheimuta/protolint v0.55.6
19+
google.golang.org/grpc v1.73.0
20+
google.golang.org/protobuf v1.36.6
21+
mvdan.cc/sh/v3 v3.8.0
22+
)
23+
24+
require (
25+
4d63.com/gocheckcompilerdirectives v1.3.0 // indirect
26+
4d63.com/gochecknoglobals v0.2.2 // indirect
27+
codeberg.org/chavacava/garif v0.2.0 // indirect
28+
github.com/4meepo/tagalign v1.4.2 // indirect
29+
github.com/Abirdcfly/dupword v0.1.6 // indirect
30+
github.com/AlwxSin/noinlineerr v1.0.5 // indirect
31+
github.com/Antonboom/errname v1.1.0 // indirect
32+
github.com/Antonboom/nilnil v1.1.0 // indirect
33+
github.com/Antonboom/testifylint v1.6.1 // indirect
34+
github.com/BurntSushi/toml v1.5.0 // indirect
35+
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
36+
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1 // indirect
37+
github.com/Masterminds/semver/v3 v3.3.1 // indirect
38+
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
39+
github.com/alecthomas/chroma/v2 v2.19.0 // indirect
40+
github.com/alecthomas/go-check-sumtype v0.3.1 // indirect
41+
github.com/alexkohler/nakedret/v2 v2.0.6 // indirect
42+
github.com/alexkohler/prealloc v1.0.0 // indirect
43+
github.com/alingse/asasalint v0.0.11 // indirect
44+
github.com/alingse/nilnesserr v0.2.0 // indirect
45+
github.com/ashanbrown/forbidigo/v2 v2.1.0 // indirect
46+
github.com/ashanbrown/makezero/v2 v2.0.1 // indirect
47+
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
48+
github.com/beorn7/perks v1.0.1 // indirect
49+
github.com/bkielbasa/cyclop v1.2.3 // indirect
50+
github.com/blizzy78/varnamelen v0.8.0 // indirect
51+
github.com/bombsimon/wsl/v4 v4.7.0 // indirect
52+
github.com/bombsimon/wsl/v5 v5.1.0 // indirect
53+
github.com/breml/bidichk v0.3.3 // indirect
54+
github.com/breml/errchkjson v0.4.1 // indirect
55+
github.com/butuzov/ireturn v0.4.0 // indirect
56+
github.com/butuzov/mirror v1.3.0 // indirect
57+
github.com/catenacyber/perfsprint v0.9.1 // indirect
58+
github.com/ccojocar/zxcvbn-go v1.0.4 // indirect
59+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
60+
github.com/charithe/durationcheck v0.0.10 // indirect
61+
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
62+
github.com/charmbracelet/lipgloss v1.1.0 // indirect
63+
github.com/charmbracelet/x/ansi v0.8.0 // indirect
64+
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
65+
github.com/charmbracelet/x/term v0.2.1 // indirect
66+
github.com/chavacava/garif v0.1.0 // indirect
67+
github.com/ckaznocha/intrange v0.3.1 // indirect
68+
github.com/curioswitch/go-reassign v0.3.0 // indirect
69+
github.com/daixiang0/gci v0.13.6 // indirect
70+
github.com/dave/dst v0.27.3 // indirect
71+
github.com/davecgh/go-spew v1.1.1 // indirect
72+
github.com/denis-tingaikin/go-header v0.5.0 // indirect
73+
github.com/dlclark/regexp2 v1.11.5 // indirect
74+
github.com/ettle/strcase v0.2.0 // indirect
75+
github.com/fatih/color v1.18.0 // indirect
76+
github.com/fatih/structtag v1.2.0 // indirect
77+
github.com/firefart/nonamedreturns v1.0.6 // indirect
78+
github.com/fsnotify/fsnotify v1.5.4 // indirect
79+
github.com/fzipp/gocyclo v0.6.0 // indirect
80+
github.com/gertd/go-pluralize v0.2.1 // indirect
81+
github.com/ghostiam/protogetter v0.3.15 // indirect
82+
github.com/go-critic/go-critic v0.13.0 // indirect
83+
github.com/go-toolsmith/astcast v1.1.0 // indirect
84+
github.com/go-toolsmith/astcopy v1.1.0 // indirect
85+
github.com/go-toolsmith/astequal v1.2.0 // indirect
86+
github.com/go-toolsmith/astfmt v1.1.0 // indirect
87+
github.com/go-toolsmith/astp v1.1.0 // indirect
88+
github.com/go-toolsmith/strparse v1.1.0 // indirect
89+
github.com/go-toolsmith/typep v1.1.0 // indirect
90+
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
91+
github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect
92+
github.com/gobwas/glob v0.2.3 // indirect
93+
github.com/gofrs/flock v0.12.1 // indirect
94+
github.com/golang/protobuf v1.5.4 // indirect
95+
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
96+
github.com/golangci/go-printf-func-name v0.1.0 // indirect
97+
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
98+
github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 // indirect
99+
github.com/golangci/misspell v0.7.0 // indirect
100+
github.com/golangci/plugin-module-register v0.1.2 // indirect
101+
github.com/golangci/revgrep v0.8.0 // indirect
102+
github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e // indirect
103+
github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e // indirect
104+
github.com/google/go-cmp v0.7.0 // indirect
105+
github.com/google/renameio/v2 v2.0.0 // indirect
106+
github.com/gordonklaus/ineffassign v0.1.0 // indirect
107+
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
108+
github.com/gostaticanalysis/comment v1.5.0 // indirect
109+
github.com/gostaticanalysis/forcetypeassert v0.2.0 // indirect
110+
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
111+
github.com/hashicorp/go-hclog v1.6.3 // indirect
112+
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect
113+
github.com/hashicorp/go-plugin v1.6.3 // indirect
114+
github.com/hashicorp/go-version v1.7.0 // indirect
115+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
116+
github.com/hashicorp/hcl v1.0.0 // indirect
117+
github.com/hashicorp/yamux v0.1.2 // indirect
118+
github.com/hexops/gotextdiff v1.0.3 // indirect
119+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
120+
github.com/jgautheron/goconst v1.8.2 // indirect
121+
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
122+
github.com/jjti/go-spancheck v0.6.5 // indirect
123+
github.com/julz/importas v0.2.0 // indirect
124+
github.com/karamaru-alpha/copyloopvar v1.2.1 // indirect
125+
github.com/kisielk/errcheck v1.9.0 // indirect
126+
github.com/kkHAIKE/contextcheck v1.1.6 // indirect
127+
github.com/kulti/thelper v0.6.3 // indirect
128+
github.com/kunwardeep/paralleltest v1.0.14 // indirect
129+
github.com/lasiar/canonicalheader v1.1.2 // indirect
130+
github.com/ldez/exptostd v0.4.4 // indirect
131+
github.com/ldez/gomoddirectives v0.7.0 // indirect
132+
github.com/ldez/grignotin v0.9.0 // indirect
133+
github.com/ldez/tagliatelle v0.7.1 // indirect
134+
github.com/ldez/usetesting v0.5.0 // indirect
135+
github.com/leonklingele/grouper v1.1.2 // indirect
136+
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
137+
github.com/macabu/inamedparam v0.2.0 // indirect
138+
github.com/magiconair/properties v1.8.6 // indirect
139+
github.com/manuelarte/embeddedstructfieldcheck v0.3.0 // indirect
140+
github.com/manuelarte/funcorder v0.5.0 // indirect
141+
github.com/maratori/testableexamples v1.0.0 // indirect
142+
github.com/maratori/testpackage v1.1.1 // indirect
143+
github.com/matoous/godox v1.1.0 // indirect
144+
github.com/mattn/go-colorable v0.1.14 // indirect
145+
github.com/mattn/go-isatty v0.0.20 // indirect
146+
github.com/mattn/go-runewidth v0.0.16 // indirect
147+
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
148+
github.com/mgechev/revive v1.10.0 // indirect
149+
github.com/mitchellh/go-homedir v1.1.0 // indirect
150+
github.com/mitchellh/mapstructure v1.5.0 // indirect
151+
github.com/moricho/tparallel v0.3.2 // indirect
152+
github.com/muesli/termenv v0.16.0 // indirect
153+
github.com/nakabonne/nestif v0.3.1 // indirect
154+
github.com/nishanths/exhaustive v0.12.0 // indirect
155+
github.com/nishanths/predeclared v0.2.2 // indirect
156+
github.com/nunnatsa/ginkgolinter v0.19.1 // indirect
157+
github.com/oklog/run v1.2.0 // indirect
158+
github.com/pelletier/go-toml v1.9.5 // indirect
159+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
160+
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e // indirect
161+
github.com/pmezard/go-difflib v1.0.0 // indirect
162+
github.com/polyfloyd/go-errorlint v1.8.0 // indirect
163+
github.com/prometheus/client_golang v1.12.1 // indirect
164+
github.com/prometheus/client_model v0.2.0 // indirect
165+
github.com/prometheus/common v0.32.1 // indirect
166+
github.com/prometheus/procfs v0.7.3 // indirect
167+
github.com/quasilyte/go-ruleguard v0.4.4 // indirect
168+
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
169+
github.com/quasilyte/gogrep v0.5.0 // indirect
170+
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
171+
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
172+
github.com/raeperd/recvcheck v0.2.0 // indirect
173+
github.com/rivo/uniseg v0.4.7 // indirect
174+
github.com/rogpeppe/go-internal v1.14.1 // indirect
175+
github.com/ryancurrah/gomodguard v1.4.1 // indirect
176+
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
177+
github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect
178+
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
179+
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
180+
github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect
181+
github.com/securego/gosec/v2 v2.22.5 // indirect
182+
github.com/sirupsen/logrus v1.9.3 // indirect
183+
github.com/sivchari/containedctx v1.0.3 // indirect
184+
github.com/sonatard/noctx v0.3.5 // indirect
185+
github.com/sourcegraph/go-diff v0.7.0 // indirect
186+
github.com/spf13/afero v1.14.0 // indirect
187+
github.com/spf13/cast v1.5.0 // indirect
188+
github.com/spf13/cobra v1.9.1 // indirect
189+
github.com/spf13/jwalterweatherman v1.1.0 // indirect
190+
github.com/spf13/pflag v1.0.7 // indirect
191+
github.com/spf13/viper v1.12.0 // indirect
192+
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
193+
github.com/stbenjam/no-sprintf-host-port v0.2.0 // indirect
194+
github.com/stretchr/objx v0.5.2 // indirect
195+
github.com/stretchr/testify v1.10.0 // indirect
196+
github.com/subosito/gotenv v1.4.1 // indirect
197+
github.com/tdakkota/asciicheck v0.4.1 // indirect
198+
github.com/tetafro/godot v1.5.1 // indirect
199+
github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 // indirect
200+
github.com/timonwong/loggercheck v0.11.0 // indirect
201+
github.com/tomarrell/wrapcheck/v2 v2.11.0 // indirect
202+
github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect
203+
github.com/ultraware/funlen v0.2.0 // indirect
204+
github.com/ultraware/whitespace v0.2.0 // indirect
205+
github.com/uudashr/gocognit v1.2.0 // indirect
206+
github.com/uudashr/iface v1.4.1 // indirect
207+
github.com/xen0n/gosmopolitan v1.3.0 // indirect
208+
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
209+
github.com/yagipy/maintidx v1.0.0 // indirect
210+
github.com/yeya24/promlinter v0.3.0 // indirect
211+
github.com/ykadowak/zerologlint v0.1.5 // indirect
212+
github.com/yoheimuta/go-protoparser/v4 v4.14.2 // indirect
213+
gitlab.com/bosi/decorder v0.4.2 // indirect
214+
go-simpler.org/musttag v0.13.1 // indirect
215+
go-simpler.org/sloglint v0.11.1 // indirect
216+
go.augendre.info/arangolint v0.2.0 // indirect
217+
go.augendre.info/fatcontext v0.8.0 // indirect
218+
go.uber.org/atomic v1.7.0 // indirect
219+
go.uber.org/automaxprocs v1.6.0 // indirect
220+
go.uber.org/multierr v1.6.0 // indirect
221+
go.uber.org/zap v1.24.0 // indirect
222+
golang.org/x/exp/typeparams v0.0.0-20250620022241-b7579e27df2b // indirect
223+
golang.org/x/mod v0.26.0 // indirect
224+
golang.org/x/net v0.42.0 // indirect
225+
golang.org/x/sync v0.16.0 // indirect
226+
golang.org/x/sys v0.34.0 // indirect
227+
golang.org/x/term v0.33.0 // indirect
228+
golang.org/x/text v0.27.0 // indirect
229+
golang.org/x/tools v0.34.0 // indirect
230+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250721164621-a45f3dfb1074 // indirect
231+
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 // indirect
232+
gopkg.in/ini.v1 v1.67.0 // indirect
233+
gopkg.in/yaml.v2 v2.4.0 // indirect
234+
gopkg.in/yaml.v3 v3.0.1 // indirect
235+
honnef.co/go/tools v0.6.1 // indirect
236+
mvdan.cc/editorconfig v0.3.0 // indirect
237+
mvdan.cc/gofumpt v0.8.0 // indirect
238+
mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4 // indirect
239+
)

0 commit comments

Comments
 (0)