249 references to ReportDiagnostic
ILLink.RoslynAnalyzer (1)
RequiresAnalyzerBase.cs (1)
100 syntaxNodeAnalysisContext.ReportDiagnostic (Diagnostic.Create (RequiresDiagnosticRule,
Microsoft.Analyzers.Extra (1)
AsyncMethodWithoutCancellation.cs (1)
111analysisContext.ReportDiagnostic(diagnostic);
Microsoft.Analyzers.Local (1)
InternalReferencedInPublicDocAnalyzer.cs (1)
155context.ReportDiagnostic(diagnostic);
Microsoft.AspNetCore.App.Analyzers (1)
WebApplicationBuilder\PublicPartialProgramClassAnalyzer.cs (1)
27context.ReportDiagnostic(Diagnostic.Create(
Microsoft.CodeAnalysis.CodeStyle (20)
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
146context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
145context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
82context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
103syntaxContext.ReportDiagnostic(diagnostic);
src\Analyzers\Core\Analyzers\RemoveUnnecessaryCast\AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
52context.ReportDiagnostic(diagnostic);
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
113context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
140=> context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
118context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
124context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
128context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
183context.ReportDiagnostic(DiagnosticHelper.Create( 253context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
158context.ReportDiagnostic(DiagnosticHelper.Create( 178context.ReportDiagnostic(DiagnosticHelper.Create( 191context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
140context.ReportDiagnostic(
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
187context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
94context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
127context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
361context.ReportDiagnostic(diagnostic);
Microsoft.CodeAnalysis.CSharp.CodeStyle (54)
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
110context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
38context.ReportDiagnostic(diagnostic);
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
42context.ReportDiagnostic(diagnostic);
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToProgramMainDiagnosticAnalyzer.cs (1)
55context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
75context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
69context.ReportDiagnostic(DiagnosticHelper.Create(Descriptor,
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
245context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (3)
183syntaxContext.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags( 193syntaxContext.ReportDiagnostic(DiagnosticHelper.Create( 204syntaxContext.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\CSharp\Analyzers\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticDiagnosticAnalyzer.cs (1)
51context.ReportDiagnostic(
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
53context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\MisplacedUsingDirectives\MisplacedUsingDirectivesDiagnosticAnalyzer.cs (1)
104context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
59context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
43context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
97context.ReportDiagnostic(Diagnostic.Create(
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
231context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\CSharp\Analyzers\SimplifyPropertyPattern\CSharpSimplifyPropertyPatternDiagnosticAnalyzer.cs (1)
65syntaxContext.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (3)
194context.ReportDiagnostic(DiagnosticHelper.Create( 209context.ReportDiagnostic(DiagnosticHelper.Create( 224context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (3)
54context.ReportDiagnostic(DiagnosticHelper.Create( 71context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags( 89context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (2)
59context.ReportDiagnostic(DiagnosticHelper.Create( 73context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyDiagnosticAnalyzer.cs (1)
55context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
111context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (4)
61context.ReportDiagnostic(DiagnosticHelper.Create( 74context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags( 101context.ReportDiagnostic(DiagnosticHelper.Create( 114context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
95context.ReportDiagnostic(DiagnosticHelper.Create( 168context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (2)
65context.ReportDiagnostic(DiagnosticHelper.Create( 80context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseDefaultLiteral\CSharpUseDefaultLiteralDiagnosticAnalyzer.cs (1)
50context.ReportDiagnostic(
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
66context.ReportDiagnostic(diagnostic);
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
58context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
64context.ReportDiagnostic(CreateDiagnostic(descriptor, declarationStatement, declaredType.StripRefIfNeeded().Span, typeStyle.Notification, context.Options));
src\Analyzers\CSharp\Analyzers\UseInferredMemberName\CSharpUseInferredMemberNameDiagnosticAnalyzer.cs (2)
56context.ReportDiagnostic( 82context.ReportDiagnostic(
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
64context.ReportDiagnostic(
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (3)
143syntaxContext.ReportDiagnostic(DiagnosticHelper.Create( 154syntaxContext.ReportDiagnostic(DiagnosticHelper.Create( 164syntaxContext.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
106context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
100context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
81context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
268syntaxContext.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
153syntaxContext.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
96context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
120context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
120syntaxContext.ReportDiagnostic(DiagnosticHelper.Create(
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
15759context.ReportDiagnostic(Diagnostic.Create(Hidden01, context.Node.GetLocation())); 15785context.ReportDiagnostic(Diagnostic.Create(Info01, context.Node.GetLocation()));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
326context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Node.GetLocation()));
Diagnostics\FixAllProvider\BatchFixerTests.cs (1)
55context.ReportDiagnostic(diagnostic);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (15)
Diagnostics\DiagnosticAnalyzerTests.cs (14)
58context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_CA9999_UseOfVariableThatStartsWithX, id.Location, id.Identifier.ValueText)); 255context.ReportDiagnostic(diag1); 260context.ReportDiagnostic(diag2); 265context.ReportDiagnostic(diag3); 669context.ReportDiagnostic(diagnostic); 799registerSyntaxNodeAction(context => { context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor2, Location.None)); }, 802registerSyntaxNodeAction(context => { context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Descriptor3, Location.None)); }, 821context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(descriptor, Location.None)); 1655nodeContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(ExpressionDescriptor, nodeContext.Node.GetLocation())); 2324ReportNodeDiagnostics(syntaxContext.Node, syntaxContext.ReportDiagnostic); 3850context => context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Rule, context.Node.GetLocation())), 3856context => context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(Rule, context.Node.GetLocation())), 4088context.ReportDiagnostic(diagnostic); 4136context.ReportDiagnostic(diagnostic);
Diagnostics\GetDiagnosticsTests.cs (1)
966context => analyzeNode(context.Node, context.ContainingSymbol, context.ReportDiagnostic),
Microsoft.CodeAnalysis.CSharp.Features (55)
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
110context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
38context.ReportDiagnostic(diagnostic);
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
42context.ReportDiagnostic(diagnostic);
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToProgramMainDiagnosticAnalyzer.cs (1)
55context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
75context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
69context.ReportDiagnostic(DiagnosticHelper.Create(Descriptor,
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
245context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (3)
183syntaxContext.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags( 193syntaxContext.ReportDiagnostic(DiagnosticHelper.Create( 204syntaxContext.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\CSharp\Analyzers\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticDiagnosticAnalyzer.cs (1)
51context.ReportDiagnostic(
src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
53context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\MisplacedUsingDirectives\MisplacedUsingDirectivesDiagnosticAnalyzer.cs (1)
104context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (1)
59context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
43context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryDiscardDesignation\CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
97context.ReportDiagnostic(Diagnostic.Create(
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
231context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\CSharp\Analyzers\SimplifyPropertyPattern\CSharpSimplifyPropertyPatternDiagnosticAnalyzer.cs (1)
65syntaxContext.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForArrayDiagnosticAnalyzer.cs (3)
194context.ReportDiagnostic(DiagnosticHelper.Create( 209context.ReportDiagnostic(DiagnosticHelper.Create( 224context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (3)
54context.ReportDiagnostic(DiagnosticHelper.Create( 71context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags( 89context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForCreateDiagnosticAnalyzer.cs (2)
59context.ReportDiagnostic(DiagnosticHelper.Create( 73context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForEmptyDiagnosticAnalyzer.cs (1)
55context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
111context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (4)
61context.ReportDiagnostic(DiagnosticHelper.Create( 74context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags( 101context.ReportDiagnostic(DiagnosticHelper.Create( 114context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\CSharp\Analyzers\UseCompoundAssignment\CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
95context.ReportDiagnostic(DiagnosticHelper.Create( 168context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (2)
65context.ReportDiagnostic(DiagnosticHelper.Create( 80context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseDefaultLiteral\CSharpUseDefaultLiteralDiagnosticAnalyzer.cs (1)
50context.ReportDiagnostic(
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
66context.ReportDiagnostic(diagnostic);
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
58context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
64context.ReportDiagnostic(CreateDiagnostic(descriptor, declarationStatement, declaredType.StripRefIfNeeded().Span, typeStyle.Notification, context.Options));
src\Analyzers\CSharp\Analyzers\UseInferredMemberName\CSharpUseInferredMemberNameDiagnosticAnalyzer.cs (2)
56context.ReportDiagnostic( 82context.ReportDiagnostic(
src\Analyzers\CSharp\Analyzers\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
64context.ReportDiagnostic(
src\Analyzers\CSharp\Analyzers\UseLocalFunction\CSharpUseLocalFunctionDiagnosticAnalyzer.cs (3)
143syntaxContext.ReportDiagnostic(DiagnosticHelper.Create( 154syntaxContext.ReportDiagnostic(DiagnosticHelper.Create( 164syntaxContext.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseNameofInNullableAttribute\CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
106context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
100context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
81context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
268syntaxContext.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
153syntaxContext.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
96context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseSimpleUsingStatement\UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
120context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\CSharp\Analyzers\UseTupleSwap\CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
120syntaxContext.ReportDiagnostic(DiagnosticHelper.Create(
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
99context.ReportDiagnostic(
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (21)
Diagnostics\Configuration\ConfigureSeverity\AllAnalyzersSeverityConfigurationTests.cs (1)
38c => c.ReportDiagnostic(Diagnostic.Create(Rule, c.Node.GetLocation())),
Diagnostics\Configuration\ConfigureSeverity\CategoryBasedSeverityConfigurationTests.cs (1)
38c => c.ReportDiagnostic(Diagnostic.Create(Rule, c.Node.GetLocation())),
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.cs (1)
38c => c.ReportDiagnostic(Diagnostic.Create(Rule, c.Node.GetLocation())),
Diagnostics\Suppression\RemoveSuppressionTests.cs (1)
50context.ReportDiagnostic(Diagnostic.Create(Decsciptor, location));
Diagnostics\Suppression\SuppressionTest_FixMultipleTests.cs (2)
52context.ReportDiagnostic(Diagnostic.Create(Decsciptor1, location)); 53context.ReportDiagnostic(Diagnostic.Create(Decsciptor2, location));
Diagnostics\Suppression\SuppressionTests.cs (15)
709context.ReportDiagnostic(Diagnostic.Create(Decsciptor, classDecl.Identifier.GetLocation())); 819context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())); 882context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())); 932context.ReportDiagnostic(Diagnostic.Create(Decsciptor, classDecl.GetLocation())); 1076context.ReportDiagnostic(Diagnostic.Create(Descriptor, classDecl.Identifier.GetLocation())); 1081context.ReportDiagnostic(Diagnostic.Create(Descriptor, ns.Name.GetLocation())); 1086context.ReportDiagnostic(Diagnostic.Create(Descriptor, method.Identifier.GetLocation())); 1091context.ReportDiagnostic(Diagnostic.Create(Descriptor, property.Identifier.GetLocation())); 1096context.ReportDiagnostic(Diagnostic.Create(Descriptor, field.Declaration.Variables.First().Identifier.GetLocation())); 1101context.ReportDiagnostic(Diagnostic.Create(Descriptor, e.Identifier.GetLocation())); 1108context.ReportDiagnostic(Diagnostic.Create(Descriptor, trivia.GetLocation())); 2070context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())); 2075context.ReportDiagnostic(Diagnostic.Create(_descriptor, ns.Name.GetLocation())); 2080context.ReportDiagnostic(Diagnostic.Create(_descriptor, method.Identifier.GetLocation())); 2461=> context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\Source\NullablePublicAPITests.cs (2)
1171syntaxContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_descriptor1, syntaxContext.Node.GetLocation(), syntaxContext.Node, info.Nullability.FlowState, info.Nullability.Annotation, specInfo.Nullability.FlowState)); 1179context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_descriptor2, declarator.GetLocation(), declaredSymbol.Name, declaredSymbol.NullableAnnotation));
Microsoft.CodeAnalysis.Features (23)
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (1)
81context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptor, typeName.GetLocation(), typeName.ToString()));
PreferFrameworkType\PreferFrameworkTypeDiagnosticAnalyzerBase.cs (1)
102context.ReportDiagnostic(DiagnosticHelper.Create(
SimplifyThisOrMe\AbstractSimplifyThisOrMeDiagnosticAnalyzer.cs (1)
75context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
146context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\ForEachCast\AbstractForEachCastDiagnosticAnalyzer.cs (1)
145context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
82context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
103syntaxContext.ReportDiagnostic(diagnostic);
src\Analyzers\Core\Analyzers\RemoveUnnecessaryCast\AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
52context.ReportDiagnostic(diagnostic);
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
113context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\Core\Analyzers\SimplifyBooleanExpression\AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
140=> context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
118context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
124context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
128context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
183context.ReportDiagnostic(DiagnosticHelper.Create( 253context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
158context.ReportDiagnostic(DiagnosticHelper.Create( 178context.ReportDiagnostic(DiagnosticHelper.Create( 191context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
140context.ReportDiagnostic(
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
187context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
94context.ReportDiagnostic(DiagnosticHelper.Create(
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
127context.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
361context.ReportDiagnostic(diagnostic);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Diagnostics\PullDiagnosticTests.cs (1)
151context.ReportDiagnostic(Diagnostic.Create(_descriptor, context.Node.GetLocation())),
Microsoft.CodeAnalysis.Test.Utilities (13)
Diagnostics\CommonDiagnosticAnalyzers.cs (8)
658syntaxNodeContext.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptor, syntaxNodeContext.Node.GetLocation())); 688context.ReportDiagnostic(Diagnostic.Create(Rule, context.Node.GetLocation())); 728context.ReportDiagnostic(Diagnostic.Create(Rule, context.Node.GetLocation())); 2762ReportDiagnostics($"RegisterSyntaxNodeAction({syntaxNodeContext.Node}) in RegisterSymbolStartAction", syntaxNodeContext.Node.SyntaxTree, syntaxNodeContext.ContainingSymbol, syntaxNodeContext.ReportDiagnostic), 2795ReportDiagnostics($"RegisterSyntaxNodeAction({syntaxNodeContext.Node})", syntaxNodeContext.Node.SyntaxTree, syntaxNodeContext.ContainingSymbol, syntaxNodeContext.ReportDiagnostic), 2808ReportDiagnostics($"RegisterSyntaxNodeAction({syntaxNodeContext.Node}) in RegisterCodeBlockStartAction", syntaxNodeContext.Node.SyntaxTree, syntaxNodeContext.ContainingSymbol, syntaxNodeContext.ReportDiagnostic), 2882context => context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Node.GetLocation())), 2937context.RegisterSyntaxNodeAction(context => HandleCallback(context.Node.GetLocation(), context.Compilation, context.ReportDiagnostic, context.CancellationToken), CodeAnalysis.CSharp.SyntaxKind.ClassDeclaration);
Diagnostics\OperationTestAnalyzer.cs (3)
2023syntaxContext.ReportDiagnostic(Diagnostic.Create(AssignmentSyntaxDescriptor, syntaxContext.Node.GetLocation())); 2143syntaxContext.ReportDiagnostic(Diagnostic.Create(GetOperationDescriptor, node.GetLocation())); 2155syntaxContext.ReportDiagnostic(Diagnostic.Create(GetOperationDescriptor, node.GetLocation()));
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (2)
160context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, context.Node.GetLocation(), messageArgs: context.Node.ToFullString())); 179context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, context.Node.GetLocation(), messageArgs: context.Node.ToFullString()));
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (3)
CommandLineTests.vb (3)
10916context.ReportDiagnostic(Diagnostic.Create(Hidden01, context.Node.GetLocation())) 10941context.ReportDiagnostic(Diagnostic.Create(Info01, context.Node.GetLocation())) 11015context.ReportDiagnostic(Diagnostic.Create(Error01, context.Node.GetLocation()))
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (17)
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.vb (1)
35Sub(c) c.ReportDiagnostic(Diagnostic.Create(Rule, c.Node.GetLocation())),
Diagnostics\Suppression\SuppressionTests.vb (16)
711context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 786context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 830context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 896context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 1018context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 1023context.ReportDiagnostic(Diagnostic.Create(_descriptor, ns.Name.GetLocation())) 1028context.ReportDiagnostic(Diagnostic.Create(_descriptor, method.Identifier.GetLocation())) 1033context.ReportDiagnostic(Diagnostic.Create(_descriptor, p.Identifier.GetLocation())) 1038context.ReportDiagnostic(Diagnostic.Create(_descriptor, f.Declarators.First().Names.First.GetLocation())) 1043context.ReportDiagnostic(Diagnostic.Create(_descriptor, e.Identifier.GetLocation())) 1734context.ReportDiagnostic(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation())) 1739context.ReportDiagnostic(Diagnostic.Create(_descriptor, ns.Name.GetLocation())) 1744context.ReportDiagnostic(Diagnostic.Create(_descriptor, method.Identifier.GetLocation())) 1749context.ReportDiagnostic(Diagnostic.Create(_descriptor, p.Identifier.GetLocation())) 1754context.ReportDiagnostic(Diagnostic.Create(_descriptor, f.Declarators.First().Names.First.GetLocation())) 1759context.ReportDiagnostic(Diagnostic.Create(_descriptor, e.Identifier.GetLocation()))
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
BatchFixAllProviderTests.cs (1)
74context.ReportDiagnostic(Diagnostic.Create(Descriptor, node.Token.GetLocation()));
Microsoft.DotNet.CodeAnalysis (5)
Analyzers\AppContextDefaultsAnalyzer.cs (4)
76context.ReportDiagnostic(Diagnostic.Create(s_appContextDefaultNotInitializedToTrueDiagnostic, args.GetLocation(), call)); 83context.ReportDiagnostic(Diagnostic.Create(s_appContextDefaultValueDefinedOutsideIfConditionDiagnostic, args.GetLocation(), call)); 91context.ReportDiagnostic(Diagnostic.Create(s_appContextDefaultValueDefinedOutsideIfConditionDiagnostic, args.GetLocation(), call)); 98context.ReportDiagnostic(Diagnostic.Create(s_appContextDefaultUsedUnexpectedIfStatementDiagnostic, containingIfStatement.GetLocation()));
Analyzers\ResourceUsageAnalyzer.cs (1)
53context.ReportDiagnostic(Diagnostic.Create(InvalidSRFormatCall, invokeExpr.GetLocation(), invokeExpr.GetText()));
Microsoft.ML.InternalCodeAnalyzer (9)
ContractsCheckAnalyzer.cs (4)
211context.ReportDiagnostic(Diagnostic.Create( 231context.ReportDiagnostic(Diagnostic.Create( 238context.ReportDiagnostic(Diagnostic.Create( 243context.ReportDiagnostic(Diagnostic.Create(
NameAnalyzer.cs (2)
137context.ReportDiagnostic(CreateDiagnostic(GeneralName.Rule, token, NameType.PascalCased)); 173context.ReportDiagnostic(CreateDiagnostic(PrivateFieldName.Rule, identifier,
ParameterVariableNameAnalyzer.cs (1)
59context.ReportDiagnostic(NameAnalyzer.CreateDiagnostic(Rule, identifier, NameType.CamelCased, type));
SingleVariableDeclarationAnalyzer.cs (1)
48context.ReportDiagnostic(diagnostic);
TypeParamNameAnalyzer.cs (1)
46context.ReportDiagnostic(NameAnalyzer.CreateDiagnostic(Rule, identifier, NameType.TPascalCased));
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.cs (1)
73context.ReportDiagnostic(diagnostic);
System.Windows.Forms.Analyzers.VisualBasic (1)
Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.vb (1)
86context.ReportDiagnostic(diagnostic)