golangci-lint/test/testdata/exhaustive.go
Nishanth Shanmugham f3376cab71
add exhaustive linter (#1166)
* wip

more

add new files

run command fixes

more

* go.mod

* order

* same package

* review comment

* enable linter in .golangci.yml

* add testcase for default-signifies-exhaustive: true

* adjust runGoErrchk instead

* disable the linter

* cleanup

* more cleanup

* cleanup
2020-05-29 16:31:46 +03:00

18 lines
252 B
Go

//args: -Eexhaustive
package testdata
type Direction int
const (
North Direction = iota
East
South
West
)
func processDirection(d Direction) {
switch d { // ERROR "missing cases in switch of type Direction: East, West"
case North, South:
}
}