Skip to content

Commit 54af8f3

Browse files
build(deps): bump golang.org/x/tools from 0.39.0 to 0.40.0 (#6252)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parent b388efe commit 54af8f3

File tree

5 files changed

+13
-23
lines changed

5 files changed

+13
-23
lines changed

.golangci.next.reference.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2152,6 +2152,8 @@ linters:
21522152
- slicessort
21532153
# Use iterators instead of Len/At-style APIs.
21542154
- stditerators
2155+
# Replace strings.Index etc. with strings.Cut.
2156+
- stringscut
21552157
# Replace HasPrefix/TrimPrefix with CutPrefix.
21562158
- stringscutprefix
21572159
# Replace ranging over Split/Fields with SplitSeq/FieldsSeq.
@@ -2160,6 +2162,8 @@ linters:
21602162
- stringsbuilder
21612163
# Replace context.WithCancel with t.Context in tests.
21622164
- testingcontext
2165+
# Replace unsafe pointer arithmetic with function calls.
2166+
- unsafefuncs
21632167
# Replace wg.Add(1)/go/wg.Done() with wg.Go.
21642168
- waitgroup
21652169

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ require (
140140
golang.org/x/mod v0.31.0
141141
golang.org/x/sync v0.19.0
142142
golang.org/x/sys v0.39.0
143-
golang.org/x/tools v0.39.0
143+
golang.org/x/tools v0.40.0
144144
honnef.co/go/tools v0.6.1
145145
mvdan.cc/gofumpt v0.9.2
146146
mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15

go.sum

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsonschema/golangci.next.jsonschema.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,10 +726,12 @@
726726
"slicescontains",
727727
"slicessort",
728728
"stditerators",
729+
"stringscut",
729730
"stringscutprefix",
730731
"stringsseq",
731732
"stringsbuilder",
732733
"testingcontext",
734+
"unsafefuncs",
733735
"waitgroup"
734736
]
735737
},

pkg/golinters/modernize/modernize.go

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ func New(settings *config.ModernizeSettings) *goanalysis.Linter {
1414
var analyzers []*analysis.Analyzer
1515

1616
if settings == nil {
17-
analyzers = cleanSuite()
17+
analyzers = modernize.Suite
1818
} else {
19-
for _, analyzer := range cleanSuite() {
19+
for _, analyzer := range modernize.Suite {
2020
if slices.Contains(settings.Disable, analyzer.Name) {
2121
continue
2222
}
@@ -32,19 +32,3 @@ func New(settings *config.ModernizeSettings) *goanalysis.Linter {
3232
nil).
3333
WithLoadMode(goanalysis.LoadModeTypesInfo)
3434
}
35-
36-
func cleanSuite() []*analysis.Analyzer {
37-
var analyzers []*analysis.Analyzer
38-
39-
for _, analyzer := range modernize.Suite {
40-
// Disabled because of false positives
41-
// https://github.com/golang/go/issues/76687
42-
if analyzer.Name == "stringscut" {
43-
continue
44-
}
45-
46-
analyzers = append(analyzers, analyzer)
47-
}
48-
49-
return analyzers
50-
}

0 commit comments

Comments
 (0)