Add validation for DirtyField strings (#5713)

* Add ValidateMemberAttribute, analyzer and test

* Use attribute on DirtyFields methods

* Defer member lookup

* Additional test case

* Add support for collection types

* Poke tests

* Revert "Add support for collection types"

This reverts commit 2b8f5534bd.

* break, not continue

* Cheaper attribute check with AttributeHelper

* Clean up unused helper method

---------

Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
This commit is contained in:
Tayrtahn
2025-12-17 13:32:34 -05:00
committed by GitHub
parent 7826e9e365
commit d7abbad717
8 changed files with 227 additions and 3 deletions

View File

@@ -47,6 +47,7 @@ public static class Diagnostics
public const string IdAutoGenStateParamMissing = "RA0041";
public const string IdPrototypeRedundantType = "RA0042";
public const string IdPrototypeEndsWithPrototype = "RA0043";
public const string IdValidateMember = "RA0044";
public static SuppressionDescriptor MeansImplicitAssignment =>
new SuppressionDescriptor("RADC1000", "CS0649", "Marked as implicitly assigned.");