1 write to Descriptor
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
1057
Descriptor
= new DiagnosticDescriptor(
55 references to Descriptor
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (11)
CommandLineTests.cs (11)
13066
Assert.Contains($"warning {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal);
13070
var suppressor = new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id);
13075
analyzer.
Descriptor
.MessageFormat,
13084
Assert.DoesNotContain($"warning {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal);
13093
Assert.Contains($"error {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal);
13102
Assert.DoesNotContain($"warning {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal);
13108
suppressor = new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id);
13113
Assert.Contains($"warning {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal);
13133
Assert.Contains($"error {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal);
13136
var suppressor = new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id);
13141
Assert.Contains($"error {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (29)
Diagnostics\DiagnosticSuppressorTests.cs (29)
235
Diagnostic(analyzer.
Descriptor
.Id, source1, isSuppressed: false).WithLocation(1, 1),
236
Diagnostic(analyzer.
Descriptor
.Id, source2, isSuppressed: false).WithLocation(1, 1),
240
var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id) };
242
Diagnostic(analyzer.
Descriptor
.Id, source1, isSuppressed: true).WithLocation(1, 1),
243
Diagnostic(analyzer.
Descriptor
.Id, source2, isSuppressed: true).WithLocation(1, 1),
257
var expectedDiagnostic = Diagnostic(analyzer.
Descriptor
.Id, source, isSuppressed: false).WithLocation(1, 1);
261
expectedDiagnostic = Diagnostic(analyzer.
Descriptor
.Id, source, isSuppressed: true).WithLocation(1, 1);
262
var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id), new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id) };
267
analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id, suppressionId: "SPR0001"), new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id, suppressionId: "SPR0002") };
284
Diagnostic(analyzer.
Descriptor
.Id, source));
287
var suppressor2 = new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id);
292
Diagnostic(analyzer.
Descriptor
.Id, source, isSuppressed: true));
305
var expectedDiagnostic = Diagnostic(analyzer.
Descriptor
.Id, source, isSuppressed: false);
309
var analyzersAndSuppressors = new DiagnosticAnalyzer[] { analyzer, new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id, suppressionId) };
310
expectedDiagnostic = Diagnostic(analyzer.
Descriptor
.Id, source, isSuppressed: true);
355
var suppressor = new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id);
360
key: analyzer.
Descriptor
.Id,
434
var suppressor = new DiagnosticSuppressorThrowsExceptionFromReportedSuppressions(analyzer.
Descriptor
.Id, expectedException);
480
var suppressor = new DiagnosticSuppressor_UnsupportedSuppressionReported(analyzer.
Descriptor
.Id, supportedSuppressionId, unsupportedSuppressionId);
533
var suppressor = new DiagnosticSuppressor_InvalidDiagnosticSuppressionReported(analyzer.
Descriptor
.Id, unsupportedSuppressedId);
537
var exceptionMessage = string.Format(CodeAnalysisResources.InvalidDiagnosticSuppressionReported, analyzer.
Descriptor
.Id, unsupportedSuppressedId);
586
var suppressor = new DiagnosticSuppressor_NonReportedDiagnosticCannotBeSuppressed(analyzer.
Descriptor
.Id, nonReportedDiagnosticId);
635
var expectedDiagnostic = Diagnostic(analyzer.
Descriptor
.Id, source);
639
var suppressor = new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id, suppressionId);
650
var suppressor2 = new DiagnosticSuppressorForId(analyzer.
Descriptor
.Id, suppressionId2);
675
var expectedDiagnostic = Diagnostic(analyzer.
Descriptor
.Id, source);
678
var suppressor = new DiagnosticSuppressorForId_ThrowsOperationCancelledException(analyzer.
Descriptor
.Id);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Diagnostics\DiagnosticServiceTests.vb (2)
2135
Assert.Equal(analyzer.
Descriptor
.Id, descriptors.Single().Id)
2154
Assert.Equal(analyzer.
Descriptor
.Id, hiddenDiagnostics.Single().Id)
Microsoft.CodeAnalysis.Test.Utilities (2)
Diagnostics\CommonDiagnosticAnalyzers.cs (2)
1069
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
Descriptor
);
1081
context.ReportDiagnostic(Diagnostic.Create(
Descriptor
, tree.GetRoot().GetLocation()));
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (11)
CommandLineTests.vb (11)
9902
Assert.Contains($"warning {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal)
9906
Dim suppressor = New DiagnosticSuppressorForId(analyzer.
Descriptor
.Id)
9911
analyzer.
Descriptor
.MessageFormat,
9919
Assert.DoesNotContain($"warning {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal)
9928
Assert.Contains($"error {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal)
9936
Assert.DoesNotContain($"warning {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal)
9942
suppressor = New DiagnosticSuppressorForId(analyzer.
Descriptor
.Id)
9947
Assert.Contains($"warning {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal)
9967
Assert.Contains($"error {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal)
9970
Dim suppressor = New DiagnosticSuppressorForId(analyzer.
Descriptor
.Id)
9975
Assert.Contains($"error {analyzer.
Descriptor
.Id}", output, StringComparison.Ordinal)