Detect unchecked error within SimpleStmt of an IfStmt with error checking in conditional #1562
Labels
aggressive
A set of checks that is more prone to false positives but is helpful during code review
new-check
(I'm aware of #1057, but I believe I'm reporting a particular unchecked error that has low false positives)
Consider a code that looks like the following:
This is a bug, and the correct code should have been:
I propose flagging the combination of:
SimpleStmt
of theIfStmt
error
check of some kind within theExpression
of theIfStmt
Condition 2 almost certainly indicates a programmer's intent to do error checks, which should drastically reduce any false positives with condition 1.
The text was updated successfully, but these errors were encountered: