140 references to ReportDiagnostic
Aspire.Hosting.Integration.Analyzers (9)
AspireExportAnalyzer.cs (9)
165context.ReportDiagnostic(Diagnostic.Create( 175context.ReportDiagnostic(Diagnostic.Create( 184context.ReportDiagnostic(Diagnostic.Create( 196context.ReportDiagnostic(Diagnostic.Create( 256context.ReportDiagnostic(Diagnostic.Create( 322context.ReportDiagnostic(Diagnostic.Create( 719context.ReportDiagnostic(Diagnostic.Create( 737context.ReportDiagnostic(Diagnostic.Create( 750context.ReportDiagnostic(Diagnostic.Create(
ILLink.RoslynAnalyzer (19)
DynamicallyAccessedMembersAnalyzer.cs (13)
153var genericArgumentDataFlow = new GenericArgumentDataFlow(dataFlowAnalyzerContext.TrimAnalyzer, FeatureContext.None, typeNameResolver, type, location, context.ReportDiagnostic); 158DynamicallyAccessedMembersTypeHierarchy.ApplyDynamicallyAccessedMembersToTypeHierarchy(typeNameResolver, location, type, context.ReportDiagnostic); 185context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.DynamicallyAccessedMembersOnFieldCanOnlyApplyToTypesOrStrings), location, member.GetDisplayName())); 189context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.DynamicallyAccessedMembersOnMethodReturnValueCanOnlyApplyToTypesOrStrings), location, member.GetDisplayName())); 191context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.DynamicallyAccessedMembersIsNotAllowedOnMethods), location)); 195context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.DynamicallyAccessedMembersOnMethodParameterCanOnlyApplyToTypesOrStrings), location, parameter.GetDisplayName(), member.GetDisplayName())); 201context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.DynamicallyAccessedMembersOnPropertyCanOnlyApplyToTypesOrStrings), location, member.GetDisplayName())); 203context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.DynamicallyAccessedMembersIsNotAllowedOnExtensionProperties), location, member.GetDisplayName())); 235context.ReportDiagnostic(Diagnostic.Create( 259context.ReportDiagnostic(Diagnostic.Create( 285context.ReportDiagnostic(Diagnostic.Create( 300context.ReportDiagnostic(Diagnostic.Create( 347context.ReportDiagnostic(Diagnostic.Create(
RequiresAnalyzerBase.cs (5)
204context.ReportDiagnostic); 214var genericArgumentDataFlow = new GenericArgumentDataFlow(this, FeatureContext.None, typeNameResolver, implicitCtor, typeSymbol.Locations[0], context.ReportDiagnostic); 280symbolAnalysisContext.ReportDiagnostic(Diagnostic.Create( 288symbolAnalysisContext.ReportDiagnostic(Diagnostic.Create( 298symbolAnalysisContext.ReportDiagnostic(Diagnostic.Create(
UnsafeMethodMissingRequiresUnsafeAnalyzer.cs (1)
55context.ReportDiagnostic(Diagnostic.Create(s_rule, location, method.GetDisplayName()));
Microsoft.Analyzers.Extra (1)
MakeExeTypesInternalAnalyzer.cs (1)
135symbolActionContext.ReportDiagnostic(diagnostic);
Microsoft.AspNetCore.Analyzers (4)
BuildServiceProviderAnalyzer.cs (1)
31context.ReportDiagnostic(Diagnostic.Create(
UseAuthorizationAnalyzer.cs (2)
49context.ReportDiagnostic(Diagnostic.Create( 69context.ReportDiagnostic(Diagnostic.Create(
UseMvcAnalyzer.cs (1)
43context.ReportDiagnostic(Diagnostic.Create(
Microsoft.AspNetCore.App.Analyzers (2)
Mvc\DetectAmbiguousActionRoutes.cs (1)
42context.ReportDiagnostic(Diagnostic.Create(
Mvc\DetectOverriddenAuthorizeAttribute.cs (1)
216context.ReportDiagnostic(Diagnostic.Create(
Microsoft.AspNetCore.Components.Analyzers (7)
ComponentParameterAnalyzer.cs (5)
84context.ReportDiagnostic(Diagnostic.Create( 91context.ReportDiagnostic(Diagnostic.Create( 105context.ReportDiagnostic(Diagnostic.Create( 115context.ReportDiagnostic(Diagnostic.Create( 126context.ReportDiagnostic(Diagnostic.Create(
InternalUsageAnalyzer.cs (2)
166context.ReportDiagnostic(Diagnostic.Create( 176context.ReportDiagnostic(Diagnostic.Create(
Microsoft.AspNetCore.Components.SdkAnalyzers (6)
ComponentParameterAnalyzer.cs (4)
78context.ReportDiagnostic(Diagnostic.Create( 85context.ReportDiagnostic(Diagnostic.Create( 99context.ReportDiagnostic(Diagnostic.Create( 113context.ReportDiagnostic(Diagnostic.Create(
InternalUsageAnalyzer.cs (2)
166context.ReportDiagnostic(Diagnostic.Create( 176context.ReportDiagnostic(Diagnostic.Create(
Microsoft.AspNetCore.Mvc.Analyzers (4)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (3)
89context.ReportDiagnostic(Diagnostic.Create( 103context.ReportDiagnostic(Diagnostic.Create( 117context.ReportDiagnostic(Diagnostic.Create(
TopLevelParameterNameAnalyzer.cs (1)
73context.ReportDiagnostic(
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (1)
584context.ReportDiagnostic,
Microsoft.CodeAnalysis.Analyzers (19)
FixAnalyzers\FixerWithFixAllAnalyzer.cs (3)
232context.ReportDiagnostic(diagnostic); 285context.ReportDiagnostic(diagnostic); 298context.ReportDiagnostic(diagnostic);
ImplementationIsObsoleteAnalyzer.cs (1)
58context.ReportDiagnostic(namedTypeSymbol.CreateDiagnostic(Rule, namedTypeSymbol.Name, iface.Name, (string)attr.ConstructorArguments[0].Value!));
InternalImplementationOnlyAnalyzer.cs (1)
61context.ReportDiagnostic(namedTypeSymbol.CreateDiagnostic(Rule, namedTypeSymbol.Name, iface.Name));
MetaAnalyzers\ClassIsNotDiagnosticAnalyzer.cs (1)
55sac.ReportDiagnostic(namedType.Locations[0].CreateDiagnostic(Rule, namedType.Name));
MetaAnalyzers\CompilerExtensionStrictApiAnalyzer.cs (1)
153context.ReportDiagnostic(Diagnostic.Create(descriptor, Location.Create(applicationSyntaxReference.SyntaxTree, applicationSyntaxReference.Span)));
MetaAnalyzers\CompilerExtensionTargetFrameworkAnalyzer.cs (1)
102context.ReportDiagnostic(Diagnostic.Create(
MetaAnalyzers\DiagnosticAnalyzerAttributeAnalyzer.cs (2)
126symbolContext.ReportDiagnostic(diagnostic); 141symbolContext.ReportDiagnostic(diagnostic);
MetaAnalyzers\DiagnosticAnalyzerFieldsAnalyzer.cs (1)
168context.ReportDiagnostic(diagnostic);
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (4)
313resourcesDataValueMap, context.Options, context.ReportDiagnostic, context.CancellationToken); 315resourcesDataValueMap, context.Options, context.ReportDiagnostic, context.CancellationToken); 317resourcesDataValueMap, context.Options, context.ReportDiagnostic, context.CancellationToken); 443context.ReportDiagnostic(Diagnostic.Create(AddCompilationEndCustomTagRule, field.Locations[0], field.Name));
MetaAnalyzers\DoNotUseFileTypesForAnalyzersOrGenerators.cs (1)
65context.ReportDiagnostic(diagnostic);
MetaAnalyzers\ReportDiagnosticAnalyzer.cs (1)
246symbolContext.ReportDiagnostic(diagnostic);
MetaAnalyzers\SymbolIsBannedInAnalyzersAnalyzer.cs (1)
77symbolAnalysisContext.ReportDiagnostic(symbol.Locations.CreateDiagnostic(SymbolIsBannedInAnalyzersAnalyzer.NoSettingSpecifiedSymbolIsBannedRule, symbol));
src\roslyn\src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (1)
72VerifyAttributes(context.ReportDiagnostic, context.Symbol.GetAttributes(), context.CancellationToken);
Microsoft.CodeAnalysis.CodeStyle (6)
src\roslyn\src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
133symbolEndContext.ReportDiagnostic(diagnostic);
src\roslyn\src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
74symbolContext.ReportDiagnostic(diagnostic);
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
712symbolEndContext.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
115ReportUnusedParameterDiagnostic(parameter, hasReference, context.ReportDiagnostic, context.Options, interpolatedStringHandlerAttribute, context.CancellationToken);
src\roslyn\src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
660context.ReportDiagnostic(DiagnosticHelper.Create( 670context.ReportDiagnostic(Diagnostic.Create(
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
115context.ReportDiagnostic(diagnostic);
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
123context.ReportDiagnostic(diagnostic);
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
59context.ReportDiagnostic(DiagnosticHelper.Create(
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
187context.ReportDiagnostic(DiagnosticHelper.Create(
src\roslyn\src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
233context.ReportDiagnostic(DiagnosticHelper.Create(
Microsoft.CodeAnalysis.CSharp.Features (5)
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
115context.ReportDiagnostic(diagnostic);
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
123context.ReportDiagnostic(diagnostic);
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructReadOnly\CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (1)
59context.ReportDiagnostic(DiagnosticHelper.Create(
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
187context.ReportDiagnostic(DiagnosticHelper.Create(
src\roslyn\src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
233context.ReportDiagnostic(DiagnosticHelper.Create(
Microsoft.CodeAnalysis.Features (6)
src\roslyn\src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
133symbolEndContext.ReportDiagnostic(diagnostic);
src\roslyn\src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
74symbolContext.ReportDiagnostic(diagnostic);
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
712symbolEndContext.ReportDiagnostic(DiagnosticHelper.CreateWithLocationTags(
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
115ReportUnusedParameterDiagnostic(parameter, hasReference, context.ReportDiagnostic, context.Options, interpolatedStringHandlerAttribute, context.CancellationToken);
src\roslyn\src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
660context.ReportDiagnostic(DiagnosticHelper.Create( 670context.ReportDiagnostic(Diagnostic.Create(
Microsoft.DotNet.CodeAnalysis (1)
Analyzers\PinvokeAnalyzer.cs (1)
163context.ReportDiagnostic(Diagnostic.Create(InvalidPinvokeCall, synref.GetSyntax().GetLocation(), data.ModuleName + "!" + (data.EntryPointName ?? methodSymbol.Name), altMsg));
Microsoft.Interop.ComInterfaceGenerator (12)
Analyzers\AddGeneratedComClassAnalyzer.cs (2)
51context.ReportDiagnostic(type.CreateDiagnostic(AddGeneratedComClassAttribute, type.Name)); 59context.ReportDiagnostic(type.CreateDiagnostic(AddGeneratedComClassAttribute, type.Name));
Analyzers\ComClassGeneratorDiagnosticsAnalyzer.cs (1)
59context.ReportDiagnostic(diagnostic);
Analyzers\ComInterfaceGeneratorDiagnosticsAnalyzer.cs (4)
126context.ReportDiagnostic(diag.ToDiagnostic()); 148context.ReportDiagnostic(diag.ToDiagnostic()); 159context.ReportDiagnostic(diag.ToDiagnostic()); 197context.ReportDiagnostic(diag.ToDiagnostic());
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
145context.ReportDiagnostic(type.CreateDiagnostic(ConvertToGeneratedComInterface, properties.ToImmutable(), type.Name));
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (1)
44context.ReportDiagnostic(comInterfaceAttribute.CreateDiagnosticInfo(GeneratorDiagnostics.InterfaceTypeNotSupported, unsupportedValue).ToDiagnostic());
Analyzers\VtableIndexStubDiagnosticsAnalyzer.cs (3)
86context.ReportDiagnostic(invalidMethodDiagnostic.ToDiagnostic()); 96context.ReportDiagnostic(diag.ToDiagnostic()); 103context.ReportDiagnostic(diag.ToDiagnostic());
Microsoft.Interop.JavaScript.JSImportGenerator (2)
Analyzers\JSImportExportDiagnosticsAnalyzer.cs (2)
125context.ReportDiagnostic(invalidMethodDiagnostic.ToDiagnostic()); 131context.ReportDiagnostic(diagnostic.ToDiagnostic());
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
89context.ReportDiagnostic(method.CreateDiagnosticInfo(ConvertToLibraryImport, properties.ToImmutable(), method.Name).ToDiagnostic());
Analyzers\LibraryImportDiagnosticsAnalyzer.cs (2)
171context.ReportDiagnostic(invalidMethodDiagnostic.ToDiagnostic()); 191context.ReportDiagnostic(diagnostic.ToDiagnostic());
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
DownlevelLibraryImportDiagnosticsAnalyzer.cs (2)
172context.ReportDiagnostic(invalidMethodDiagnostic.ToDiagnostic()); 190context.ReportDiagnostic(diagnostic.ToDiagnostic());
Microsoft.ML.CodeAnalyzer.Tests (1)
Code\RelaxTestNamingTest.cs (1)
133context.ReportDiagnostic(Diagnostic.Create(Rule, method.Locations[0]));
Microsoft.ML.InternalCodeAnalyzer (4)
BaseTestClassAnalyzer.cs (1)
78context.ReportDiagnostic(Diagnostic.Create(Rule, namedType.Locations[0], namedType));
BestFriendOnPublicDeclarationsAnalyzer.cs (1)
67context.ReportDiagnostic(diagnostic);
InstanceInitializerAnalyzer.cs (2)
60context.ReportDiagnostic(diagnostic); 76context.ReportDiagnostic(diagnostic);
Roslyn.Diagnostics.Analyzers (19)
AbstractDoNotCopyValue.cs (2)
283_context.ReportDiagnostic(symbol.CreateDiagnostic(NoFieldOfCopyableTypeRule, symbol.Type, symbol)); 341_context.ReportDiagnostic(symbol.CreateDiagnostic(NoAutoPropertyRule, symbol.Type, symbol));
DefaultableTypeShouldHaveDefaultableFieldsAnalyzer.cs (1)
107originalContext.ReportDiagnostic(field.CreateDiagnostic(Rule, field.ContainingType, sourceSymbol.Name));
DoNotMixAttributesFromDifferentVersionsOfMEF.cs (2)
123symbolContext.ReportDiagnostic(symbolContext.Symbol.CreateDiagnostic(Rule, problematicAttribute.AttributeClass.Name, exportedType.Name)); 130symbolContext.ReportDiagnostic(diagnostic);
ExportedPartsShouldHaveImportingConstructor.cs (3)
110context.ReportDiagnostic( 130context.ReportDiagnostic( 149context.ReportDiagnostic(constructor.DeclaringSyntaxReferences.CreateDiagnostic(Rule, properties, context.CancellationToken, namedType.Name));
ImportingConstructorShouldBeObsolete.cs (6)
125context.ReportDiagnostic(attributeData.ApplicationSyntaxReference.CreateDiagnostic(Rule, ScenarioProperties.MissingDescription, context.CancellationToken, namedType.Name)); 131context.ReportDiagnostic(attributeData.ApplicationSyntaxReference.CreateDiagnostic(Rule, ScenarioProperties.MissingError, context.CancellationToken, namedType.Name)); 137context.ReportDiagnostic(attributeData.ApplicationSyntaxReference.CreateDiagnostic(Rule, context.CancellationToken, namedType.Name)); 145context.ReportDiagnostic(attributeData.ApplicationSyntaxReference.CreateDiagnostic(Rule, ScenarioProperties.IncorrectDescription, context.CancellationToken, namedType.Name)); 152context.ReportDiagnostic(attributeData.ApplicationSyntaxReference.CreateDiagnostic(Rule, ScenarioProperties.ErrorSetToFalse, context.CancellationToken, namedType.Name)); 162context.ReportDiagnostic(importingConstructorAttributeData.ApplicationSyntaxReference.CreateDiagnostic(Rule, ScenarioProperties.MissingAttribute, context.CancellationToken, namedType.Name));
IRemoteJsonServiceParameterAnalyzer.cs (1)
87context.ReportDiagnostic(diagnostic);
PartsExportedWithMEFv2MustBeMarkedAsShared.cs (2)
67symbolContext.ReportDiagnostic(symbolContext.Symbol.CreateDiagnostic(Rule, namedType.Name)); 72symbolContext.ReportDiagnostic(exportAttributeApplication.ApplicationSyntaxReference.CreateDiagnostic(Rule, symbolContext.CancellationToken, namedType.Name));
TestExportsShouldNotBeDiscoverable.cs (2)
91context.ReportDiagnostic(context.Symbol.CreateDiagnostic(Rule, namedType.Name)); 96context.ReportDiagnostic(exportAttributeApplication.ApplicationSyntaxReference.CreateDiagnostic(Rule, context.CancellationToken, namedType.Name));
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
103context.ReportDiagnostic(diagnostic);
System.Windows.Forms.Analyzers.VisualBasic (1)
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
101context.ReportDiagnostic(diagnostic)