42 references to ReportDiagnostic
Microsoft.Analyzers.Local (11)
ApiLifecycle\ApiLifecycleAnalyzer.cs (11)
76context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.NewSymbolsMustBeMarkedExperimental, symbol.Locations.FirstOrDefault(), symbol)); 84context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeDeleted, null, type.ModifiersAndName)); 89context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeDeleted, null, method.Member)); 94context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeDeleted, null, prop.Member)); 99context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeDeleted, null, field.Member)); 113context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.ExperimentalSymbolsCantBeMarkedObsolete, symbol.Locations.FirstOrDefault(), symbol)); 120context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeMarkedExperimental, symbol.Locations.FirstOrDefault(), symbol)); 127context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantChange, symbol.Locations.FirstOrDefault(), symbol)); 135context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantChange, symbol.Locations.FirstOrDefault(), symbol)); 156context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.NewSymbolsMustBeMarkedExperimental, type.Locations.FirstOrDefault(), type)); 160context.ReportDiagnostic(Diagnostic.Create(DiagDescriptors.ExperimentalSymbolsCantBeMarkedObsolete, type.Locations.FirstOrDefault(), type));
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
51ReportDiagnostics(diagnostics, context.ReportDiagnostic, location => !IsSourceLocation(location), s_declaration);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
139context.ReportDiagnostic(Diagnostic.Create(s_enableGenerateDocumentationFileIdDescriptor, Location.None));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Diagnostics\DiagnosticAnalyzerTests.cs (2)
895compilationContext.ReportDiagnostic(CodeAnalysis.Diagnostic.Create(UnsupportedDescriptor, Location.None)); 2337endContext.ReportDiagnostic(diagnostic);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
925context.RegisterCompilationAction(c => c.ReportDiagnostic(Diagnostic.Create(s_compilationRule, c.Compilation.SyntaxTrees.First().GetRoot().GetLocation()))); 941context.RegisterCompilationAction(c => c.ReportDiagnostic(Diagnostic.Create(s_compilationRule, c.Compilation.SyntaxTrees.First().GetRoot().GetLocation())));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\DiagnosticServiceTests.vb (1)
1750context.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))
Microsoft.CodeAnalysis.Features (1)
src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
139context.ReportDiagnostic(Diagnostic.Create(s_enableGenerateDocumentationFileIdDescriptor, Location.None));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Diagnostics\NonLocalDiagnosticTests.cs (1)
106context.ReportDiagnostic(diagnostic);
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (1)
86=> context.ReportDiagnostic(Diagnostic.Create(_descriptor, location: null, "args"));
Microsoft.CodeAnalysis.Test.Utilities (19)
Diagnostics\CommonDiagnosticAnalyzers.cs (16)
77context.ReportDiagnostic(Diagnostic.Create(Descriptor2, Location.None, s_properties))); 564compilationContext.ReportDiagnostic(Diagnostic.Create(EnabledRule, Location.None)); 567compilationContext.ReportDiagnostic(Diagnostic.Create(DisabledRule, Location.None)); 825compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 856compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 877compilationContext.ReportDiagnostic(Diagnostic.Create(Descriptor, Location.None))); 966cc.RegisterCompilationEndAction(c => ReportDiagnostic(c.ReportDiagnostic, ActionKind.CompilationEnd)); 976context.RegisterCompilationAction(cc => ReportDiagnostic(cc.ReportDiagnostic, ActionKind.Compilation)); 1081context.ReportDiagnostic(Diagnostic.Create(Descriptor, tree.GetRoot().GetLocation())); 1654endContext.ReportDiagnostic(diagnostic); 1707compilationEndContext.ReportDiagnostic(diagnostic); 1839endContext.ReportDiagnostic(diagnostic); 2034compilationEndContext.ReportDiagnostic(Diagnostic.Create(SymbolStartedEndedDifferRule, Location.None, symbolsStartedStr, symbolsEndedStr, _analyzerId)); 2039compilationEndContext.ReportDiagnostic(diagnostic); 2454compilationEndContext => compilationEndContext.ReportDiagnostic( 2486compilationContext.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)
11059context.ReportDiagnostic(diag)
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\MembersMustExistAnalyzer.cs (1)
39context.ReportDiagnostic(Diagnostic.Create(s_memberMustExistDiagnostic, Location.None, missingAPI));