build(deps): bump github.com/nishanths/exhaustive from 0.8.3 to 0.9.2 (#3381)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
parent
0eb5e26412
commit
7fb302126a
@ -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
|
||||
|
2
go.mod
2
go.mod
@ -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
|
||||
|
4
go.sum
generated
4
go.sum
generated
@ -391,8 +391,8 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6Fx
|
||||
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/nishanths/exhaustive v0.8.3 h1:pw5O09vwg8ZaditDp/nQRqVnrMczSJDxRDJMowvhsrM=
|
||||
github.com/nishanths/exhaustive v0.8.3/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg=
|
||||
github.com/nishanths/exhaustive v0.9.2 h1:PyEzIQZ4lpGBXsKc83syhC18JQPtsEMh2aAUG6pZfLo=
|
||||
github.com/nishanths/exhaustive v0.9.2/go.mod h1:VjHsn6MdEX4ydfLwt658YcdPxSDKOlqSjpkeGJPCamo=
|
||||
github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk=
|
||||
github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c=
|
||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||
|
@ -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"`
|
||||
|
@ -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,
|
||||
|
2
test/testdata/exhaustive.go
vendored
2
test/testdata/exhaustive.go
vendored
@ -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:
|
||||
}
|
||||
}
|
||||
|
@ -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:
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user