1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
//golangcitest:args -Estylecheck
package testdata
func Stylecheck(x int) {
switch x {
case 1:
return
default: // want "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 // want "ST1015: default case should be first or last in switch statement"
return
case 2:
return
}
}
|