mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
C#: Filter using var _ = ... results from DeadStoreOfLocal.ql
This commit is contained in:
@@ -460,4 +460,10 @@ public static class AnonymousVariable
|
||||
count++;
|
||||
return count;
|
||||
}
|
||||
|
||||
public static void Using()
|
||||
{
|
||||
using var x = new System.IO.FileStream("", System.IO.FileMode.Open); // BAD
|
||||
using var _ = new System.IO.FileStream("", System.IO.FileMode.Open); // GOOD
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user