Skip to content

Commit

Permalink
build(deps): bump github.com/nishanths/exhaustive from 0.11.0 to 0.12…
Browse files Browse the repository at this point in the history
….0 (#4195)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and ldez authored Nov 12, 2023
1 parent da3eb31 commit b314655
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ linters-settings:
# Only run exhaustive check on map literals with "//exhaustive:enforce" comment.
# Default: false
explicit-exhaustive-map: true
# Switch statement requires default case even if exhaustive.
# Default: false
default-case-required: true

exhaustivestruct:
# Struct Patterns is list of expressions to match struct packages and names.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/moricho/tparallel v0.3.1
github.com/nakabonne/nestif v0.3.1
github.com/nishanths/exhaustive v0.11.0
github.com/nishanths/exhaustive v0.12.0
github.com/nishanths/predeclared v0.2.2
github.com/nunnatsa/ginkgolinter v0.14.1
github.com/polyfloyd/go-errorlint v1.4.5
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.

1 change: 1 addition & 0 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ type ExhaustiveSettings struct {
PackageScopeOnly bool `mapstructure:"package-scope-only"`
ExplicitExhaustiveMap bool `mapstructure:"explicit-exhaustive-map"`
ExplicitExhaustiveSwitch bool `mapstructure:"explicit-exhaustive-switch"`
DefaultCaseRequired bool `mapstructure:"default-case-required"`
}

type ExhaustiveStructSettings struct {
Expand Down
1 change: 1 addition & 0 deletions pkg/golinters/exhaustive.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func NewExhaustive(settings *config.ExhaustiveSettings) *goanalysis.Linter {
exhaustive.PackageScopeOnlyFlag: settings.PackageScopeOnly,
exhaustive.ExplicitExhaustiveMapFlag: settings.ExplicitExhaustiveMap,
exhaustive.ExplicitExhaustiveSwitchFlag: settings.ExplicitExhaustiveSwitch,
exhaustive.DefaultCaseRequiredFlag: settings.DefaultCaseRequired,
},
}
}
Expand Down

0 comments on commit b314655

Please sign in to comment.