We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46c1744 commit 34320cbCopy full SHA for 34320cb
cpp/ql/src/experimental/Best Practices/UselessTest.ql
@@ -1,3 +1,4 @@
1
+
2
/**
3
* @name Useless Test
4
* @description A boolean condition that is guaranteed to never be evaluated should be deleted.
@@ -38,6 +39,8 @@ where
38
39
) and
40
eq.getRightOperand() instanceof Literal and
41
ne.getRightOperand() instanceof Literal and
42
+ eq.getLeftOperand().getFullyConverted().getType() =
43
+ ne.getLeftOperand().getFullyConverted().getType() and
44
nearestParent(eq) = nearestParent(ne) and
45
sameExpr(eq.getLeftOperand(), ne.getLeftOperand())
-select ne,"Useless Test"
46
+select ne, "Useless Test"
0 commit comments