5 types derived from DiagnosticSuppressor
Microsoft.CodeAnalysis.Razor.Compiler (1)
Analyzers\ComponentParameterNullableWarningSuppressor.cs (1)
14
public sealed class ComponentParameterNullableWarningSuppressor :
DiagnosticSuppressor
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ShapeBreakingDiagnosticSuppressor.cs (1)
15
public class ShapeBreakingDiagnosticSuppressor :
DiagnosticSuppressor
Microsoft.ML.InternalCodeAnalyzer (1)
RelaxTestNamingSuppressor.cs (1)
13
public sealed class RelaxTestNamingSuppressor :
DiagnosticSuppressor
Roslyn.Diagnostics.Analyzers (2)
NamedTypeFullNameNotNullSuppressor.cs (1)
16
public sealed class NamedTypeFullNameNotNullSuppressor :
DiagnosticSuppressor
RelaxTestNamingSuppressor.cs (1)
17
public sealed class RelaxTestNamingSuppressor :
DiagnosticSuppressor
50 references to DiagnosticSuppressor
dotnet-format (2)
Analyzers\AnalyzerFormatter.cs (1)
320
if (analyzer is
DiagnosticSuppressor
suppressor)
Analyzers\CodeStyleInformationProvider.cs (1)
56
analyzers.AddRange(thisProjectAnalyzersAndFixers.Analyzers.OfType<
DiagnosticSuppressor
>());
Microsoft.CodeAnalysis (37)
CommandLine\CommandLineArguments.cs (1)
573
bool shouldIncludeAnalyzer(DiagnosticAnalyzer analyzer) => !skipAnalyzers || analyzer is
DiagnosticSuppressor
;
CommandLine\CommonCompiler.cs (1)
1131
if (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 (2)
109
DiagnosticSuppressor
suppressor => suppressor.SupportedSuppressions.Select(s => s.Id),
117
var nonConcurrentAnalyzers = nonConcurrentAnalyzersAndSuppressors.WhereAsArray(a => a is not
DiagnosticSuppressor
);
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)
615
var suppressionActionCounts = analyzer is
DiagnosticSuppressor
? 1 : 0;
DiagnosticAnalyzer\AnalyzerDriver.cs (6)
56
/// Flag indicating if the <see cref="Analyzers"/> include any <see cref="
DiagnosticSuppressor
"/>
383
HasDiagnosticSuppressors = this.Analyzers.Any(static a => a is
DiagnosticSuppressor
);
1103
var suppressors = this.Analyzers.OfType<
DiagnosticSuppressor
>();
1112
foreach (
var
suppressor in suppressors)
1133
foreach (
var
suppressor in suppressors)
1141
ImmutableArray<Diagnostic> getSuppressableDiagnostics(
DiagnosticSuppressor
suppressor)
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
360
public void ExecuteSuppressionAction(
DiagnosticSuppressor
suppressor, ImmutableArray<Diagnostic> reportedDiagnostics, CancellationToken cancellationToken)
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (3)
252
public ImmutableArray<SuppressionDescriptor> GetOrComputeSuppressionDescriptors(
DiagnosticSuppressor
suppressor, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken)
372
if (analyzer is
DiagnosticSuppressor
suppressor)
387
throw new ArgumentException(string.Format(CodeAnalysisResources.SupportedSuppressionsHasNullDescriptor, analyzer.ToString()), nameof(
DiagnosticSuppressor
.SupportedSuppressions));
DiagnosticAnalyzer\AnalyzerManager.cs (5)
263
/// Return <see cref="
DiagnosticSuppressor
.SupportedSuppressions"/> of given <paramref name="suppressor"/>.
266
DiagnosticSuppressor
suppressor,
310
Func<
DiagnosticSuppressor
, ImmutableArray<SuppressionDescriptor>> getSupportedSuppressionDescriptors =
348
Func<
DiagnosticSuppressor
, ImmutableArray<SuppressionDescriptor>> getSupportedSuppressionDescriptors,
419
if (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)
29
private readonly ImmutableArray<
DiagnosticSuppressor
> _suppressors;
104
_suppressors = analyzers.OfType<
DiagnosticSuppressor
>().ToImmutableArrayOrEmpty();
362
ImmutableArray<
DiagnosticSuppressor
> suppressors,
371
var suppressorsInAnalysisScope = analysisScope.Analyzers.OfType<
DiagnosticSuppressor
>().ToImmutableHashSet();
1244
Func<
DiagnosticSuppressor
, ImmutableArray<SuppressionDescriptor>> getSupportedSuppressionDescriptors = suppressor =>
1280
var 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.Features (1)
Diagnostics\Service\DiagnosticAnalyzerService_ForceCodeAnalysisDiagnostics.cs (1)
76
if (analyzer is
DiagnosticSuppressor
)
Microsoft.CodeAnalysis.Workspaces (10)
Diagnostics\DiagnosticAnalyzerInfoCache.cs (8)
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
47
private readonly ConditionalWeakTable<
DiagnosticSuppressor
, SuppressionDescriptorsInfo> _suppressionsInfo = new();
74
/// Returns <see cref="
DiagnosticSuppressor
.SupportedSuppressions"/> of given <paramref name="suppressor"/>.
76
public ImmutableArray<SuppressionDescriptor> GetDiagnosticSuppressions(
DiagnosticSuppressor
suppressor)
142
private SuppressionDescriptorsInfo GetOrCreateSuppressionsInfo(
DiagnosticSuppressor
suppressor)
145
private SuppressionDescriptorsInfo CalculateSuppressionsInfo(
DiagnosticSuppressor
suppressor)
Diagnostics\SkippedHostAnalyzersInfo.cs (2)
68
if (analyzer is
DiagnosticSuppressor
suppressor)
146
if (hostAnalyzer is
DiagnosticSuppressor
suppressor)