Skip to content

Commit 43c7cd5

Browse files
committed
Remove unnecessary SyntaxReceiver
1 parent 73967ab commit 43c7cd5

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

StyleCop.Analyzers/StyleCop.Analyzers.CodeGeneration/LightupGenerator.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,10 @@ internal sealed class LightupGenerator : ISourceGenerator
2020
{
2121
public void Initialize(GeneratorInitializationContext context)
2222
{
23-
context.RegisterForSyntaxNotifications(() => new SyntaxReceiver());
2423
}
2524

2625
public void Execute(GeneratorExecutionContext context)
2726
{
28-
if (context.SyntaxReceiver is not SyntaxReceiver receiver)
29-
{
30-
return;
31-
}
32-
3327
var operationInterfacesFile = context.AdditionalFiles.Single(x => Path.GetFileName(x.Path) == "OperationInterfaces.xml");
3428
var operationInterfacesText = operationInterfacesFile.GetText(context.CancellationToken);
3529
if (operationInterfacesText is null)
@@ -853,12 +847,5 @@ private static bool IsAnyOperationArray(string type)
853847
return type.StartsWith("ImmutableArray<I") && type.EndsWith("Operation>");
854848
}
855849
}
856-
857-
private class SyntaxReceiver : ISyntaxReceiver
858-
{
859-
public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
860-
{
861-
}
862-
}
863850
}
864851
}

0 commit comments

Comments
 (0)