107 references to DiagnosticDescriptorCreationAnalyzer
Microsoft.CodeAnalysis.Analyzers (4)
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.cs (2)
127
diagnostic.Properties.TryGetValue(
DiagnosticDescriptorCreationAnalyzer
.EntryToAddPropertyName, out entryToAdd) &&
144
diagnostic.Properties.TryGetValue(
DiagnosticDescriptorCreationAnalyzer
.EntryToUpdatePropertyName, out entryToUpdate) &&
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.cs (2)
139
=> diagnostic.Properties.TryGetValue(
DiagnosticDescriptorCreationAnalyzer
.DefineDescriptorArgumentCorrectlyFixValue, out fixValue) &&
148
if (
DiagnosticDescriptorCreationAnalyzer
.TryGetAdditionalDocumentLocationInfo(diagnostic, out var path, out var fixSpan) &&
Microsoft.CodeAnalysis.Analyzers.UnitTests (103)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzerTests.cs (81)
13
Microsoft.CodeAnalysis.Analyzers.MetaAnalyzers.
DiagnosticDescriptorCreationAnalyzer
,
16
Microsoft.CodeAnalysis.Analyzers.MetaAnalyzers.
DiagnosticDescriptorCreationAnalyzer
,
1801
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(1),
1803
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(4),
1805
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(6).WithLocation(7));
1863
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(1),
1865
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(4),
1867
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(6).WithLocation(7));
1933
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
1968
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
2035
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(1),
2037
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(4));
2093
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(1),
2095
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(4));
2169
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
2204
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
2270
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(4),
2272
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(4)
2327
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(4),
2329
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(4));
2385
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(0),
2386
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(1)
2424
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(0),
2425
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(1)
2496
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(1),
2498
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(3),
2500
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(5).WithLocation(5));
2534
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(1),
2536
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(3),
2538
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(5).WithLocation(5));
2623
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
2658
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
2795
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
2830
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
2902
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(1).WithLocation(1),
2904
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(3).WithLocation(4));
2960
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(1).WithLocation(1),
2962
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(3).WithLocation(4));
3036
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(0)
3071
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(0)
3131
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(1).WithLocation(1));
3181
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(1).WithLocation(1));
3251
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(1).WithLocation(1),
3253
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(3).WithLocation(3),
3255
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(5).WithLocation(5));
3289
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(1).WithLocation(1),
3291
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(3).WithLocation(3),
3293
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(5).WithLocation(5));
3375
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(0)
3410
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(0)
3567
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(0)
3602
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticMessageCorrectlyRule).WithLocation(0)
3672
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(1).WithLocation(2),
3674
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(4).WithLocation(5));
3728
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(1).WithLocation(1),
3730
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(3).WithLocation(4));
3804
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(0)
3839
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(0)
3996
VerifyCS.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(0)
4031
VerifyVB.Diagnostic(
DiagnosticDescriptorCreationAnalyzer
.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(0)
4491
/// Creates an expected diagnostic for <inheritdoc cref="
DiagnosticDescriptorCreationAnalyzer
.UseLocalizableStringsInDescriptorRule"/>
4494
new DiagnosticResult(
DiagnosticDescriptorCreationAnalyzer
.UseLocalizableStringsInDescriptorRule)
4499
/// Creates an expected diagnostic for <inheritdoc cref="
DiagnosticDescriptorCreationAnalyzer
.ProvideHelpUriInDescriptorRule"/>
4502
new DiagnosticResult(
DiagnosticDescriptorCreationAnalyzer
.ProvideHelpUriInDescriptorRule)
4506
/// Creates an expected diagnostic for <inheritdoc cref="
DiagnosticDescriptorCreationAnalyzer
.DiagnosticIdMustBeAConstantRule"/>
4509
new DiagnosticResult(
DiagnosticDescriptorCreationAnalyzer
.DiagnosticIdMustBeAConstantRule)
4514
/// Creates an expected diagnostic for <inheritdoc cref="
DiagnosticDescriptorCreationAnalyzer
.DiagnosticIdMustBeInSpecifiedFormatRule"/>
4517
new DiagnosticResult(
DiagnosticDescriptorCreationAnalyzer
.DiagnosticIdMustBeInSpecifiedFormatRule)
4522
/// Creates an expected diagnostic for <inheritdoc cref="
DiagnosticDescriptorCreationAnalyzer
.UseUniqueDiagnosticIdRule"/>
4525
new DiagnosticResult(
DiagnosticDescriptorCreationAnalyzer
.UseUniqueDiagnosticIdRule)
4530
/// Creates an expected diagnostic for <inheritdoc cref="
DiagnosticDescriptorCreationAnalyzer
.UseCategoriesFromSpecifiedRangeRule"/>
4533
new DiagnosticResult(
DiagnosticDescriptorCreationAnalyzer
.UseCategoriesFromSpecifiedRangeRule)
4538
/// Creates an expected diagnostic for <inheritdoc cref="
DiagnosticDescriptorCreationAnalyzer
.ProvideCustomTagsInDescriptorRule"/>
4541
new DiagnosticResult(
DiagnosticDescriptorCreationAnalyzer
.ProvideCustomTagsInDescriptorRule)
4545
/// Creates an expected diagnostic for <inheritdoc cref="
DiagnosticDescriptorCreationAnalyzer
.AnalyzerCategoryAndIdRangeFileInvalidRule"/>
4548
new DiagnosticResult(
DiagnosticDescriptorCreationAnalyzer
.AnalyzerCategoryAndIdRangeFileInvalidRule)
4553
/// Creates an expected diagnostic for <inheritdoc cref="
DiagnosticDescriptorCreationAnalyzer
.DoNotUseReservedDiagnosticIdRule"/>
4556
new DiagnosticResult(
DiagnosticDescriptorCreationAnalyzer
.DoNotUseReservedDiagnosticIdRule)
4561
/// Creates an expected diagnostic for <inheritdoc cref="
DiagnosticDescriptorCreationAnalyzer
.AddCompilationEndCustomTagRule"/>
4564
new DiagnosticResult(
DiagnosticDescriptorCreationAnalyzer
.AddCompilationEndCustomTagRule)
4671
.Add(
DiagnosticDescriptorCreationAnalyzer
.EnableAnalyzerReleaseTrackingRule.Id, ReportDiagnostic.Suppress);
MetaAnalyzers\ReleaseTrackingAnalyzerTests.cs (22)
80
var test = new CSharpCodeFixVerifier<
DiagnosticDescriptorCreationAnalyzer
, AnalyzerReleaseTrackingFix>.Test()
189
new DiagnosticResult(
DiagnosticDescriptorCreationAnalyzer
.RemoveUnshippedDeletedDiagnosticIdRule).WithArguments("Id1"));
210
new DiagnosticResult(
DiagnosticDescriptorCreationAnalyzer
.RemoveShippedDeletedDiagnosticIdRule).WithArguments("Id1", "1.0"));
510
DiagnosticDescriptorCreationAnalyzer
.InvalidUndetectedEntryInAnalyzerReleasesFileRule,
606
DiagnosticDescriptorCreationAnalyzer
.InvalidHeaderInAnalyzerReleasesFileRule,
631
DiagnosticDescriptorCreationAnalyzer
.InvalidUndetectedEntryInAnalyzerReleasesFileRule :
632
DiagnosticDescriptorCreationAnalyzer
.InvalidEntryInAnalyzerReleasesFileRule;
691
DiagnosticDescriptorCreationAnalyzer
.InvalidUndetectedEntryInAnalyzerReleasesFileRule :
692
DiagnosticDescriptorCreationAnalyzer
.InvalidEntryInAnalyzerReleasesFileRule;
844
DiagnosticDescriptorCreationAnalyzer
.InvalidRemovedOrChangedWithoutPriorNewEntryInAnalyzerReleasesFileRule,
878
DiagnosticDescriptorCreationAnalyzer
.InvalidRemovedOrChangedWithoutPriorNewEntryInAnalyzerReleasesFileRule,
911
DiagnosticDescriptorCreationAnalyzer
.InvalidRemovedOrChangedWithoutPriorNewEntryInAnalyzerReleasesFileRule,
1016
.Add(
DiagnosticDescriptorCreationAnalyzer
.DiagnosticIdMustBeInSpecifiedFormatRule.Id, ReportDiagnostic.Suppress)
1017
.Add(
DiagnosticDescriptorCreationAnalyzer
.DoNotUseReservedDiagnosticIdRule.Id, ReportDiagnostic.Suppress)
1018
.Add(
DiagnosticDescriptorCreationAnalyzer
.ProvideCustomTagsInDescriptorRule.Id, ReportDiagnostic.Suppress)
1019
.Add(
DiagnosticDescriptorCreationAnalyzer
.ProvideHelpUriInDescriptorRule.Id, ReportDiagnostic.Suppress)
1020
.Add(
DiagnosticDescriptorCreationAnalyzer
.UseCategoriesFromSpecifiedRangeRule.Id, ReportDiagnostic.Suppress)
1021
.Add(
DiagnosticDescriptorCreationAnalyzer
.UseLocalizableStringsInDescriptorRule.Id, ReportDiagnostic.Suppress)
1022
.Add(
DiagnosticDescriptorCreationAnalyzer
.UseUniqueDiagnosticIdRule.Id, ReportDiagnostic.Suppress);
1033
var test = new CSharpCodeFixTest<
DiagnosticDescriptorCreationAnalyzer
, AnalyzerReleaseTrackingFix, DefaultVerifier>
1073
? new CSharpCodeFixTest<
DiagnosticDescriptorCreationAnalyzer
, AnalyzerReleaseTrackingFix, DefaultVerifier>()
1074
: (CodeFixTest<DefaultVerifier>)new VisualBasicCodeFixTest<
DiagnosticDescriptorCreationAnalyzer
, AnalyzerReleaseTrackingFix, DefaultVerifier>();