Skip to content

Commit e541ac7

Browse files
authoredMar 26, 2025··
build(deps): Bump golangci/golangci-lint-action from 6.5.2 to 7.0.0 (#1167)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.5.2 to 7.0.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@55c2c14...1481404) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 21785aa commit e541ac7

File tree

7 files changed

+178
-137
lines changed

7 files changed

+178
-137
lines changed
 

‎.github/workflows/golangci-lint.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717
- name: golangci-lint
18-
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
18+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
1919
with:
2020
version: latest
2121
only-new-issues: false

‎.golangci.yml

+76-67
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,80 @@
1-
issues:
2-
exclude-rules:
3-
- linters:
1+
version: "2"
2+
linters:
3+
enable:
4+
- bodyclose
5+
- contextcheck
6+
- errorlint
47
- gosec
5-
text: 'G101'
6-
path: 'pkg/test/resource/v3/secret.go'
8+
- misspell
9+
- perfsprint
10+
- revive
11+
- testifylint
12+
- unconvert
13+
- unparam
14+
- whitespace
15+
settings:
16+
exhaustive:
17+
default-signifies-exhaustive: true
18+
gosec:
19+
excludes:
20+
- G115
21+
misspell:
22+
locale: US
23+
perfsprint:
24+
int-conversion: true
25+
err-error: true
26+
errorf: true
27+
sprintf1: true
28+
strconcat: true
29+
testifylint:
30+
enable:
31+
- bool-compare
32+
- compares
33+
- empty
34+
- error-is-as
35+
- error-nil
36+
- expected-actual
37+
- len
38+
- require-error
39+
- suite-dont-use-pkg
40+
- suite-extra-assert-call
41+
disable:
42+
- float-compare
43+
- go-require
44+
unparam:
45+
check-exported: false
46+
exclusions:
47+
generated: lax
48+
presets:
49+
- comments
50+
- common-false-positives
51+
- legacy
52+
- std-error-handling
53+
rules:
54+
- linters:
55+
- gosec
56+
path: pkg/test/resource/v3/secret.go
57+
text: G101
58+
paths:
59+
- third_party$
60+
- builtin$
61+
- examples$
62+
issues:
763
max-issues-per-linter: 0
864
max-same-issues: 0
9-
10-
linters:
65+
formatters:
1166
enable:
12-
- bodyclose
13-
- contextcheck
14-
- errcheck
15-
- errorlint
16-
- gofumpt
17-
- goimports
18-
- gosec
19-
- misspell
20-
- perfsprint
21-
- revive
22-
- testifylint
23-
- unconvert
24-
- unparam
25-
- unused
26-
- whitespace
27-
28-
linters-settings:
29-
exhaustive:
30-
default-signifies-exhaustive: true
31-
gofumpt:
32-
extra-rules: true
33-
goimports:
34-
local-prefixes: github.com/envoyproxy/go-control-plane
35-
gosec:
36-
excludes:
37-
- G115
38-
misspell:
39-
locale: US
40-
perfsprint:
41-
# Optimizes even if it requires an int or uint type cast.
42-
int-conversion: true
43-
# Optimizes into `err.Error()` even if it is only equivalent for non-nil errors.
44-
err-error: true
45-
# Optimizes `fmt.Errorf`.
46-
errorf: true
47-
# Optimizes `fmt.Sprintf` with only one argument.
48-
sprintf1: true
49-
# Optimizes into strings concatenation.
50-
strconcat: true
51-
testifylint:
52-
disable:
53-
- float-compare
54-
- go-require
55-
enable:
56-
- bool-compare
57-
- compares
58-
- empty
59-
- error-is-as
60-
- error-nil
61-
- expected-actual
62-
- len
63-
- require-error
64-
- suite-dont-use-pkg
65-
- suite-extra-assert-call
66-
67-
unparam:
68-
check-exported: false
69-
70-
run:
71-
timeout: 10m
67+
- gofumpt
68+
- goimports
69+
settings:
70+
gofumpt:
71+
extra-rules: true
72+
goimports:
73+
local-prefixes:
74+
- github.com/envoyproxy/go-control-plane
75+
exclusions:
76+
generated: lax
77+
paths:
78+
- third_party$
79+
- builtin$
80+
- examples$

‎internal/tools/go.mod

+31-21
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.23.0
55
toolchain go1.23.6
66

77
require (
8-
github.com/golangci/golangci-lint v1.64.8
8+
github.com/golangci/golangci-lint/v2 v2.0.2
99
go.opentelemetry.io/build-tools/multimod v0.20.0
1010
)
1111

@@ -15,14 +15,14 @@ require (
1515
dario.cat/mergo v1.0.0 // indirect
1616
github.com/4meepo/tagalign v1.4.2 // indirect
1717
github.com/Abirdcfly/dupword v0.1.3 // indirect
18-
github.com/Antonboom/errname v1.0.0 // indirect
19-
github.com/Antonboom/nilnil v1.0.1 // indirect
20-
github.com/Antonboom/testifylint v1.5.2 // indirect
21-
github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect
18+
github.com/Antonboom/errname v1.1.0 // indirect
19+
github.com/Antonboom/nilnil v1.1.0 // indirect
20+
github.com/Antonboom/testifylint v1.6.0 // indirect
21+
github.com/BurntSushi/toml v1.5.0 // indirect
2222
github.com/Crocmagnon/fatcontext v0.7.1 // indirect
2323
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
2424
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1 // indirect
25-
github.com/Masterminds/semver/v3 v3.3.0 // indirect
25+
github.com/Masterminds/semver/v3 v3.3.1 // indirect
2626
github.com/Microsoft/go-winio v0.6.2 // indirect
2727
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
2828
github.com/ProtonMail/go-crypto v1.1.5 // indirect
@@ -33,24 +33,31 @@ require (
3333
github.com/alingse/nilnesserr v0.1.2 // indirect
3434
github.com/ashanbrown/forbidigo v1.6.0 // indirect
3535
github.com/ashanbrown/makezero v1.2.0 // indirect
36+
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
3637
github.com/beorn7/perks v1.0.1 // indirect
3738
github.com/bkielbasa/cyclop v1.2.3 // indirect
3839
github.com/blizzy78/varnamelen v0.8.0 // indirect
39-
github.com/bombsimon/wsl/v4 v4.5.0 // indirect
40-
github.com/breml/bidichk v0.3.2 // indirect
41-
github.com/breml/errchkjson v0.4.0 // indirect
40+
github.com/bombsimon/wsl/v4 v4.6.0 // indirect
41+
github.com/breml/bidichk v0.3.3 // indirect
42+
github.com/breml/errchkjson v0.4.1 // indirect
4243
github.com/butuzov/ireturn v0.3.1 // indirect
4344
github.com/butuzov/mirror v1.3.0 // indirect
44-
github.com/catenacyber/perfsprint v0.8.2 // indirect
45+
github.com/catenacyber/perfsprint v0.9.1 // indirect
4546
github.com/ccojocar/zxcvbn-go v1.0.2 // indirect
4647
github.com/cespare/xxhash/v2 v2.3.0 // indirect
4748
github.com/charithe/durationcheck v0.0.10 // indirect
49+
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
50+
github.com/charmbracelet/lipgloss v1.1.0 // indirect
51+
github.com/charmbracelet/x/ansi v0.8.0 // indirect
52+
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
53+
github.com/charmbracelet/x/term v0.2.1 // indirect
4854
github.com/chavacava/garif v0.1.0 // indirect
49-
github.com/ckaznocha/intrange v0.3.0 // indirect
55+
github.com/ckaznocha/intrange v0.3.1 // indirect
5056
github.com/cloudflare/circl v1.6.0 // indirect
5157
github.com/curioswitch/go-reassign v0.3.0 // indirect
5258
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
53-
github.com/daixiang0/gci v0.13.5 // indirect
59+
github.com/daixiang0/gci v0.13.6 // indirect
60+
github.com/dave/dst v0.27.3 // indirect
5461
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5562
github.com/denis-tingaikin/go-header v0.5.0 // indirect
5663
github.com/emirpasic/gods v1.18.1 // indirect
@@ -60,8 +67,8 @@ require (
6067
github.com/firefart/nonamedreturns v1.0.5 // indirect
6168
github.com/fsnotify/fsnotify v1.7.0 // indirect
6269
github.com/fzipp/gocyclo v0.6.0 // indirect
63-
github.com/ghostiam/protogetter v0.3.9 // indirect
64-
github.com/go-critic/go-critic v0.12.0 // indirect
70+
github.com/ghostiam/protogetter v0.3.12 // indirect
71+
github.com/go-critic/go-critic v0.13.0 // indirect
6572
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
6673
github.com/go-git/go-billy/v5 v5.6.2 // indirect
6774
github.com/go-git/go-git/v5 v5.14.0 // indirect
@@ -81,6 +88,7 @@ require (
8188
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
8289
github.com/golangci/go-printf-func-name v0.1.0 // indirect
8390
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
91+
github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 // indirect
8492
github.com/golangci/misspell v0.6.0 // indirect
8593
github.com/golangci/plugin-module-register v0.1.1 // indirect
8694
github.com/golangci/revgrep v0.8.0 // indirect
@@ -115,7 +123,8 @@ require (
115123
github.com/ldez/tagliatelle v0.7.1 // indirect
116124
github.com/ldez/usetesting v0.4.2 // indirect
117125
github.com/leonklingele/grouper v1.1.2 // indirect
118-
github.com/macabu/inamedparam v0.1.3 // indirect
126+
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
127+
github.com/macabu/inamedparam v0.2.0 // indirect
119128
github.com/magiconair/properties v1.8.7 // indirect
120129
github.com/maratori/testableexamples v1.0.0 // indirect
121130
github.com/maratori/testpackage v1.1.1 // indirect
@@ -128,6 +137,7 @@ require (
128137
github.com/mitchellh/go-homedir v1.1.0 // indirect
129138
github.com/mitchellh/mapstructure v1.5.0 // indirect
130139
github.com/moricho/tparallel v0.3.2 // indirect
140+
github.com/muesli/termenv v0.16.0 // indirect
131141
github.com/nakabonne/nestif v0.3.1 // indirect
132142
github.com/nishanths/exhaustive v0.12.0 // indirect
133143
github.com/nishanths/predeclared v0.2.2 // indirect
@@ -141,15 +151,15 @@ require (
141151
github.com/prometheus/client_model v0.2.0 // indirect
142152
github.com/prometheus/common v0.32.1 // indirect
143153
github.com/prometheus/procfs v0.7.3 // indirect
144-
github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 // indirect
154+
github.com/quasilyte/go-ruleguard v0.4.4 // indirect
145155
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
146156
github.com/quasilyte/gogrep v0.5.0 // indirect
147157
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
148158
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
149159
github.com/raeperd/recvcheck v0.2.0 // indirect
150160
github.com/rivo/uniseg v0.4.7 // indirect
151161
github.com/rogpeppe/go-internal v1.14.1 // indirect
152-
github.com/ryancurrah/gomodguard v1.3.5 // indirect
162+
github.com/ryancurrah/gomodguard v1.4.1 // indirect
153163
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
154164
github.com/sagikazarmark/locafero v0.4.0 // indirect
155165
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
@@ -161,7 +171,6 @@ require (
161171
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
162172
github.com/sirupsen/logrus v1.9.3 // indirect
163173
github.com/sivchari/containedctx v1.0.3 // indirect
164-
github.com/sivchari/tenv v1.12.1 // indirect
165174
github.com/skeema/knownhosts v1.3.1 // indirect
166175
github.com/sonatard/noctx v0.1.0 // indirect
167176
github.com/sourcegraph/conc v0.3.0 // indirect
@@ -178,7 +187,7 @@ require (
178187
github.com/subosito/gotenv v1.6.0 // indirect
179188
github.com/tdakkota/asciicheck v0.4.1 // indirect
180189
github.com/tetafro/godot v1.5.0 // indirect
181-
github.com/timakin/bodyclose v0.0.0-20241017074812-ed6a65f985e3 // indirect
190+
github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 // indirect
182191
github.com/timonwong/loggercheck v0.10.1 // indirect
183192
github.com/tomarrell/wrapcheck/v2 v2.10.0 // indirect
184193
github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect
@@ -187,7 +196,8 @@ require (
187196
github.com/uudashr/gocognit v1.2.0 // indirect
188197
github.com/uudashr/iface v1.3.1 // indirect
189198
github.com/xanzy/ssh-agent v0.3.3 // indirect
190-
github.com/xen0n/gosmopolitan v1.2.2 // indirect
199+
github.com/xen0n/gosmopolitan v1.3.0 // indirect
200+
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
191201
github.com/yagipy/maintidx v1.0.0 // indirect
192202
github.com/yeya24/promlinter v0.3.0 // indirect
193203
github.com/ykadowak/zerologlint v0.1.5 // indirect
@@ -215,5 +225,5 @@ require (
215225
gopkg.in/yaml.v3 v3.0.1 // indirect
216226
honnef.co/go/tools v0.6.1 // indirect
217227
mvdan.cc/gofumpt v0.7.0 // indirect
218-
mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect
228+
mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4 // indirect
219229
)

‎internal/tools/go.sum

+64-42
Large diffs are not rendered by default.

‎internal/tools/tools.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
package tools
44

55
import (
6-
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
6+
_ "github.com/golangci/golangci-lint/v2/cmd/golangci-lint"
77
_ "go.opentelemetry.io/build-tools/multimod"
88
)

‎pkg/cache/v3/linear_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func verifyResponse(t *testing.T, ch <-chan Response, version string, num int) {
4646
assert.NotNilf(t, r.GetContext(), "unexpected empty response context")
4747
out, err := r.GetDiscoveryResponse()
4848
require.NoError(t, err)
49-
assert.NotEqualf(t, "", out.GetVersionInfo(), "unexpected response empty version")
49+
assert.NotEmptyf(t, out.GetVersionInfo(), "unexpected response empty version")
5050
n := len(out.GetResources())
5151
assert.Equalf(t, n, num, "unexpected number of responses: got %d, want %d", n, num)
5252
if version != "" {
@@ -66,7 +66,7 @@ func validateDeltaResponse(t *testing.T, resp DeltaResponse, resources []resourc
6666
assert.Equalf(t, testType, resp.GetDeltaRequest().GetTypeUrl(), "unexpected empty request type URL: %q", resp.GetDeltaRequest().GetTypeUrl())
6767
out, err := resp.GetDeltaDiscoveryResponse()
6868
require.NoError(t, err)
69-
assert.Equalf(t, len(out.GetResources()), len(resources), "unexpected number of responses: got %d, want %d", len(out.GetResources()), len(resources))
69+
assert.Lenf(t, out.GetResources(), len(resources), "unexpected number of responses: got %d, want %d", len(out.GetResources()), len(resources))
7070
for _, r := range resources {
7171
found := false
7272
for _, r1 := range out.GetResources() {
@@ -82,7 +82,7 @@ func validateDeltaResponse(t *testing.T, resp DeltaResponse, resources []resourc
8282
assert.Truef(t, found, "resource with name %q not found in response", r.name)
8383
}
8484
assert.Equalf(t, testType, out.GetTypeUrl(), "unexpected type URL: %q", out.GetTypeUrl())
85-
assert.Equalf(t, len(out.GetRemovedResources()), len(deleted), "unexpected number of removed resurces: got %d, want %d", len(out.GetRemovedResources()), len(deleted))
85+
assert.Lenf(t, out.GetRemovedResources(), len(deleted), "unexpected number of removed resurces: got %d, want %d", len(out.GetRemovedResources()), len(deleted))
8686
for _, r := range deleted {
8787
found := false
8888
for _, rr := range out.GetRemovedResources() {
@@ -128,7 +128,7 @@ func checkVersionMapNotSet(t *testing.T, c *LinearCache) {
128128
func checkVersionMapSet(t *testing.T, c *LinearCache) {
129129
t.Helper()
130130
assert.NotNilf(t, c.versionMap, "version map is not set on the cache")
131-
assert.Equalf(t, len(c.versionMap), len(c.resources), "version map has the wrong number of elements: %d instead of %d expected", len(c.versionMap), len(c.resources))
131+
assert.Lenf(t, c.versionMap, len(c.resources), "version map has the wrong number of elements: %d instead of %d expected", len(c.versionMap), len(c.resources))
132132
}
133133

134134
func mustBlock(t *testing.T, w <-chan Response) {

‎pkg/server/v3/delta_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ func TestDeltaWildcardSubscriptions(t *testing.T) {
495495
select {
496496
case response := <-replies:
497497
assert.Equal(t, rsrc.EndpointType, response.GetTypeUrl())
498-
if assert.Equal(t, len(expectedResources), len(response.GetResources())) {
498+
if assert.Len(t, response.GetResources(), len(expectedResources)) {
499499
var names []string
500500
for _, resource := range response.GetResources() {
501501
names = append(names, resource.GetName())

0 commit comments

Comments
 (0)
Please sign in to comment.