C#: Convert tests for cs/missed-readonly-modifier to inline expectatations.

This commit is contained in:
Michael Nebel
2025-05-19 13:44:09 +02:00
parent 2952c0d2b4
commit 5941b3081c
3 changed files with 5 additions and 4 deletions

View File

@@ -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;

View File

@@ -1 +1,2 @@
Language Abuse/MissedReadonlyOpportunity.ql
query: Language Abuse/MissedReadonlyOpportunity.ql
postprocess: utils/test/InlineExpectationsTestQuery.ql

View File

@@ -1,6 +1,6 @@
class Bad
{
int Field;
int Field; // $ Alert
public Bad(int i)
{