Skip to content

Commit b314655

Browse files
build(deps): bump github.com/nishanths/exhaustive from 0.11.0 to 0.12.0 (#4195)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent da3eb31 commit b314655

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

.golangci.reference.yml

+3
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,9 @@ linters-settings:
344344
# Only run exhaustive check on map literals with "//exhaustive:enforce" comment.
345345
# Default: false
346346
explicit-exhaustive-map: true
347+
# Switch statement requires default case even if exhaustive.
348+
# Default: false
349+
default-case-required: true
347350

348351
exhaustivestruct:
349352
# Struct Patterns is list of expressions to match struct packages and names.

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ require (
8080
github.com/mitchellh/mapstructure v1.5.0
8181
github.com/moricho/tparallel v0.3.1
8282
github.com/nakabonne/nestif v0.3.1
83-
github.com/nishanths/exhaustive v0.11.0
83+
github.com/nishanths/exhaustive v0.12.0
8484
github.com/nishanths/predeclared v0.2.2
8585
github.com/nunnatsa/ginkgolinter v0.14.1
8686
github.com/polyfloyd/go-errorlint v1.4.5

go.sum

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/config/linters_settings.go

+1
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ type ExhaustiveSettings struct {
352352
PackageScopeOnly bool `mapstructure:"package-scope-only"`
353353
ExplicitExhaustiveMap bool `mapstructure:"explicit-exhaustive-map"`
354354
ExplicitExhaustiveSwitch bool `mapstructure:"explicit-exhaustive-switch"`
355+
DefaultCaseRequired bool `mapstructure:"default-case-required"`
355356
}
356357

357358
type ExhaustiveStructSettings struct {

pkg/golinters/exhaustive.go

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ func NewExhaustive(settings *config.ExhaustiveSettings) *goanalysis.Linter {
2323
exhaustive.PackageScopeOnlyFlag: settings.PackageScopeOnly,
2424
exhaustive.ExplicitExhaustiveMapFlag: settings.ExplicitExhaustiveMap,
2525
exhaustive.ExplicitExhaustiveSwitchFlag: settings.ExplicitExhaustiveSwitch,
26+
exhaustive.DefaultCaseRequiredFlag: settings.DefaultCaseRequired,
2627
},
2728
}
2829
}

0 commit comments

Comments
 (0)