diff --git a/samples/dotnet/SponsorLink/DiagnosticsManager.cs b/samples/dotnet/SponsorLink/DiagnosticsManager.cs index 002cd182..68420c75 100644 --- a/samples/dotnet/SponsorLink/DiagnosticsManager.cs +++ b/samples/dotnet/SponsorLink/DiagnosticsManager.cs @@ -203,7 +203,7 @@ SponsorStatus GetOrSetStatus(Func> getAdditionalF string.Join(", ", sponsorable.Select(x => $"https://github.com/sponsors/{x}")), string.Join(" ", sponsorable)), helpLinkUri: "https://github.com/devlooped#sponsorlink", - WellKnownDiagnosticTags.NotConfigurable); + WellKnownDiagnosticTags.NotConfigurable, "CompilationEnd"); internal static DiagnosticDescriptor CreateExpiring(string[] sponsorable, string prefix) => new( $"{prefix}101", @@ -214,7 +214,7 @@ SponsorStatus GetOrSetStatus(Func> getAdditionalF isEnabledByDefault: true, description: string.Format(CultureInfo.CurrentCulture, Resources.Expiring_Description, string.Join(" ", sponsorable)), helpLinkUri: "https://github.com/devlooped#autosync", - "DoesNotSupportF1Help", WellKnownDiagnosticTags.NotConfigurable); + "DoesNotSupportF1Help", WellKnownDiagnosticTags.NotConfigurable, "CompilationEnd"); internal static DiagnosticDescriptor CreateExpired(string[] sponsorable, string prefix) => new( $"{prefix}102", @@ -225,7 +225,7 @@ SponsorStatus GetOrSetStatus(Func> getAdditionalF isEnabledByDefault: true, description: string.Format(CultureInfo.CurrentCulture, Resources.Expired_Description, string.Join(" ", sponsorable)), helpLinkUri: "https://github.com/devlooped#autosync", - "DoesNotSupportF1Help", WellKnownDiagnosticTags.NotConfigurable); + "DoesNotSupportF1Help", WellKnownDiagnosticTags.NotConfigurable, "CompilationEnd"); internal static DiagnosticDescriptor CreateSponsor(string[] sponsorable, string prefix, bool hidden = false) => new( $"{prefix}105", @@ -236,7 +236,7 @@ SponsorStatus GetOrSetStatus(Func> getAdditionalF isEnabledByDefault: true, description: Resources.Sponsor_Description, helpLinkUri: "https://github.com/devlooped#sponsorlink", - "DoesNotSupportF1Help"); + "DoesNotSupportF1Help", "CompilationEnd"); internal static DiagnosticDescriptor CreateContributor(string[] sponsorable, string prefix, bool hidden = false) => new( $"{prefix}106", @@ -247,5 +247,5 @@ SponsorStatus GetOrSetStatus(Func> getAdditionalF isEnabledByDefault: true, description: Resources.Contributor_Description, helpLinkUri: "https://github.com/devlooped#sponsorlink", - "DoesNotSupportF1Help"); + "DoesNotSupportF1Help", "CompilationEnd"); } diff --git a/src/Tests/Analyzer.cs b/src/Tests/Analyzer.cs index ae509c4c..c5575f8e 100644 --- a/src/Tests/Analyzer.cs +++ b/src/Tests/Analyzer.cs @@ -10,7 +10,7 @@ namespace Devlooped.Tests; [DiagnosticAnalyzer(LanguageNames.CSharp)] public class TestSponsorLink : DiagnosticAnalyzer { - static DiagnosticDescriptor descriptor = new("IDE001", "IDE", "IDE", "Design", DiagnosticSeverity.Warning, true); + static DiagnosticDescriptor descriptor = new("IDE001", "IDE", "IDE", "Design", DiagnosticSeverity.Warning, true, customTags: ["CompilationEnd"]); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(descriptor);