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 <ldez@users.noreply.github.com>
1 parent 3af8234 commit f0dbc75

File tree

5 files changed

+18
-12
lines changed

5 files changed

+18
-12
lines changed

.golangci.reference.yml

Lines changed: 3 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

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

pkg/config/linters_settings.go

Lines changed: 8 additions & 6 deletions
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

Lines changed: 4 additions & 3 deletions
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)