Skip to content

Commit

Permalink
build(deps): bump github.com/polyfloyd/go-errorlint from 1.1.0 to 1.2…
Browse files Browse the repository at this point in the history
….0 (#3636)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and ldez committed Feb 26, 2023
1 parent 3af8234 commit f0dbc75
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .golangci.reference.yml
Expand Up @@ -294,6 +294,9 @@ linters-settings:
# See the https://github.com/polyfloyd/go-errorlint for caveats.
# Default: true
errorf: false
# Permit more than 1 %w verb, valid per Go 1.20 (Requires errorf:true)
# Default: true
errorf-multi: false
# Check for plain type assertions and type switches.
# Default: true
asserts: false
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -75,7 +75,7 @@ require (
github.com/nishanths/exhaustive v0.9.5
github.com/nishanths/predeclared v0.2.2
github.com/nunnatsa/ginkgolinter v0.8.1
github.com/polyfloyd/go-errorlint v1.1.0
github.com/polyfloyd/go-errorlint v1.2.0
github.com/quasilyte/go-ruleguard/dsl v0.3.22
github.com/ryancurrah/gomodguard v1.3.0
github.com/ryanrolds/sqlclosecheck v0.4.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions pkg/config/linters_settings.go
Expand Up @@ -19,9 +19,10 @@ var defaultLintersSettings = LintersSettings{
MaxBlankIdentifiers: 2,
},
ErrorLint: ErrorLintSettings{
Errorf: true,
Asserts: true,
Comparison: true,
Errorf: true,
ErrorfMulti: true,
Asserts: true,
Comparison: true,
},
Exhaustive: ExhaustiveSettings{
Check: []string{"switch"},
Expand Down Expand Up @@ -280,9 +281,10 @@ type ErrChkJSONSettings struct {
}

type ErrorLintSettings struct {
Errorf bool `mapstructure:"errorf"`
Asserts bool `mapstructure:"asserts"`
Comparison bool `mapstructure:"comparison"`
Errorf bool `mapstructure:"errorf"`
ErrorfMulti bool `mapstructure:"errorf-multi"`
Asserts bool `mapstructure:"asserts"`
Comparison bool `mapstructure:"comparison"`
}

type ExhaustiveSettings struct {
Expand Down
7 changes: 4 additions & 3 deletions pkg/golinters/errorlint.go
Expand Up @@ -15,9 +15,10 @@ func NewErrorLint(cfg *config.ErrorLintSettings) *goanalysis.Linter {

if cfg != nil {
cfgMap[a.Name] = map[string]interface{}{
"errorf": cfg.Errorf,
"asserts": cfg.Asserts,
"comparison": cfg.Comparison,
"errorf": cfg.Errorf,
"errorf-multi": cfg.ErrorfMulti,
"asserts": cfg.Asserts,
"comparison": cfg.Comparison,
}
}

Expand Down

0 comments on commit f0dbc75

Please sign in to comment.