224 references to ReportDiagnostic
Microsoft.CodeAnalysis.CodeStyle (22)
AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
146
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractForEachCastDiagnosticAnalyzer.cs (1)
129
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
82
context.
ReportDiagnostic
(Diagnostic.Create(
AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
49
context.
ReportDiagnostic
(diagnostic);
AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
115
context.
ReportDiagnostic
(DiagnosticHelper.CreateWithLocationTags(
AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
140
=> context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
118
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
131
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
128
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
123
context.
ReportDiagnostic
(DiagnosticHelper.Create(
156
context.
ReportDiagnostic
(DiagnosticHelper.CreateWithLocationTags(
AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
147
context.
ReportDiagnostic
(DiagnosticHelper.Create(
158
context.
ReportDiagnostic
(DiagnosticHelper.Create(
169
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
141
context.
ReportDiagnostic
(
AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
187
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
94
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseObjectInitializerDiagnosticAnalyzer.cs (3)
110
context.
ReportDiagnostic
(DiagnosticHelper.Create(
140
context.
ReportDiagnostic
(DiagnosticHelper.CreateWithLocationTags(
150
context.
ReportDiagnostic
(Diagnostic.Create(
AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
361
context.
ReportDiagnostic
(diagnostic);
NamingStyleDiagnosticAnalyzerBase.cs (1)
96
syntaxContext.
ReportDiagnostic
(diagnostic);
Microsoft.CodeAnalysis.CSharp.CodeStyle (40)
ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
69
context.
ReportDiagnostic
(DiagnosticHelper.Create(Descriptor,
ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
38
context.
ReportDiagnostic
(diagnostic);
ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
42
context.
ReportDiagnostic
(diagnostic);
ConvertToProgramMainDiagnosticAnalyzer.cs (1)
52
context.
ReportDiagnostic
(DiagnosticHelper.Create(
ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
73
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpAddBracesDiagnosticAnalyzer.cs (1)
109
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
82
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
259
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
235
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
143
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
43
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (1)
25
compilationAnalyzer.AnalyzeAssemblyOrModuleAttribute(attribute, context.SemanticModel, context.
ReportDiagnostic
, context.CancellationToken);
CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
94
context.
ReportDiagnostic
(Diagnostic.Create(
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
208
context.
ReportDiagnostic
(DiagnosticHelper.CreateWithLocationTags(
CSharpSimplifyPropertyPatternDiagnosticAnalyzer.cs (1)
66
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
73
context.
ReportDiagnostic
(CreateDiagnostic(descriptor, declarationStatement, declaredType.StripRefIfNeeded().Span, typeStyle.Severity));
CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
95
context.
ReportDiagnostic
(DiagnosticHelper.Create(
176
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUseDeconstructionDiagnosticAnalyzer.cs (2)
65
context.
ReportDiagnostic
(DiagnosticHelper.Create(
79
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUseDefaultLiteralDiagnosticAnalyzer.cs (1)
48
context.
ReportDiagnostic
(
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
130
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUseInferredMemberNameDiagnosticAnalyzer.cs (2)
55
context.
ReportDiagnostic
(
80
context.
ReportDiagnostic
(
CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
65
context.
ReportDiagnostic
(
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (3)
135
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
145
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
155
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
103
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
84
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
99
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
122
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
InvokeDelegateWithConditionalAccessAnalyzer.cs (3)
184
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.CreateWithLocationTags(
193
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
203
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.CreateWithLocationTags(
MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
53
context.
ReportDiagnostic
(DiagnosticHelper.Create(
MisplacedUsingDirectivesDiagnosticAnalyzer.cs (1)
99
context.
ReportDiagnostic
(DiagnosticHelper.Create(
UseExpressionBodyDiagnosticAnalyzer.cs (1)
80
context.
ReportDiagnostic
(diagnostic);
UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
63
context.
ReportDiagnostic
(diagnostic);
UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
120
context.
ReportDiagnostic
(DiagnosticHelper.Create(
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (3)
CommandLineTests.cs (3)
14615
context.
ReportDiagnostic
(Diagnostic.Create(Hidden01, context.Node.GetLocation()));
14641
context.
ReportDiagnostic
(Diagnostic.Create(Info01, context.Node.GetLocation()));
14696
nodeContext.
ReportDiagnostic
(Diagnostic.Create(Error01, nodeContext.Node.GetLocation()));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (23)
Diagnostics\Configuration\ConfigureSeverity\AllAnalyzersSeverityConfigurationTests.cs (1)
39
c => c.
ReportDiagnostic
(Diagnostic.Create(Rule, c.Node.GetLocation())),
Diagnostics\Configuration\ConfigureSeverity\CategoryBasedSeverityConfigurationTests.cs (1)
39
c => c.
ReportDiagnostic
(Diagnostic.Create(Rule, c.Node.GetLocation())),
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.cs (1)
39
c => c.
ReportDiagnostic
(Diagnostic.Create(Rule, c.Node.GetLocation())),
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
327
context.
ReportDiagnostic
(Diagnostic.Create(Descriptor, context.Node.GetLocation()));
Diagnostics\FixAllProvider\BatchFixerTests.cs (1)
55
context.
ReportDiagnostic
(diagnostic);
Diagnostics\Suppression\RemoveSuppressionTests.cs (1)
50
context.
ReportDiagnostic
(Diagnostic.Create(Decsciptor, location));
Diagnostics\Suppression\SuppressionTest_FixMultipleTests.cs (2)
52
context.
ReportDiagnostic
(Diagnostic.Create(Decsciptor1, location));
53
context.
ReportDiagnostic
(Diagnostic.Create(Decsciptor2, location));
Diagnostics\Suppression\SuppressionTests.cs (15)
712
context.
ReportDiagnostic
(Diagnostic.Create(Decsciptor, classDecl.Identifier.GetLocation()));
822
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation()));
885
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation()));
935
context.
ReportDiagnostic
(Diagnostic.Create(Decsciptor, classDecl.GetLocation()));
1079
context.
ReportDiagnostic
(Diagnostic.Create(Descriptor, classDecl.Identifier.GetLocation()));
1084
context.
ReportDiagnostic
(Diagnostic.Create(Descriptor, ns.Name.GetLocation()));
1089
context.
ReportDiagnostic
(Diagnostic.Create(Descriptor, method.Identifier.GetLocation()));
1094
context.
ReportDiagnostic
(Diagnostic.Create(Descriptor, property.Identifier.GetLocation()));
1099
context.
ReportDiagnostic
(Diagnostic.Create(Descriptor, field.Declaration.Variables.First().Identifier.GetLocation()));
1104
context.
ReportDiagnostic
(Diagnostic.Create(Descriptor, e.Identifier.GetLocation()));
1111
context.
ReportDiagnostic
(Diagnostic.Create(Descriptor, trivia.GetLocation()));
2073
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation()));
2078
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, ns.Name.GetLocation()));
2083
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, method.Identifier.GetLocation()));
2464
=> context.
ReportDiagnostic
(Diagnostic.Create(Descriptor, Location.None));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (14)
Diagnostics\DiagnosticAnalyzerTests.cs (13)
57
context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(s_CA9999_UseOfVariableThatStartsWithX, id.Location, id.Identifier.ValueText));
254
context.
ReportDiagnostic
(diag1);
259
context.
ReportDiagnostic
(diag2);
264
context.
ReportDiagnostic
(diag3);
668
context.
ReportDiagnostic
(diagnostic);
798
registerSyntaxNodeAction(context => { context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(Descriptor2, Location.None)); },
801
registerSyntaxNodeAction(context => { context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(Descriptor3, Location.None)); },
820
context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(descriptor, Location.None));
1654
nodeContext.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(ExpressionDescriptor, nodeContext.Node.GetLocation()));
2323
ReportNodeDiagnostics(syntaxContext.Node, syntaxContext.
ReportDiagnostic
);
3758
context => context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(Rule, context.Node.GetLocation())),
3764
context => context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(Rule, context.Node.GetLocation())),
3996
context.
ReportDiagnostic
(diagnostic);
Diagnostics\GetDiagnosticsTests.cs (1)
905
context => analyzeNode(context.Node, context.ContainingSymbol, context.
ReportDiagnostic
),
Microsoft.CodeAnalysis.CSharp.Features (41)
ConvertSwitchStatementToExpressionDiagnosticAnalyzer.cs (1)
69
context.
ReportDiagnostic
(DiagnosticHelper.Create(Descriptor,
ConvertToBlockScopedNamespaceDiagnosticAnalyzer.cs (1)
38
context.
ReportDiagnostic
(diagnostic);
ConvertToFileScopedNamespaceDiagnosticAnalyzer.cs (1)
42
context.
ReportDiagnostic
(diagnostic);
ConvertToProgramMainDiagnosticAnalyzer.cs (1)
52
context.
ReportDiagnostic
(DiagnosticHelper.Create(
ConvertToTopLevelStatementsDiagnosticAnalyzer.cs (1)
73
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpAddBracesDiagnosticAnalyzer.cs (1)
109
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpAsAndMemberAccessDiagnosticAnalyzer.cs (1)
82
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (1)
259
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
235
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpIsAndCastCheckDiagnosticAnalyzer.cs (1)
143
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
43
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (1)
25
compilationAnalyzer.AnalyzeAssemblyOrModuleAttribute(attribute, context.SemanticModel, context.
ReportDiagnostic
, context.CancellationToken);
CSharpRemoveUnnecessaryDiscardDesignationDiagnosticAnalyzer.cs (1)
94
context.
ReportDiagnostic
(Diagnostic.Create(
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
208
context.
ReportDiagnostic
(DiagnosticHelper.CreateWithLocationTags(
CSharpSimplifyPropertyPatternDiagnosticAnalyzer.cs (1)
66
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
73
context.
ReportDiagnostic
(CreateDiagnostic(descriptor, declarationStatement, declaredType.StripRefIfNeeded().Span, typeStyle.Severity));
CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (2)
95
context.
ReportDiagnostic
(DiagnosticHelper.Create(
176
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUseDeconstructionDiagnosticAnalyzer.cs (2)
65
context.
ReportDiagnostic
(DiagnosticHelper.Create(
79
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUseDefaultLiteralDiagnosticAnalyzer.cs (1)
48
context.
ReportDiagnostic
(
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
130
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUseInferredMemberNameDiagnosticAnalyzer.cs (2)
55
context.
ReportDiagnostic
(
80
context.
ReportDiagnostic
(
CSharpUseIsNullCheckForCastAndEqualityOperatorDiagnosticAnalyzer.cs (1)
65
context.
ReportDiagnostic
(
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (3)
135
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
145
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
155
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUseNameofInNullableAttributeDiagnosticAnalyzer.cs (1)
103
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
84
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
99
context.
ReportDiagnostic
(DiagnosticHelper.Create(
CSharpUseTupleSwapDiagnosticAnalyzer.cs (1)
122
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
InvokeDelegateWithConditionalAccessAnalyzer.cs (3)
184
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.CreateWithLocationTags(
193
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
203
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.CreateWithLocationTags(
MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
53
context.
ReportDiagnostic
(DiagnosticHelper.Create(
MisplacedUsingDirectivesDiagnosticAnalyzer.cs (1)
99
context.
ReportDiagnostic
(DiagnosticHelper.Create(
UseExpressionBodyDiagnosticAnalyzer.cs (1)
80
context.
ReportDiagnostic
(diagnostic);
UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
63
context.
ReportDiagnostic
(diagnostic);
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
100
context.
ReportDiagnostic
(
UseSimpleUsingStatementDiagnosticAnalyzer.cs (1)
120
context.
ReportDiagnostic
(DiagnosticHelper.Create(
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\Source\NullablePublicAPITests.cs (2)
1169
syntaxContext.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(s_descriptor1, syntaxContext.Node.GetLocation(), syntaxContext.Node, info.Nullability.FlowState, info.Nullability.Annotation, specInfo.Nullability.FlowState));
1177
context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(s_descriptor2, declarator.GetLocation(), declaredSymbol.Name, declaredSymbol.NullableAnnotation));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (4)
Diagnostics\DiagnosticServiceTests.vb (4)
1413
context.
ReportDiagnostic
(Diagnostic.Create(Descriptor1, fieldDecl.GetLocation, fieldDecl.ToString()))
1871
context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(Descriptor2, context.Node.GetLocation()))
1875
context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(Descriptor3, context.Node.GetLocation()))
1894
context.
ReportDiagnostic
(Diagnostic.Create(descriptor, context.Node.GetLocation))
Microsoft.CodeAnalysis.Features (25)
AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
146
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractForEachCastDiagnosticAnalyzer.cs (1)
129
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
82
context.
ReportDiagnostic
(Diagnostic.Create(
AbstractRemoveUnnecessaryCastDiagnosticAnalyzer.cs (1)
49
context.
ReportDiagnostic
(diagnostic);
AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
115
context.
ReportDiagnostic
(DiagnosticHelper.CreateWithLocationTags(
AbstractSimplifyConditionalDiagnosticAnalyzer.cs (1)
140
=> context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (1)
118
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
131
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
128
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
123
context.
ReportDiagnostic
(DiagnosticHelper.Create(
156
context.
ReportDiagnostic
(DiagnosticHelper.CreateWithLocationTags(
AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (3)
147
context.
ReportDiagnostic
(DiagnosticHelper.Create(
158
context.
ReportDiagnostic
(DiagnosticHelper.Create(
169
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
141
context.
ReportDiagnostic
(
AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
187
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (1)
94
context.
ReportDiagnostic
(DiagnosticHelper.Create(
AbstractUseObjectInitializerDiagnosticAnalyzer.cs (3)
110
context.
ReportDiagnostic
(DiagnosticHelper.Create(
140
context.
ReportDiagnostic
(DiagnosticHelper.CreateWithLocationTags(
150
context.
ReportDiagnostic
(Diagnostic.Create(
AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
361
context.
ReportDiagnostic
(diagnostic);
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (1)
86
context.
ReportDiagnostic
(Diagnostic.Create(DiagnosticDescriptor, typeName.GetLocation(), typeName.ToString()));
NamingStyleDiagnosticAnalyzerBase.cs (1)
96
syntaxContext.
ReportDiagnostic
(diagnostic);
PreferFrameworkType\PreferFrameworkTypeDiagnosticAnalyzerBase.cs (1)
103
context.
ReportDiagnostic
(DiagnosticHelper.Create(
SimplifyThisOrMe\AbstractSimplifyThisOrMeDiagnosticAnalyzer.cs (1)
75
context.
ReportDiagnostic
(DiagnosticHelper.Create(
Microsoft.CodeAnalysis.Test.Utilities (10)
Diagnostics\CommonDiagnosticAnalyzers.cs (5)
572
syntaxNodeContext.
ReportDiagnostic
(Diagnostic.Create(DiagnosticDescriptor, syntaxNodeContext.Node.GetLocation()));
602
context.
ReportDiagnostic
(Diagnostic.Create(Rule, context.Node.GetLocation()));
642
context.
ReportDiagnostic
(Diagnostic.Create(Rule, context.Node.GetLocation()));
2556
context => context.
ReportDiagnostic
(Diagnostic.Create(Descriptor, context.Node.GetLocation())),
2611
context.RegisterSyntaxNodeAction(context => HandleCallback(context.Node.GetLocation(), context.Compilation, context.
ReportDiagnostic
, context.CancellationToken), CodeAnalysis.CSharp.SyntaxKind.ClassDeclaration);
Diagnostics\OperationTestAnalyzer.cs (3)
2023
syntaxContext.
ReportDiagnostic
(Diagnostic.Create(AssignmentSyntaxDescriptor, syntaxContext.Node.GetLocation()));
2143
syntaxContext.
ReportDiagnostic
(Diagnostic.Create(GetOperationDescriptor, node.GetLocation()));
2155
syntaxContext.
ReportDiagnostic
(Diagnostic.Create(GetOperationDescriptor, node.GetLocation()));
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (2)
160
context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(s_rule, context.Node.GetLocation(), messageArgs: context.Node.ToFullString()));
179
context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(s_rule, context.Node.GetLocation(), messageArgs: context.Node.ToFullString()));
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (6)
VisualBasicRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.vb (1)
21
compilationAnalyzer.AnalyzeAssemblyOrModuleAttribute(attribute, syntaxContext.SemanticModel, AddressOf syntaxContext.
ReportDiagnostic
, syntaxContext.CancellationToken)
VisualBasicRemoveUnnecessaryByValDiagnosticAnalyzer.vb (1)
29
syntaxContext.
ReportDiagnostic
(Diagnostic.Create(Descriptor, modifier.GetLocation(), additionalLocations:={parameterSyntax.GetLocation()}))
VisualBasicSimplifyObjectCreationDiagnosticAnalyzer.vb (1)
57
context.
ReportDiagnostic
(DiagnosticHelper.Create(Descriptor, variableDeclarator.GetLocation(), styleOption.Notification.Severity,
VisualBasicUseInferredMemberNameDiagnosticAnalyzer.vb (2)
53
context.
ReportDiagnostic
(
76
context.
ReportDiagnostic
(
VisualBasicUseIsNotDiagnosticAnalyzer.vb (1)
71
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (3)
CommandLineTests.vb (3)
10628
context.
ReportDiagnostic
(Diagnostic.Create(Hidden01, context.Node.GetLocation()))
10653
context.
ReportDiagnostic
(Diagnostic.Create(Info01, context.Node.GetLocation()))
10704
context.
ReportDiagnostic
(Diagnostic.Create(Error01, context.Node.GetLocation()))
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (17)
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.vb (1)
35
Sub(c) c.
ReportDiagnostic
(Diagnostic.Create(Rule, c.Node.GetLocation())),
Diagnostics\Suppression\SuppressionTests.vb (16)
711
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation()))
784
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation()))
828
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation()))
892
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation()))
1012
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation()))
1017
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, ns.Name.GetLocation()))
1022
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, method.Identifier.GetLocation()))
1027
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, p.Identifier.GetLocation()))
1032
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, f.Declarators.First().Names.First.GetLocation()))
1037
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, e.Identifier.GetLocation()))
1728
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, classDecl.Identifier.GetLocation()))
1733
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, ns.Name.GetLocation()))
1738
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, method.Identifier.GetLocation()))
1743
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, p.Identifier.GetLocation()))
1748
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, f.Declarators.First().Names.First.GetLocation()))
1753
context.
ReportDiagnostic
(Diagnostic.Create(_descriptor, e.Identifier.GetLocation()))
Microsoft.CodeAnalysis.VisualBasic.Features (6)
VisualBasicRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.vb (1)
21
compilationAnalyzer.AnalyzeAssemblyOrModuleAttribute(attribute, syntaxContext.SemanticModel, AddressOf syntaxContext.
ReportDiagnostic
, syntaxContext.CancellationToken)
VisualBasicRemoveUnnecessaryByValDiagnosticAnalyzer.vb (1)
29
syntaxContext.
ReportDiagnostic
(Diagnostic.Create(Descriptor, modifier.GetLocation(), additionalLocations:={parameterSyntax.GetLocation()}))
VisualBasicSimplifyObjectCreationDiagnosticAnalyzer.vb (1)
57
context.
ReportDiagnostic
(DiagnosticHelper.Create(Descriptor, variableDeclarator.GetLocation(), styleOption.Notification.Severity,
VisualBasicUseInferredMemberNameDiagnosticAnalyzer.vb (2)
53
context.
ReportDiagnostic
(
76
context.
ReportDiagnostic
(
VisualBasicUseIsNotDiagnosticAnalyzer.vb (1)
71
syntaxContext.
ReportDiagnostic
(DiagnosticHelper.Create(
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (6)
Diagnostics\DiagnosticAnalyzerTests.vb (5)
42
context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(s_CA9999_UseOfVariableThatStartsWithX, id.GetLocation, id.Identifier.ValueText))
279
context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(desc1, context.Node.GetLocation))
368
context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(desc1, location))
576
context.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(desc1, sourceLoc))
962
nodeContext.
ReportDiagnostic
(CodeAnalysis.Diagnostic.Create(ExpressionDescriptor, nodeContext.Node.GetLocation()))
Diagnostics\GetDiagnosticsTests.vb (1)
628
AnalyzeNode(context.Node, context.ContainingSymbol, AddressOf context.
ReportDiagnostic
)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Parser\ParseDirectives.vb (1)
3174
context.
ReportDiagnostic
(_reporter(context.Node, _descriptor))
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
BatchFixAllProviderTests.cs (1)
74
context.
ReportDiagnostic
(Diagnostic.Create(Descriptor, node.Token.GetLocation()));