Skip to content

build(deps): bump github.com/nishanths/exhaustive from 0.8.3 to 0.9.2 #3381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ linters-settings:
# switch statements to satisfy exhaustiveness.
# Default: ""
ignore-enum-members: "Example.+"
# Enum types matching the supplied regex do not have to be listed in
# switch statements to satisfy exhaustiveness.
# Default: ""
ignore-enum-types: "Example.+"
# Consider enums only in package scopes, not in inner scopes.
# Default: false
package-scope-only: true
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ require (
github.com/mitchellh/go-ps v1.0.0
github.com/moricho/tparallel v0.2.1
github.com/nakabonne/nestif v0.3.1
github.com/nishanths/exhaustive v0.8.3
github.com/nishanths/exhaustive v0.9.2
github.com/nishanths/predeclared v0.2.2
github.com/pkg/errors v0.9.1
github.com/polyfloyd/go-errorlint v1.0.6
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 @@ -289,6 +289,7 @@ type ExhaustiveSettings struct {
CheckGenerated bool `mapstructure:"check-generated"`
DefaultSignifiesExhaustive bool `mapstructure:"default-signifies-exhaustive"`
IgnoreEnumMembers string `mapstructure:"ignore-enum-members"`
IgnoreEnumTypes string `mapstructure:"ignore-enum-types"`
PackageScopeOnly bool `mapstructure:"package-scope-only"`
ExplicitExhaustiveMap bool `mapstructure:"explicit-exhaustive-map"`
ExplicitExhaustiveSwitch bool `mapstructure:"explicit-exhaustive-switch"`
Expand Down
1 change: 1 addition & 0 deletions pkg/golinters/exhaustive.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func NewExhaustive(settings *config.ExhaustiveSettings) *goanalysis.Linter {
exhaustive.CheckGeneratedFlag: settings.CheckGenerated,
exhaustive.DefaultSignifiesExhaustiveFlag: settings.DefaultSignifiesExhaustive,
exhaustive.IgnoreEnumMembersFlag: settings.IgnoreEnumMembers,
exhaustive.IgnoreEnumTypesFlag: settings.IgnoreEnumTypes,
exhaustive.PackageScopeOnlyFlag: settings.PackageScopeOnly,
exhaustive.ExplicitExhaustiveMapFlag: settings.ExplicitExhaustiveMap,
exhaustive.ExplicitExhaustiveSwitchFlag: settings.ExplicitExhaustiveSwitch,
Expand Down
2 changes: 1 addition & 1 deletion test/testdata/exhaustive.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const (
)

func processDirection(d Direction) {
switch d { // want "missing cases in switch of type Direction: East, West"
switch d { // want "missing cases in switch of type testdata.Direction: testdata.East, testdata.West"
case North, South:
}
}
2 changes: 1 addition & 1 deletion test/testdata/exhaustive_ignore_enum_members.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
// using the ignore-enum-members setting.

func processDirectionIgnoreEnumMembers(d Direction) {
switch d { // want "missing cases in switch of type Direction: East"
switch d { // want "missing cases in switch of type testdata.Direction: testdata.East"
case North, South:
}
}