29 references to ReportDiagnostic
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
51ReportDiagnostics(diagnostics, context.ReportDiagnostic, location => !IsSourceLocation(location), s_declaration);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Diagnostics\DiagnosticAnalyzerTests.cs (2)
894compilationContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(UnsupportedDescriptor, Location.None)); 2336endContext.ReportDiagnostic(diagnostic);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
1255context.RegisterCompilationAction(c => c.ReportDiagnostic(Diagnostic.Create(s_compilationRule, c.Compilation.SyntaxTrees.First().GetRoot().GetLocation()))); 1271context.RegisterCompilationAction(c => c.ReportDiagnostic(Diagnostic.Create(s_compilationRule, c.Compilation.SyntaxTrees.First().GetRoot().GetLocation())));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
Diagnostics\DiagnosticServiceTests.vb (3)
1783context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None)) 1784context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Compilation.SyntaxTrees(0).GetRoot().GetLocation)) 1822context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None, _symbolNames.Count))
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (1)
92=> context.ReportDiagnostic(Diagnostic.Create(_descriptor, location: null, "args"));
Microsoft.CodeAnalysis.Test.Utilities (19)
Diagnostics\CommonDiagnosticAnalyzers.cs (16)
76context.ReportDiagnostic(Diagnostic.Create(Descriptor2, Location.None, s_properties))); 478compilationContext.ReportDiagnostic(Diagnostic.Create(EnabledRule, Location.None)); 481compilationContext.ReportDiagnostic(Diagnostic.Create(DisabledRule, Location.None)); 739compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 770compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 791compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 880cc.RegisterCompilationEndAction(c => ReportDiagnostic(c.ReportDiagnostic, ActionKind.CompilationEnd)); 890context.RegisterCompilationAction(cc => ReportDiagnostic(cc.ReportDiagnostic, ActionKind.Compilation)); 995context.ReportDiagnostic(Diagnostic.Create(Descriptor, tree.GetRoot().GetLocation())); 1544endContext.ReportDiagnostic(diagnostic); 1597compilationEndContext.ReportDiagnostic(diagnostic); 1729endContext.ReportDiagnostic(diagnostic); 1924compilationEndContext.ReportDiagnostic(Diagnostic.Create(SymbolStartedEndedDifferRule, Location.None, symbolsStartedStr, symbolsEndedStr, _analyzerId)); 1929compilationEndContext.ReportDiagnostic(diagnostic); 2308compilationEndContext => compilationEndContext.ReportDiagnostic( 2340compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None)));
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (1)
300context.ReportDiagnostic(Diagnostic.Create(descriptor, field.Locations.FirstOrDefault(), field, moreSpecificType));
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (1)
144context.ReportDiagnostic(Diagnostic.Create(descriptor, field.Locations.FirstOrDefault()));
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (1)
43context.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(s_rule, Location.None, messageArgs: Id));
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
10755context.ReportDiagnostic(diag)