2022-07-15 15:32:10 +02:00
|
|
|
//golangcitest:args -Egosimple
|
2019-01-08 14:31:04 +03:00
|
|
|
package testdata
|
|
|
|
|
2019-03-18 09:03:56 +03:00
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
)
|
2019-01-08 14:31:04 +03:00
|
|
|
|
2019-03-18 09:03:56 +03:00
|
|
|
func Gosimple(ss []string) {
|
2022-08-20 18:53:45 +02:00
|
|
|
if ss != nil { // want "S1031: unnecessary nil check around range"
|
2019-03-18 09:03:56 +03:00
|
|
|
for _, s := range ss {
|
|
|
|
log.Printf(s)
|
|
|
|
}
|
2019-01-08 14:31:04 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-18 09:03:56 +03:00
|
|
|
func GosimpleNolintGosimple(ss []string) {
|
|
|
|
if ss != nil { //nolint:gosimple
|
|
|
|
for _, s := range ss {
|
|
|
|
log.Printf(s)
|
|
|
|
}
|
2019-01-08 14:31:04 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-18 09:03:56 +03:00
|
|
|
func GosimpleNolintMegacheck(ss []string) {
|
|
|
|
if ss != nil { //nolint:megacheck
|
|
|
|
for _, s := range ss {
|
|
|
|
log.Printf(s)
|
|
|
|
}
|
2019-01-08 14:31:04 +03:00
|
|
|
}
|
|
|
|
}
|