File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
csharp/ql/test/query-tests/Useless Code/FutileConditional Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -25,5 +25,10 @@ public void M(string s)
2525 else
2626 {
2727 } // $ Alert
28+
29+ if ( s . Length > 4 )
30+ {
31+ // GOOD: Because of the comment.
32+ }
2833 }
2934}
Original file line number Diff line number Diff line change 1+ #select
12| FutileConditional.cs:8:9:8:27 | if (...) ... | If-statement with an empty then-branch and no else-branch. |
23| FutileConditional.cs:10:9:12:9 | if (...) ... | If-statement with an empty then-branch and no else-branch. |
34| FutileConditional.cs:22:9:27:9 | if (...) ... | If-statement with an empty then-branch and no else-branch. |
5+ | FutileConditional.cs:29:9:32:9 | if (...) ... | If-statement with an empty then-branch and no else-branch. |
6+ testFailures
7+ | FutileConditional.cs:29:9:32:9 | If-statement with an empty then-branch and no else-branch. | Unexpected result: Alert |
You can’t perform that action at this time.
0 commit comments