We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 408ac01 commit 3486723Copy full SHA for 3486723
CommunityToolkit.Mvvm.SourceGenerators/Diagnostics/Analyzers/UnsupportedCSharpLanguageVersionAnalyzer.cs
@@ -82,6 +82,9 @@ public override void Initialize(AnalysisContext context)
82
SymbolEqualityComparer.Default.Equals(attributeClass, attributeSymbol))
83
{
84
context.ReportDiagnostic(Diagnostic.Create(UnsupportedCSharpLanguageVersionError, context.Symbol.Locations.FirstOrDefault()));
85
+
86
+ // If we created a diagnostic for this symbol, we can stop. Even if there's multiple attributes, no need for repeated errors
87
+ return;
88
}
89
90
}, SymbolKind.Field, SymbolKind.NamedType, SymbolKind.Method);
0 commit comments