2022-07-15 15:32:10 +02:00
|
|
|
//golangcitest:args -Estylecheck
|
2019-01-08 14:31:04 +03:00
|
|
|
package testdata
|
|
|
|
|
|
|
|
func Stylecheck(x int) {
|
2019-03-18 09:03:56 +03:00
|
|
|
switch x {
|
|
|
|
case 1:
|
|
|
|
return
|
2022-08-20 18:53:45 +02:00
|
|
|
default: // want "ST1015: default case should be first or last in switch statement"
|
2019-03-18 09:03:56 +03:00
|
|
|
return
|
|
|
|
case 2:
|
|
|
|
return
|
2019-01-08 14:31:04 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func StylecheckNolintStylecheck(x int) {
|
2019-03-18 09:03:56 +03:00
|
|
|
switch x {
|
|
|
|
case 1:
|
|
|
|
return
|
|
|
|
default: //nolint:stylecheck
|
|
|
|
return
|
|
|
|
case 2:
|
|
|
|
return
|
2019-01-08 14:31:04 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func StylecheckNolintMegacheck(x int) {
|
2019-03-18 09:03:56 +03:00
|
|
|
switch x {
|
|
|
|
case 1:
|
|
|
|
return
|
2022-08-20 18:53:45 +02:00
|
|
|
default: //nolint:megacheck // want "ST1015: default case should be first or last in switch statement"
|
2019-03-18 09:03:56 +03:00
|
|
|
return
|
|
|
|
case 2:
|
|
|
|
return
|
2019-01-08 14:31:04 +03:00
|
|
|
}
|
|
|
|
}
|