-
-
Notifications
You must be signed in to change notification settings - Fork 390
Open
Labels
aggressiveA set of checks that is more prone to false positives but is helpful during code reviewA set of checks that is more prone to false positives but is helpful during code reviewnew-check
Milestone
Description
I would like staticcheck to detect the following:
func foo() error {
...
err := bar()
if err != nil {
return nil // BUG! Most of the time it should be `return err`
}
...
}
Sometimes, of course, you want to explicitly return an error there, so this check will have quite a few false positives.
Most of the time, however, it will detect bugs.
Metadata
Metadata
Assignees
Labels
aggressiveA set of checks that is more prone to false positives but is helpful during code reviewA set of checks that is more prone to false positives but is helpful during code reviewnew-check