98 references to Diagnostic
Microsoft.CodeAnalysis.Analyzers.UnitTests (48)
FixAnalyzers\FixerWithFixAllAnalyzerTests.cs (5)
417
VerifyCS.
Diagnostic
(FixerWithFixAllAnalyzer.CreateCodeActionEquivalenceKeyRule).WithLocation(0).WithArguments("equivalenceKey"),
418
VerifyCS.
Diagnostic
(FixerWithFixAllAnalyzer.CreateCodeActionEquivalenceKeyRule).WithLocation(1).WithArguments("equivalenceKey"),
749
return VerifyCS.
Diagnostic
(FixerWithFixAllAnalyzer.OverrideCodeActionEquivalenceKeyRule).WithLocation(line, column).WithArguments(customCodeActionName, nameof(CodeAction.EquivalenceKey));
763
return VerifyCS.
Diagnostic
(FixerWithFixAllAnalyzer.CreateCodeActionEquivalenceKeyRule).WithLocation(line, column).WithArguments("equivalenceKey");
777
return VerifyCS.
Diagnostic
(FixerWithFixAllAnalyzer.OverrideGetFixAllProviderRule).WithLocation(line, column).WithArguments(codeFixProviderTypeName);
MetaAnalyzers\AddLanguageSupportToAnalyzerRuleTests.cs (1)
208
VerifyCS.
Diagnostic
(DiagnosticAnalyzerAttributeAnalyzer.AddLanguageSupportToAnalyzerRule)
MetaAnalyzers\CompilerExtensionStrictApiAnalyzerTests.cs (2)
97
test.TestState.ExpectedDiagnostics.Add(VerifyCS.
Diagnostic
(CompilerExtensionStrictApiAnalyzer.DoNotDeclareCompilerFeatureInAssemblyWithWorkspacesReferenceStrictRule).WithLocation(0));
122
VerifyCS.
Diagnostic
(descriptor).WithLocation(0),
MetaAnalyzers\DiagnosticAnalyzerApiUsageAnalyzerTests.cs (2)
1034
VerifyCS.
Diagnostic
(CSharpDiagnosticAnalyzerApiUsageAnalyzer.DoNotUseTypesFromAssemblyDirectRule)
1039
VerifyCS.
Diagnostic
(CSharpDiagnosticAnalyzerApiUsageAnalyzer.DoNotUseTypesFromAssemblyIndirectRule)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzerTests.cs (32)
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));
1933
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
2035
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(1),
2037
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(4));
2169
VerifyCS.
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)
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));
2623
VerifyCS.
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));
3036
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticMessageCorrectlyRule).WithLocation(0)
3131
VerifyCS.
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));
3375
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticMessageCorrectlyRule).WithLocation(0)
3567
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticMessageCorrectlyRule).WithLocation(0)
3672
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(1).WithLocation(2),
3674
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(4).WithLocation(5));
3804
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(0)
3996
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(0)
MetaAnalyzers\InvalidSyntaxKindTypeArgumentRuleTests.cs (1)
188
VerifyCS.
Diagnostic
(CSharpRegisterActionAnalyzer.InvalidSyntaxKindTypeArgumentRule)
MetaAnalyzers\MissingDiagnosticAnalyzerAttributeRuleTests.cs (1)
48
DiagnosticResult expected = VerifyCS.
Diagnostic
(DiagnosticAnalyzerAttributeAnalyzer.MissingDiagnosticAnalyzerAttributeRule).WithLocation(6, 7).WithArguments(WellKnownTypeNames.MicrosoftCodeAnalysisDiagnosticsDiagnosticAnalyzerAttribute);
MetaAnalyzers\MissingKindArgumentToRegisterActionRuleTests.cs (1)
235
return VerifyCS.
Diagnostic
(rule).WithLocation(line, column);
MetaAnalyzers\StartActionWithNoRegisteredActionsRuleTests.cs (1)
480
VerifyCS.
Diagnostic
(CSharpRegisterActionAnalyzer.StartActionWithNoRegisteredActionsRule)
MetaAnalyzers\StartActionWithOnlyEndActionRuleTests.cs (1)
322
VerifyCS.
Diagnostic
(CSharpRegisterActionAnalyzer.StartActionWithOnlyEndActionRule)
MetaAnalyzers\UnsupportedSymbolKindArgumentRuleTests.cs (1)
248
VerifyCS.
Diagnostic
(CSharpRegisterActionAnalyzer.UnsupportedSymbolKindArgumentRule)
Microsoft.CodeAnalysis.BannedApiAnalyzers.UnitTests (1)
SymbolIsBannedAnalyzerTests.cs (1)
27
=> VerifyCS.
Diagnostic
(descriptor)
Roslyn.Diagnostics.Analyzers.UnitTests (2)
SpecializedEnumerableCreationAnalyzerTests.cs (2)
38
VerifyCS.
Diagnostic
(SpecializedEnumerableCreationAnalyzer.UseEmptyEnumerableRule).WithLocation(line, column);
48
VerifyCS.
Diagnostic
(SpecializedEnumerableCreationAnalyzer.UseSingletonEnumerableRule).WithLocation(line, column);
Text.Analyzers.UnitTests (47)
EnumsShouldHavePluralNamesTests.cs (2)
625
=> VerifyCS.
Diagnostic
(EnumsShouldHavePluralNamesAnalyzer.Rule_CA1714)
637
=> VerifyCS.
Diagnostic
(EnumsShouldHavePluralNamesAnalyzer.Rule_CA1717)
IdentifiersShouldBeSpelledCorrectlyTests.cs (45)
101
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.TypeRule)
135
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.TypeRule)
160
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.AssemblyRule)
190
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.AssemblyMoreMeaningfulNameRule)
208
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.NamespaceRule)
216
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.NamespaceMoreMeaningfulNameRule)
229
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.TypeRule)
242
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.TypeMoreMeaningfulNameRule)
251
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberRule)
280
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberRule)
283
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberRule)
292
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberMoreMeaningfulNameRule)
308
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.VariableRule)
317
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
334
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
337
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
366
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
369
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
372
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
401
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
404
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
407
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
436
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
439
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
442
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
471
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
474
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
477
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
502
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
505
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
554
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
557
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
560
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
563
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
566
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
569
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
597
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
600
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
608
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.DelegateParameterRule)
616
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.DelegateParameterMoreMeaningfulNameRule)
629
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.TypeTypeParameterRule)
641
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.TypeTypeParameterMoreMeaningfulNameRule)
656
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MethodTypeParameterRule)
671
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MethodTypeParameterMoreMeaningfulNameRule)
704
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.FileParseRule)