mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C#: Convert tests for cs/missed-readonly-modifier to inline expectatations.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class MissedReadonlyOpportunity<T>
|
||||
{
|
||||
public int Bad1;
|
||||
public T Bad2;
|
||||
public int Bad1; // $ Alert
|
||||
public T Bad2; // $ Alert
|
||||
public readonly int Good1;
|
||||
public readonly int Good2 = 0;
|
||||
public const int Good3 = 0;
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
Language Abuse/MissedReadonlyOpportunity.ql
|
||||
query: Language Abuse/MissedReadonlyOpportunity.ql
|
||||
postprocess: utils/test/InlineExpectationsTestQuery.ql
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class Bad
|
||||
{
|
||||
int Field;
|
||||
int Field; // $ Alert
|
||||
|
||||
public Bad(int i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user