Update InsufficientControlFlowManagementAfterRefactoringTheCode.ql

This commit is contained in:
ihsinme
2021-04-12 17:00:34 +03:00
committed by GitHub
parent d7c14775bf
commit 58d5ad48d5

View File

@@ -105,7 +105,7 @@ class UsingArithmeticInComparison extends BinaryArithmeticOperation {
}
}
from Expr exp, WhileStmt wst
from Expr exp
where
exp instanceof UsingArithmeticInComparison and
not exp.(UsingArithmeticInComparison).workingWithValue() and
@@ -114,5 +114,5 @@ where
not exp.(UsingArithmeticInComparison).compareWithZero() and
exp.(UsingArithmeticInComparison).compareWithOutZero()
or
wst instanceof UsingWhileAfterWhile and exp = wst.getCondition()
exists(WhileStmt wst | wst instanceof UsingWhileAfterWhile and exp = wst.getCondition())
select exp, "this expression needs your attention"