We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db565c5 commit e6e6062Copy full SHA for e6e6062
csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql
@@ -102,9 +102,9 @@ class ConstantMatchingCondition extends ConstantCondition {
102
}
103
104
override predicate isWhiteListed() {
105
- exists(SwitchExpr se |
106
- se.getACase().getPattern() = this.(DiscardExpr) and
107
- strictcount(se.getACase()) > 1
+ exists(SwitchExpr se, int i |
+ se.getCase(i).getPattern() = this.(DiscardExpr) and
+ i > 0
108
)
109
110
0 commit comments