19 instantiations of SuppressionDescriptor
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
RequestDelegateGeneratorSuppressor.cs (2)
26private static readonly SuppressionDescriptor SuppressRUCDiagnostic = new( 31private static readonly SuppressionDescriptor SuppressRDCDiagnostic = new(
Microsoft.CodeAnalysis (1)
Diagnostic\SuppressionDescriptor.cs (1)
34/// use constructor overload <see cref="SuppressionDescriptor(string, string, LocalizableString)"/>.
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
916var descriptor = new SuppressionDescriptor("SPR" + id, id, justification: analyzerName);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\GetDiagnosticsTests.cs (1)
1472private readonly SuppressionDescriptor _descriptor = new(SuppressionId, "CS0657", "Justification");
Microsoft.CodeAnalysis.Test.Utilities (12)
Diagnostics\CommonDiagnosticAnalyzers.cs (12)
514public static readonly SuppressionDescriptor Descriptor1 = new("SPR0001", AnalyzerForErrorLogTest.Descriptor1.Id, "SuppressorJustification1"); 515public static readonly SuppressionDescriptor Descriptor2 = new("SPR0002", AnalyzerForErrorLogTest.Descriptor2.Id, "SuppressorJustification2"); 2162SuppressionDescriptor = new SuppressionDescriptor( 2190var descriptor = new SuppressionDescriptor( 2224SuppressionDescriptor = new SuppressionDescriptor( 2266_descriptor = new SuppressionDescriptor( 2290_supportedDescriptor = new SuppressionDescriptor( 2295_unsupportedDescriptor = new SuppressionDescriptor( 2322_supportedDescriptor = new SuppressionDescriptor( 2327_unsupportedDescriptor = new SuppressionDescriptor( 2354_descriptor1 = new SuppressionDescriptor( 2358_descriptor2 = new SuppressionDescriptor(
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ShapeBreakingDiagnosticSuppressor.cs (1)
17public static readonly SuppressionDescriptor MarkMethodsAsStaticSuppression = new SuppressionDescriptor("SYSLIBSUPPRESS0001", "CA1822", "Do not offer to make methods static when the methods need to be instance methods for a custom marshaller shape.");
Microsoft.ML.InternalCodeAnalyzer (1)
RelaxTestNamingSuppressor.cs (1)
20new SuppressionDescriptor(Id, SuppressedDiagnosticId, Justification);
70 references to SuppressionDescriptor
Microsoft.AspNetCore.Http.RequestDelegateGenerator (4)
RequestDelegateGeneratorSuppressor.cs (4)
26private static readonly SuppressionDescriptor SuppressRUCDiagnostic = new( 31private static readonly SuppressionDescriptor SuppressRDCDiagnostic = new( 65var targetSuppression = diagnostic.Id == SuppressRUCDiagnostic.SuppressedDiagnosticId 73public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions => ImmutableArray.Create(SuppressRUCDiagnostic, SuppressRDCDiagnostic);
Microsoft.CodeAnalysis (24)
Diagnostic\SuppressionDescriptor.cs (3)
14public sealed class SuppressionDescriptor : IEquatable<SuppressionDescriptor?> 73public bool Equals(SuppressionDescriptor? other) 89return Equals(obj as SuppressionDescriptor);
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
295Func<SuppressionDescriptor, bool> isSupportedSuppression = supportedSuppressions.Contains;
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (5)
64private ImmutableArray<SuppressionDescriptor> _lazySuppressionDescriptors; 252public ImmutableArray<SuppressionDescriptor> GetOrComputeSuppressionDescriptors(DiagnosticSuppressor suppressor, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken) 365private static ImmutableArray<SuppressionDescriptor> ComputeSuppressionDescriptors_NoLock( 370var descriptors = ImmutableArray<SuppressionDescriptor>.Empty; 382foreach (var descriptor in descriptorsLocal)
DiagnosticAnalyzer\AnalyzerManager.cs (4)
264public ImmutableArray<SuppressionDescriptor> GetSupportedSuppressionDescriptors( 309Func<DiagnosticSuppressor, ImmutableArray<SuppressionDescriptor>> getSupportedSuppressionDescriptors = 347Func<DiagnosticSuppressor, ImmutableArray<SuppressionDescriptor>> getSupportedSuppressionDescriptors, 420foreach (var suppressionDescriptor in getSupportedSuppressionDescriptors(suppressor))
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (2)
1247Func<DiagnosticSuppressor, ImmutableArray<SuppressionDescriptor>> getSupportedSuppressionDescriptors = suppressor => 1255return ImmutableArray<SuppressionDescriptor>.Empty;
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (2)
1884private readonly Func<SuppressionDescriptor, bool> _isSupportedSuppressionDescriptor; 1919Func<SuppressionDescriptor, bool> isSupportedSuppressionDescriptor,
DiagnosticAnalyzer\DiagnosticSuppressor.cs (1)
27public abstract ImmutableArray<SuppressionDescriptor> SupportedSuppressions { get; }
DiagnosticAnalyzer\Suppression.cs (6)
17private Suppression(SuppressionDescriptor descriptor, Diagnostic suppressedDiagnostic) 32/// Creates a suppression of a <see cref="Diagnostic"/> with the given <see cref="SuppressionDescriptor"/>. 41public static Suppression Create(SuppressionDescriptor descriptor, Diagnostic suppressedDiagnostic) 47public SuppressionDescriptor Descriptor { get; } 72return EqualityComparer<SuppressionDescriptor>.Default.Equals(Descriptor, other.Descriptor) 79EqualityComparer<SuppressionDescriptor>.Default.GetHashCode(Descriptor),
Microsoft.CodeAnalysis.Compiler.Test.Resources (2)
Analyzers\DoNothingSuppressor.cs (2)
14public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions => ImmutableArray<SuppressionDescriptor>.Empty;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (7)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (7)
903private readonly Dictionary<string, SuppressionDescriptor> mapping = []; 908private static ImmutableArray<SuppressionDescriptor> CreateSupportedSuppressions( 910Dictionary<string, SuppressionDescriptor> mapping, 913var builder = ArrayBuilder<SuppressionDescriptor>.GetInstance(reportedIds.Length); 916var descriptor = new SuppressionDescriptor("SPR" + id, id, justification: analyzerName); 926public sealed override ImmutableArray<SuppressionDescriptor> SupportedSuppressions { get; } 934if (this.mapping.TryGetValue(diagnostic.Id, out var descriptor))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Diagnostics\GetDiagnosticsTests.cs (2)
1472private readonly SuppressionDescriptor _descriptor = new(SuppressionId, "CS0657", "Justification"); 1473public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions => ImmutableArray.Create(_descriptor);
Microsoft.CodeAnalysis.Test.Utilities (23)
Diagnostics\CommonDiagnosticAnalyzers.cs (23)
514public static readonly SuppressionDescriptor Descriptor1 = new("SPR0001", AnalyzerForErrorLogTest.Descriptor1.Id, "SuppressorJustification1"); 515public static readonly SuppressionDescriptor Descriptor2 = new("SPR0002", AnalyzerForErrorLogTest.Descriptor2.Id, "SuppressorJustification2"); 517public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions 524var descriptor = diagnostic.Id == Descriptor1.SuppressedDiagnosticId ? Descriptor1 : Descriptor2; 2159public SuppressionDescriptor SuppressionDescriptor { get; } 2168public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions 2186var builder = ImmutableArray.CreateBuilder<SuppressionDescriptor>(); 2190var descriptor = new SuppressionDescriptor( 2200public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions { get; } 2206foreach (var suppressionDescriptor in SupportedSuppressions) 2221public SuppressionDescriptor SuppressionDescriptor { get; } 2230public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions 2250public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions 2261private readonly SuppressionDescriptor _descriptor; 2273public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions 2285private readonly SuppressionDescriptor _supportedDescriptor; 2286private readonly SuppressionDescriptor _unsupportedDescriptor; 2301public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions 2317private readonly SuppressionDescriptor _supportedDescriptor; 2318private readonly SuppressionDescriptor _unsupportedDescriptor; 2333public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions 2349private readonly SuppressionDescriptor _descriptor1, _descriptor2; 2365public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions
Microsoft.CodeAnalysis.Workspaces (4)
Diagnostics\DiagnosticAnalyzerInfoCache.cs (4)
62private sealed class SuppressionDescriptorsInfo(ImmutableArray<SuppressionDescriptor> supportedSuppressions) 64public readonly ImmutableArray<SuppressionDescriptor> SupportedSuppressions = supportedSuppressions; 95public ImmutableArray<SuppressionDescriptor> GetDiagnosticSuppressions(DiagnosticSuppressor suppressor) 166ImmutableArray<SuppressionDescriptor> suppressions;
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\ShapeBreakingDiagnosticSuppressor.cs (2)
17public static readonly SuppressionDescriptor MarkMethodsAsStaticSuppression = new SuppressionDescriptor("SYSLIBSUPPRESS0001", "CA1822", "Do not offer to make methods static when the methods need to be instance methods for a custom marshaller shape."); 19public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions =>
Microsoft.ML.InternalCodeAnalyzer (2)
RelaxTestNamingSuppressor.cs (2)
19internal static readonly SuppressionDescriptor Rule = 22public override ImmutableArray<SuppressionDescriptor> SupportedSuppressions { get; } = ImmutableArray.Create(Rule);