Skip to content

Commit f0dbc75

Browse files
build(deps): bump github.com/polyfloyd/go-errorlint from 1.1.0 to 1.2.0 (#3636)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 3af8234 commit f0dbc75

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

.golangci.reference.yml

+3
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ linters-settings:
294294
# See the https://github.com/polyfloyd/go-errorlint for caveats.
295295
# Default: true
296296
errorf: false
297+
# Permit more than 1 %w verb, valid per Go 1.20 (Requires errorf:true)
298+
# Default: true
299+
errorf-multi: false
297300
# Check for plain type assertions and type switches.
298301
# Default: true
299302
asserts: false

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ require (
7575
github.com/nishanths/exhaustive v0.9.5
7676
github.com/nishanths/predeclared v0.2.2
7777
github.com/nunnatsa/ginkgolinter v0.8.1
78-
github.com/polyfloyd/go-errorlint v1.1.0
78+
github.com/polyfloyd/go-errorlint v1.2.0
7979
github.com/quasilyte/go-ruleguard/dsl v0.3.22
8080
github.com/ryancurrah/gomodguard v1.3.0
8181
github.com/ryanrolds/sqlclosecheck v0.4.0

go.sum

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/config/linters_settings.go

+8-6
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ var defaultLintersSettings = LintersSettings{
1919
MaxBlankIdentifiers: 2,
2020
},
2121
ErrorLint: ErrorLintSettings{
22-
Errorf: true,
23-
Asserts: true,
24-
Comparison: true,
22+
Errorf: true,
23+
ErrorfMulti: true,
24+
Asserts: true,
25+
Comparison: true,
2526
},
2627
Exhaustive: ExhaustiveSettings{
2728
Check: []string{"switch"},
@@ -280,9 +281,10 @@ type ErrChkJSONSettings struct {
280281
}
281282

282283
type ErrorLintSettings struct {
283-
Errorf bool `mapstructure:"errorf"`
284-
Asserts bool `mapstructure:"asserts"`
285-
Comparison bool `mapstructure:"comparison"`
284+
Errorf bool `mapstructure:"errorf"`
285+
ErrorfMulti bool `mapstructure:"errorf-multi"`
286+
Asserts bool `mapstructure:"asserts"`
287+
Comparison bool `mapstructure:"comparison"`
286288
}
287289

288290
type ExhaustiveSettings struct {

pkg/golinters/errorlint.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ func NewErrorLint(cfg *config.ErrorLintSettings) *goanalysis.Linter {
1515

1616
if cfg != nil {
1717
cfgMap[a.Name] = map[string]interface{}{
18-
"errorf": cfg.Errorf,
19-
"asserts": cfg.Asserts,
20-
"comparison": cfg.Comparison,
18+
"errorf": cfg.Errorf,
19+
"errorf-multi": cfg.ErrorfMulti,
20+
"asserts": cfg.Asserts,
21+
"comparison": cfg.Comparison,
2122
}
2223
}
2324

0 commit comments

Comments
 (0)