Skip to content
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

build(deps): bump github.com/nishanths/exhaustive from 0.3.6 to 0.6.0 #2353

Merged
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
6 changes: 2 additions & 4 deletions .golangci.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,8 @@ linters-settings:
# enum members matching the supplied regex do not have to be listed in
# switch statements to satisfy exhaustiveness
ignore-enum-members: ""
# strategy to use when checking exhaustiveness of switch statements; one of:
# "name", "value"; see documentation for details:
# https://pkg.go.dev/github.com/nishanths/exhaustive#section-documentation
checking-strategy: "value"
# consider enums only in package scopes, not in inner scopes
package-scope-only: false

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 @@ -59,7 +59,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.3.6
github.com/nishanths/exhaustive v0.6.0
github.com/nishanths/predeclared v0.2.1
github.com/pkg/errors v0.9.1
github.com/polyfloyd/go-errorlint v0.0.0-20210722154253-910bb7978349
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.

6 changes: 4 additions & 2 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,11 @@ type ErrorLintSettings struct {
type ExhaustiveSettings struct {
CheckGenerated bool `mapstructure:"check-generated"`
DefaultSignifiesExhaustive bool `mapstructure:"default-signifies-exhaustive"`
IgnorePattern string `mapstructure:"ignore-pattern"` // Deprecated: this setting has no effect; see IgnoreEnumMembers instead.
IgnoreEnumMembers string `mapstructure:"ignore-enum-members"`
CheckingStrategy string `mapstructure:"checking-strategy"`
PackageScopeOnly bool `mapstructure:"package-scope-only"`

IgnorePattern string `mapstructure:"ignore-pattern"` // Deprecated: this setting has no effect; see IgnoreEnumMembers instead.
CheckingStrategy string `mapstructure:"checking-strategy"` // Deprecated.
}

type ExhaustiveStructSettings struct {
Expand Down
6 changes: 4 additions & 2 deletions pkg/golinters/exhaustive.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ func NewExhaustive(settings *config.ExhaustiveSettings) *goanalysis.Linter {
a.Name: {
exhaustive.CheckGeneratedFlag: settings.CheckGenerated,
exhaustive.DefaultSignifiesExhaustiveFlag: settings.DefaultSignifiesExhaustive,
exhaustive.IgnorePatternFlag: settings.IgnorePattern,
exhaustive.IgnoreEnumMembersFlag: settings.IgnoreEnumMembers,
exhaustive.CheckingStrategyFlag: settings.CheckingStrategy,
exhaustive.PackageScopeOnly: settings.PackageScopeOnly,

exhaustive.IgnorePatternFlag: settings.IgnorePattern,
exhaustive.CheckingStrategyFlag: settings.CheckingStrategy,
},
}
}
Expand Down
3 changes: 0 additions & 3 deletions test/testdata/configs/exhaustive_checking_strategy_name.yml

This file was deleted.

3 changes: 0 additions & 3 deletions test/testdata/configs/exhaustive_checking_strategy_value.yml

This file was deleted.

18 changes: 0 additions & 18 deletions test/testdata/exhaustive_checking_strategy_name.go

This file was deleted.

22 changes: 0 additions & 22 deletions test/testdata/exhaustive_checking_strategy_value.go

This file was deleted.