98 references to Diagnostic
Microsoft.CodeAnalysis.Analyzers.UnitTests (48)
FixAnalyzers\FixerWithFixAllAnalyzerTests.cs (5)
407
VerifyCS.
Diagnostic
(FixerWithFixAllAnalyzer.CreateCodeActionEquivalenceKeyRule).WithLocation(0).WithArguments("equivalenceKey"),
408
VerifyCS.
Diagnostic
(FixerWithFixAllAnalyzer.CreateCodeActionEquivalenceKeyRule).WithLocation(1).WithArguments("equivalenceKey"),
731
return VerifyCS.
Diagnostic
(FixerWithFixAllAnalyzer.OverrideCodeActionEquivalenceKeyRule).WithLocation(line, column).WithArguments(customCodeActionName, nameof(CodeAction.EquivalenceKey));
745
return VerifyCS.
Diagnostic
(FixerWithFixAllAnalyzer.CreateCodeActionEquivalenceKeyRule).WithLocation(line, column).WithArguments("equivalenceKey");
759
return VerifyCS.
Diagnostic
(FixerWithFixAllAnalyzer.OverrideGetFixAllProviderRule).WithLocation(line, column).WithArguments(codeFixProviderTypeName);
MetaAnalyzers\AddLanguageSupportToAnalyzerRuleTests.cs (1)
207
VerifyCS.
Diagnostic
(DiagnosticAnalyzerAttributeAnalyzer.AddLanguageSupportToAnalyzerRule)
MetaAnalyzers\CompilerExtensionStrictApiAnalyzerTests.cs (2)
99
test.TestState.ExpectedDiagnostics.Add(VerifyCS.
Diagnostic
(CompilerExtensionStrictApiAnalyzer.DoNotDeclareCompilerFeatureInAssemblyWithWorkspacesReferenceStrictRule).WithLocation(0));
124
VerifyCS.
Diagnostic
(descriptor).WithLocation(0),
MetaAnalyzers\DiagnosticAnalyzerApiUsageAnalyzerTests.cs (2)
1029
VerifyCS.
Diagnostic
(CSharpDiagnosticAnalyzerApiUsageAnalyzer.DoNotUseTypesFromAssemblyDirectRule)
1034
VerifyCS.
Diagnostic
(CSharpDiagnosticAnalyzerApiUsageAnalyzer.DoNotUseTypesFromAssemblyIndirectRule)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzerTests.cs (32)
1759
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(1),
1761
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(4),
1763
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(6).WithLocation(7));
1883
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
1979
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(1),
1981
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(4));
2105
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
2200
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(4),
2202
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(4)
2253
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(4),
2255
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(4));
2307
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(0),
2308
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(1)
2412
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(1).WithLocation(1),
2414
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(3).WithLocation(3),
2416
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(5).WithLocation(5));
2529
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
2691
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
2724
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticTitleCorrectlyRule).WithLocation(0)
2792
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticMessageCorrectlyRule).WithLocation(1).WithLocation(1),
2794
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticMessageCorrectlyRule).WithLocation(3).WithLocation(4));
2918
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticMessageCorrectlyRule).WithLocation(0)
3007
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticMessageCorrectlyRule).WithLocation(1).WithLocation(1));
3119
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticMessageCorrectlyRule).WithLocation(1).WithLocation(1),
3121
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticMessageCorrectlyRule).WithLocation(3).WithLocation(3),
3123
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticMessageCorrectlyRule).WithLocation(5).WithLocation(5));
3233
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticMessageCorrectlyRule).WithLocation(0)
3415
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticMessageCorrectlyRule).WithLocation(0)
3514
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(1).WithLocation(2),
3516
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(4).WithLocation(5));
3638
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(0)
3820
VerifyCS.
Diagnostic
(DiagnosticDescriptorCreationAnalyzer.DefineDiagnosticDescriptionCorrectlyRule).WithLocation(0)
MetaAnalyzers\InvalidSyntaxKindTypeArgumentRuleTests.cs (1)
196
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)
238
return VerifyCS.
Diagnostic
(rule).WithLocation(line, column);
MetaAnalyzers\StartActionWithNoRegisteredActionsRuleTests.cs (1)
507
VerifyCS.
Diagnostic
(CSharpRegisterActionAnalyzer.StartActionWithNoRegisteredActionsRule)
MetaAnalyzers\StartActionWithOnlyEndActionRuleTests.cs (1)
337
VerifyCS.
Diagnostic
(CSharpRegisterActionAnalyzer.StartActionWithOnlyEndActionRule)
MetaAnalyzers\UnsupportedSymbolKindArgumentRuleTests.cs (1)
256
VerifyCS.
Diagnostic
(CSharpRegisterActionAnalyzer.UnsupportedSymbolKindArgumentRule)
Microsoft.CodeAnalysis.BannedApiAnalyzers.UnitTests (1)
SymbolIsBannedAnalyzerTests.cs (1)
27
=> VerifyCS.
Diagnostic
(descriptor)
Roslyn.Diagnostics.Analyzers.UnitTests (2)
SpecializedEnumerableCreationAnalyzerTests.cs (2)
34
VerifyCS.
Diagnostic
(SpecializedEnumerableCreationAnalyzer.UseEmptyEnumerableRule).WithLocation(line, column);
44
VerifyCS.
Diagnostic
(SpecializedEnumerableCreationAnalyzer.UseSingletonEnumerableRule).WithLocation(line, column);
Text.Analyzers.UnitTests (47)
EnumsShouldHavePluralNamesTests.cs (2)
561
=> VerifyCS.
Diagnostic
(EnumsShouldHavePluralNamesAnalyzer.Rule_CA1714)
573
=> VerifyCS.
Diagnostic
(EnumsShouldHavePluralNamesAnalyzer.Rule_CA1717)
IdentifiersShouldBeSpelledCorrectlyTests.cs (45)
107
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.TypeRule)
142
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.TypeRule)
167
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.AssemblyRule)
197
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.AssemblyMoreMeaningfulNameRule)
218
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.NamespaceRule)
230
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.NamespaceMoreMeaningfulNameRule)
245
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.TypeRule)
260
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.TypeMoreMeaningfulNameRule)
271
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberRule)
303
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberRule)
306
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberRule)
317
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberMoreMeaningfulNameRule)
336
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.VariableRule)
347
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
367
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
370
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
402
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
405
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
408
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
440
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
443
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
446
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
478
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
481
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
484
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterMoreMeaningfulNameRule)
516
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
519
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
522
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
550
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
553
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
607
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
610
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
613
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
616
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
619
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
622
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
655
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
658
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MemberParameterRule)
670
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.DelegateParameterRule)
682
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.DelegateParameterMoreMeaningfulNameRule)
697
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.TypeTypeParameterRule)
711
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.TypeTypeParameterMoreMeaningfulNameRule)
729
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MethodTypeParameterRule)
747
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.MethodTypeParameterMoreMeaningfulNameRule)
787
VerifyCS.
Diagnostic
(IdentifiersShouldBeSpelledCorrectlyAnalyzer.FileParseRule)