15 types derived from DiagnosticSuppressor
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
RequestDelegateGeneratorSuppressor.cs (1)
24public sealed class RequestDelegateGeneratorSuppressor : DiagnosticSuppressor
Microsoft.CodeAnalysis.Compiler.Test.Resources (1)
Analyzers\DoNothingSuppressor.cs (1)
12public sealed class DoNothingSuppressor : DiagnosticSuppressor
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
901private abstract class AbstractNugetOrVsixSuppressor : DiagnosticSuppressor
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\GetDiagnosticsTests.cs (1)
1469private sealed class DiagnosticSuppressorForCS0657 : DiagnosticSuppressor
Microsoft.CodeAnalysis.Test.Utilities (9)
Diagnostics\CommonDiagnosticAnalyzers.cs (9)
512public class SuppressorForErrorLogTest : DiagnosticSuppressor 2157public sealed class DiagnosticSuppressorForId : DiagnosticSuppressor 2182public sealed class DiagnosticSuppressorForMultipleIds : DiagnosticSuppressor 2218public sealed class DiagnosticSuppressorForId_ThrowsOperationCancelledException : DiagnosticSuppressor 2241public sealed class DiagnosticSuppressorThrowsExceptionFromSupportedSuppressions : DiagnosticSuppressor 2259public sealed class DiagnosticSuppressorThrowsExceptionFromReportedSuppressions : DiagnosticSuppressor 2283public sealed class DiagnosticSuppressor_UnsupportedSuppressionReported : DiagnosticSuppressor 2315public sealed class DiagnosticSuppressor_InvalidDiagnosticSuppressionReported : DiagnosticSuppressor 2347public sealed class DiagnosticSuppressor_NonReportedDiagnosticCannotBeSuppressed : DiagnosticSuppressor
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ShapeBreakingDiagnosticSuppressor.cs (1)
15public class ShapeBreakingDiagnosticSuppressor : DiagnosticSuppressor
Microsoft.ML.InternalCodeAnalyzer (1)
RelaxTestNamingSuppressor.cs (1)
13public sealed class RelaxTestNamingSuppressor : DiagnosticSuppressor
47 references to DiagnosticSuppressor
Microsoft.CodeAnalysis (36)
CommandLine\CommandLineArguments.cs (1)
562bool shouldIncludeAnalyzer(DiagnosticAnalyzer analyzer) => !skipAnalyzers || analyzer is DiagnosticSuppressor;
CommandLine\CommonCompiler.cs (1)
1126if (HasSuppressableWarningsOrErrors(diagnostics) && analyzers.Any(a => a is DiagnosticSuppressor))
CommandLine\CommonCompiler.SuppressionDiagnostic.cs (1)
16/// Special informational diagnostic for each programmatic <see cref="Diagnostics.Suppression"/> reported by a <see cref="Diagnostics.DiagnosticSuppressor"/>.
CommandLine\ReportAnalyzerUtil.cs (1)
108DiagnosticSuppressor suppressor => suppressor.SupportedSuppressions.Select(s => s.Id),
Diagnostic\ProgrammaticSuppressionInfo.cs (1)
12/// Contains information about the source of a programmatic diagnostic suppression produced by an <see cref="DiagnosticSuppressor"/>.
Diagnostic\SuppressionDescriptor.cs (1)
12/// Provides a description about a programmatic suppression of a <see cref="Diagnostic"/> by a <see cref="DiagnosticSuppressor"/>.
Diagnostic\SuppressionInfo.cs (1)
28/// If the diagnostic was suppressed by one or more programmatic suppressions by <see cref="DiagnosticSuppressor"/>(s),
DiagnosticAnalyzer\AnalysisResultBuilder.cs (1)
599var suppressionActionCounts = analyzer is DiagnosticSuppressor ? 1 : 0;
DiagnosticAnalyzer\AnalyzerDriver.cs (6)
53/// Flag indicating if the <see cref="Analyzers"/> include any <see cref="DiagnosticSuppressor"/> 380HasDiagnosticSuppressors = this.Analyzers.Any(static a => a is DiagnosticSuppressor); 1093var suppressors = this.Analyzers.OfType<DiagnosticSuppressor>(); 1102foreach (var suppressor in suppressors) 1123foreach (var suppressor in suppressors) 1131ImmutableArray<Diagnostic> getSuppressableDiagnostics(DiagnosticSuppressor suppressor)
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
283public void ExecuteSuppressionAction(DiagnosticSuppressor suppressor, ImmutableArray<Diagnostic> reportedDiagnostics, CancellationToken cancellationToken)
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (3)
252public ImmutableArray<SuppressionDescriptor> GetOrComputeSuppressionDescriptors(DiagnosticSuppressor suppressor, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken) 372if (analyzer is DiagnosticSuppressor suppressor) 387throw new ArgumentException(string.Format(CodeAnalysisResources.SupportedSuppressionsHasNullDescriptor, analyzer.ToString()), nameof(DiagnosticSuppressor.SupportedSuppressions));
DiagnosticAnalyzer\AnalyzerManager.cs (5)
262/// Return <see cref="DiagnosticSuppressor.SupportedSuppressions"/> of given <paramref name="suppressor"/>. 265DiagnosticSuppressor suppressor, 309Func<DiagnosticSuppressor, ImmutableArray<SuppressionDescriptor>> getSupportedSuppressionDescriptors = 347Func<DiagnosticSuppressor, ImmutableArray<SuppressionDescriptor>> getSupportedSuppressionDescriptors, 418if (analyzer is DiagnosticSuppressor suppressor)
DiagnosticAnalyzer\AnalyzerTelemetry.cs (2)
120/// This is the same as count of <see cref="DiagnosticSuppressor"/>s as each suppressor 121/// has a single suppression action, i.e. <see cref="DiagnosticSuppressor.ReportSuppressions(SuppressionAnalysisContext)"/>.
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (6)
29private readonly ImmutableArray<DiagnosticSuppressor> _suppressors; 104_suppressors = analyzers.OfType<DiagnosticSuppressor>().ToImmutableArrayOrEmpty(); 367ImmutableArray<DiagnosticSuppressor> suppressors, 376var suppressorsInAnalysisScope = analysisScope.Analyzers.OfType<DiagnosticSuppressor>().ToImmutableHashSet(); 1247Func<DiagnosticSuppressor, ImmutableArray<SuppressionDescriptor>> getSupportedSuppressionDescriptors = suppressor => 1283var suppressionActionCounts = analyzer is DiagnosticSuppressor ? 1 : 0;
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (2)
1889/// Each <see cref="DiagnosticSuppressor"/> only receives diagnostics whose IDs were declared suppressible in its <see cref="DiagnosticSuppressor.SupportedSuppressions"/>.
DiagnosticAnalyzer\Suppression.cs (3)
13/// Programmatic suppression of a <see cref="Diagnostic"/> by a <see cref="DiagnosticSuppressor"/>. 35/// Descriptor for the suppression, which must be from <see cref="DiagnosticSuppressor.SupportedSuppressions"/> 36/// for the <see cref="DiagnosticSuppressor"/> creating this suppression.
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
9517Assert.All(analyzers, static x => Assert.IsAssignableFrom<DiagnosticSuppressor>(x));
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
149var filteredProjectSuppressors = filteredProjectAnalyzers.WhereAsArray(static a => a is DiagnosticSuppressor);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (1)
131if (analyzer is DiagnosticSuppressor)
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (2)
514hostBuilder.AddRange(projectAnalyzers.WhereAsArray(static a => a is DiagnosticSuppressor)); 598hostAnalyzerBuilder.AddRange(analyzers.WhereAsArray(static a => a is DiagnosticSuppressor));
Microsoft.CodeAnalysis.Workspaces (6)
Diagnostics\DiagnosticAnalyzerInfoCache.cs (4)
38/// Supported suppressions of each <see cref="DiagnosticSuppressor"/>. 41/// Holds on <see cref="DiagnosticSuppressor"/> instances weakly so that we don't keep suppressors coming from package references alive. 44/// The purpose of this map is to avoid multiple calls to <see cref="DiagnosticSuppressor.SupportedSuppressions"/> that might return different values 47private readonly ConditionalWeakTable<DiagnosticSuppressor, SuppressionDescriptorsInfo> _suppressionsInfo;
Diagnostics\SkippedHostAnalyzersInfo.cs (2)
68if (analyzer is DiagnosticSuppressor suppressor) 146if (hostAnalyzer is DiagnosticSuppressor suppressor)