63 references to ReportDiagnostic
Aspire.Hosting.Integration.Analyzers (1)
AspireExportAnalyzer.cs (1)
772
context.
ReportDiagnostic
(Diagnostic.Create(
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
163
=> context.Compilation.ReportNoLocationDiagnostic(rule, context.
ReportDiagnostic
, properties: null, args);
ILLink.RoslynAnalyzer (1)
RequiresAnalyzerBase.cs (1)
441
context.
ReportDiagnostic
(diag);
Microsoft.Analyzers.Local (11)
ApiLifecycle\ApiLifecycleAnalyzer.cs (11)
74
context.
ReportDiagnostic
(Diagnostic.Create(DiagDescriptors.NewSymbolsMustBeMarkedExperimental, symbol.Locations.FirstOrDefault(), symbol));
82
context.
ReportDiagnostic
(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeDeleted, null, type.ModifiersAndName));
87
context.
ReportDiagnostic
(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeDeleted, null, method.Member));
92
context.
ReportDiagnostic
(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeDeleted, null, prop.Member));
97
context.
ReportDiagnostic
(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeDeleted, null, field.Member));
111
context.
ReportDiagnostic
(Diagnostic.Create(DiagDescriptors.ExperimentalSymbolsCantBeMarkedObsolete, symbol.Locations.FirstOrDefault(), symbol));
118
context.
ReportDiagnostic
(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantBeMarkedExperimental, symbol.Locations.FirstOrDefault(), symbol));
125
context.
ReportDiagnostic
(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantChange, symbol.Locations.FirstOrDefault(), symbol));
133
context.
ReportDiagnostic
(Diagnostic.Create(DiagDescriptors.PublishedSymbolsCantChange, symbol.Locations.FirstOrDefault(), symbol));
154
context.
ReportDiagnostic
(Diagnostic.Create(DiagDescriptors.NewSymbolsMustBeMarkedExperimental, type.Locations.FirstOrDefault(), type));
158
context.
ReportDiagnostic
(Diagnostic.Create(DiagDescriptors.ExperimentalSymbolsCantBeMarkedObsolete, type.Locations.FirstOrDefault(), type));
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
51
ReportDiagnostics(diagnostics, context.
ReportDiagnostic
, location => !IsSourceLocation(location), s_declaration);
Microsoft.CodeAnalysis.Analyzers (9)
MetaAnalyzers\DiagnosticAnalyzerAPIUsageAnalyzer.cs (1)
183
compilationEndContext.
ReportDiagnostic
(diagnostic);
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ReleaseTracking.cs (3)
407
compilationEndContext.
ReportDiagnostic
(diagnostic);
452
compilationEndContext.
ReportDiagnostic
(diagnostic);
472
compilationEndContext.
ReportDiagnostic
(diagnostic);
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (2)
457
compilationEndContext.
ReportDiagnostic
(diagnostic);
481
compilationEndContext.
ReportDiagnostic
(diagnostic);
src\roslyn\src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (2)
65
VerifyAttributes(context.
ReportDiagnostic
, compilationContext.Compilation.Assembly.GetAttributes(), context.CancellationToken);
66
VerifyAttributes(context.
ReportDiagnostic
, compilationContext.Compilation.SourceModule.GetAttributes(), context.CancellationToken);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
163
=> context.Compilation.ReportNoLocationDiagnostic(rule, context.
ReportDiagnostic
, properties: null, args);
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
163
=> context.Compilation.ReportNoLocationDiagnostic(rule, context.
ReportDiagnostic
, properties: null, args);
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
142
context.
ReportDiagnostic
(Diagnostic.Create(s_enableGenerateDocumentationFileIdDescriptor, Location.None));
Microsoft.CodeAnalysis.Features (1)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
142
context.
ReportDiagnostic
(Diagnostic.Create(s_enableGenerateDocumentationFileIdDescriptor, Location.None));
Microsoft.CodeAnalysis.NetAnalyzers (29)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldNotContainUnderscores.cs (1)
234
compilationAnalysisContext.
ReportDiagnostic
(compilation.Assembly.CreateDiagnostic(AssemblyRule, compilation.AssemblyName));
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\TypeNamesShouldNotMatchNamespaces.cs (2)
112
compilationAnalysisContext.
ReportDiagnostic
(symbol.CreateDiagnostic(SystemRule, symbolName, wellKnownSystemNamespaceValue));
116
compilationAnalysisContext.
ReportDiagnostic
(symbol.CreateDiagnostic(DefaultRule, symbolName, namespaceNameValue));
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUninstantiatedInternalClasses.cs (1)
172
context.
ReportDiagnostic
(type.CreateDiagnostic(Rule, type.FormatMemberName()));
Microsoft.CodeQuality.Analyzers\Maintainability\CodeMetricsAnalyzer.cs (5)
138
compilationContext.
ReportDiagnostic
(diagnostic);
167
compilationContext.
ReportDiagnostic
(diagnostic);
180
compilationContext.
ReportDiagnostic
(diagnostic);
192
compilationContext.
ReportDiagnostic
(diagnostic);
205
compilationContext.
ReportDiagnostic
(diagnostic);
Microsoft.NetCore.Analyzers\InteropServices\UseValidPlatformString.cs (1)
102
static (context, diagnostic) => context.
ReportDiagnostic
(diagnostic),
Microsoft.NetCore.Analyzers\Performance\UseConcreteTypeAnalyzer.cs (1)
166
Report(context.
ReportDiagnostic
, publicOrInternalColl, context.Compilation);
Microsoft.NetCore.Analyzers\Runtime\AttributeStringLiteralsShouldParseCorrectly.cs (1)
131
AnalyzeSymbol(caContext.
ReportDiagnostic
, compilation.Assembly, caContext.CancellationToken);
Microsoft.NetCore.Analyzers\Runtime\SealInternalTypes.cs (1)
79
context.
ReportDiagnostic
(type.CreateDiagnostic(Rule, type.Name));
Microsoft.NetCore.Analyzers\Security\DoNotCallDangerousMethodsInDeserialization.cs (1)
227
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\DoNotDisableHttpClientCRLCheck.cs (1)
237
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\DoNotInstallRootCert.cs (1)
226
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\DoNotSerializeTypeWithPointerFields.cs (1)
71
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\DoNotUseCreateEncryptorWithNonDefaultIV.cs (1)
202
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerJavascriptSerializerWithSimpleTypeResolver.cs (1)
261
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerJsonNetWithoutBinder.cs (1)
240
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerWithoutBinderBase.cs (1)
225
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureSettingsForJsonNet.cs (1)
267
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\DoNotUseWeakKDFInsufficientIterationCount.cs (1)
221
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\PotentialReferenceCycleInDeserializedObjectGraph.cs (1)
95
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\SetHttpOnlyForHttpCookie.cs (1)
185
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\UseAutoValidateAntiforgeryToken.cs (2)
356
compilationAnalysisContext.
ReportDiagnostic
(
365
compilationAnalysisContext.
ReportDiagnostic
(
Microsoft.NetCore.Analyzers\Security\UseSecureCookiesASPNetCore.cs (1)
220
compilationAnalysisContext.
ReportDiagnostic
(
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
171
=> context.Compilation.ReportNoLocationDiagnostic(rule, context.
ReportDiagnostic
, properties: null, args);
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
163
=> context.Compilation.ReportNoLocationDiagnostic(rule, context.
ReportDiagnostic
, properties: null, args);
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\MembersMustExistAnalyzer.cs (1)
39
context.
ReportDiagnostic
(Diagnostic.Create(s_memberMustExistDiagnostic, Location.None, missingAPI));
Microsoft.Interop.JavaScript.JSImportGenerator (1)
Analyzers\JSImportExportDiagnosticsAnalyzer.cs (1)
105
endContext.
ReportDiagnostic
(DiagnosticInfo.Create(RequiresAllowUnsafeBlocksDescriptor, null).ToDiagnostic());
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\LibraryImportDiagnosticsAnalyzer.cs (1)
83
endContext.
ReportDiagnostic
(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, null).ToDiagnostic());
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportDiagnosticsAnalyzer.cs (1)
77
endContext.
ReportDiagnostic
(DiagnosticInfo.Create(GeneratorDiagnostics.RequiresAllowUnsafeBlocks, null).ToDiagnostic());
Roslyn.Diagnostics.Analyzers (2)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
163
=> context.Compilation.ReportNoLocationDiagnostic(rule, context.
ReportDiagnostic
, properties: null, args);
SymbolDeclaredEventMustBeGeneratedForSourceSymbols.cs (1)
187
context.
ReportDiagnostic
(diagnostic);