File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed
csharp/ql/test/query-tests/Bad Practices/Control-Flow/ConstantCondition Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 11
11
| ConstantCondition.cs:114:13:114:14 | access to parameter b1 | Condition always evaluates to 'true'. |
12
12
| ConstantCondition.cs:114:19:114:20 | access to parameter b2 | Condition always evaluates to 'true'. |
13
13
| ConstantCondition.cs:141:22:141:22 | _ | Pattern always matches. |
14
- | ConstantConditionBad.cs:5:16:5:20 | ... > ... | Condition always evaluates to 'false'. |
15
14
| ConstantConditionalExpressionCondition.cs:11:22:11:34 | ... == ... | Condition always evaluates to 'true'. |
16
15
| ConstantConditionalExpressionCondition.cs:12:21:12:25 | false | Condition always evaluates to 'false'. |
17
16
| ConstantConditionalExpressionCondition.cs:13:21:13:30 | ... == ... | Condition always evaluates to 'true'. |
20
19
| ConstantIfCondition.cs:11:17:11:29 | ... == ... | Condition always evaluates to 'true'. |
21
20
| ConstantIfCondition.cs:14:17:14:21 | false | Condition always evaluates to 'false'. |
22
21
| ConstantIfCondition.cs:17:17:17:26 | ... == ... | Condition always evaluates to 'true'. |
22
+ | ConstantIfCondition.cs:30:20:30:24 | ... > ... | Condition always evaluates to 'false'. |
23
23
| ConstantIsNullOrEmpty.cs:10:21:10:54 | call to method IsNullOrEmpty | Condition always evaluates to 'false'. |
24
24
| ConstantIsNullOrEmpty.cs:46:21:46:46 | call to method IsNullOrEmpty | Condition always evaluates to 'true'. |
25
25
| ConstantIsNullOrEmpty.cs:50:21:50:44 | call to method IsNullOrEmpty | Condition always evaluates to 'true'. |
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ public void Foo()
25
25
}
26
26
}
27
27
28
+ public int Max ( int a , int b )
29
+ {
30
+ return a > a ? a : b ; // $ Alert
31
+ }
32
+
28
33
public int Bar ( )
29
34
{
30
35
return ZERO ;
You can’t perform that action at this time.
0 commit comments