You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SA9001: false positive in presence of control flow statements #488
package pkg
func fn() {
var ch chan int
for range ch {
defer println()
break
}
for range ch {
defer println()
return
}
}
But they do get flagged:
/tmp/foo.go:6:3: defers in this range loop won't run unless the channel gets closed (SA9001)
/tmp/foo.go:11:3: defers in this range loop won't run unless the channel gets closed (SA9001)
Activity
SA9001: fix false positive in presense of control flow statement
SA9001: fix false positive in presense of control flow statements
SA9001: fix false positive in presense of control flow statements