24 references to Diagnostic
Microsoft.CodeAnalysis.Analyzers.UnitTests (5)
MetaAnalyzers\SymbolIsBannedInAnalyzersTests.cs (5)
48
VerifyCS.
Diagnostic
("RS1035").WithSpan(14, 13, 14, 37).WithArguments("File", ": Do not do file IO in analyzers"),
89
VerifyCS.
Diagnostic
("RS1035").WithSpan(18, 13, 18, 37).WithArguments("File", ": Do not do file IO in analyzers"),
126
VerifyCS.
Diagnostic
("RS1036").WithSpan(6, 7, 6, 17).WithArguments("MyAnalyzer"),
294
VerifyCS.
Diagnostic
("RS1035").WithLocation(0).WithArguments("GeneratorInitializationContext", ": Non-incremental source generators should not be used, implement IIncrementalGenerator instead"),
296
VerifyCS.
Diagnostic
("RS1035").WithLocation(1).WithArguments("GeneratorExecutionContext", ": Non-incremental source generators should not be used, implement IIncrementalGenerator instead"),
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (19)
Microsoft.NetCore.Analyzers\Performance\DoNotUseCountWhenAnyCanBeUsedTests.Code.cs (1)
443
Test.Utilities.CSharpCodeFixVerifier<TAnalyzer, TCodeFix>.
Diagnostic
(this.DiagnosticId)
Microsoft.NetCore.Analyzers\Performance\PreferDictionaryTryAddOverGuardedAddTests.cs (3)
373
var diagnostic = VerifyCS.
Diagnostic
(PreferDictionaryTryMethodsOverContainsKeyGuardAnalyzer.PreferTryAddRuleId).WithLocation(0).WithLocation(1);
542
VerifyCS.
Diagnostic
(PreferDictionaryTryMethodsOverContainsKeyGuardAnalyzer.PreferTryAddRuleId).WithLocation(0).WithLocation(1),
543
VerifyCS.
Diagnostic
(PreferDictionaryTryMethodsOverContainsKeyGuardAnalyzer.PreferTryAddRuleId).WithLocation(2).WithLocation(3)
Microsoft.NetCore.Analyzers\Performance\UsePropertyInsteadOfCountMethodWhenAvailableTests.cs (11)
211
VerifyCS.
Diagnostic
(UseCountProperlyAnalyzer.CA1829)
241
VerifyCS.
Diagnostic
(UseCountProperlyAnalyzer.CA1829)
271
VerifyCS.
Diagnostic
(UseCountProperlyAnalyzer.CA1829)
304
VerifyCS.
Diagnostic
(UseCountProperlyAnalyzer.CA1829)
391
VerifyCS.
Diagnostic
(UseCountProperlyAnalyzer.CA1829)
439
VerifyCS.
Diagnostic
(UseCountProperlyAnalyzer.CA1829)
503
VerifyCS.
Diagnostic
(UseCountProperlyAnalyzer.CA1829)
538
VerifyCS.
Diagnostic
(UseCountProperlyAnalyzer.CA1829)
582
VerifyCS.
Diagnostic
(UseCountProperlyAnalyzer.CA1829)
632
VerifyCS.
Diagnostic
(UseCountProperlyAnalyzer.CA1829)
670
VerifyCS.
Diagnostic
(UseCountProperlyAnalyzer.CA1829)
Microsoft.NetCore.Analyzers\Usage\ProvideHttpClientHandlerMaxResponseHeaderLengthValueCorrectlyTests.cs (4)
68
VerifyCS.
Diagnostic
(ProvideHttpClientHandlerMaxResponseHeaderLengthValueCorrectly.RuleId).WithLocation(0).WithArguments(242426),
69
VerifyCS.
Diagnostic
(ProvideHttpClientHandlerMaxResponseHeaderLengthValueCorrectly.RuleId).WithLocation(1).WithArguments(242424),
70
VerifyCS.
Diagnostic
(ProvideHttpClientHandlerMaxResponseHeaderLengthValueCorrectly.RuleId).WithLocation(2).WithArguments(1414),
71
VerifyCS.
Diagnostic
(ProvideHttpClientHandlerMaxResponseHeaderLengthValueCorrectly.RuleId).WithLocation(3).WithArguments(1000)