Skip to content

Commit 0e0d578

Browse files
committed
Suppress SA1202 for RoutedEvent
Fix #366
1 parent eb890c7 commit 0e0d578

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

WpfAnalyzers/Suppressors/Sa1202Suppressor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public override void ReportSuppressions(SuppressionAnalysisContext context)
2424
switch (root.FindNode(diagnostic.Location.SourceSpan))
2525
{
2626
case VariableDeclaratorSyntax { Parent: VariableDeclarationSyntax { Type: { } type } }
27-
when type == KnownSymbols.DependencyProperty:
27+
when type == KnownSymbols.DependencyProperty ||
28+
type == KnownSymbols.RoutedEvent:
2829
context.ReportSuppression(Suppression.Create(Descriptor, diagnostic));
2930
break;
3031
case MethodDeclarationSyntax method

0 commit comments

Comments
 (0)