golangci-lint/test/testdata/stylecheck.go
2019-03-31 19:41:37 +03:00

36 lines
554 B
Go

//args: -Estylecheck
package testdata
func Stylecheck(x int) {
switch x {
case 1:
return
default: // ERROR "ST1015: default case should be first or last in switch statement"
return
case 2:
return
}
}
func StylecheckNolintStylecheck(x int) {
switch x {
case 1:
return
default: //nolint:stylecheck
return
case 2:
return
}
}
func StylecheckNolintMegacheck(x int) {
switch x {
case 1:
return
default: //nolint:megacheck // ERROR "ST1015: default case should be first or last in switch statement"
return
case 2:
return
}
}