golangci-lint/test/testdata/exhaustive_ignore_enum_members.go
dependabot[bot] 7fb302126a
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>
2022-11-27 16:54:20 +01:00

22 lines
492 B
Go

//golangcitest:args -Eexhaustive
//golangcitest:config_path testdata/configs/exhaustive_ignore_enum_members.yml
package testdata
type Direction int
const (
North Direction = iota
East
South
West
)
// Should only report East as missing because the enum member West is ignored
// using the ignore-enum-members setting.
func processDirectionIgnoreEnumMembers(d Direction) {
switch d { // want "missing cases in switch of type testdata.Direction: testdata.East"
case North, South:
}
}