132 references to DiagnosticDescriptor
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.Diagnostics.cs (1)
14
internal static readonly DiagnosticDescriptor s_modelNameMustBeValid =
new
(
Aspire.Hosting.Integration.Analyzers (17)
AspireExportAnalyzer.Diagnostics.cs (17)
14
internal static readonly DiagnosticDescriptor s_exportMethodMustBeStatic =
new
(
24
internal static readonly DiagnosticDescriptor s_invalidExportIdFormat =
new
(
34
internal static readonly DiagnosticDescriptor s_returnTypeMustBeAtsCompatible =
new
(
44
internal static readonly DiagnosticDescriptor s_parameterTypeMustBeAtsCompatible =
new
(
54
internal static readonly DiagnosticDescriptor s_unionRequiresAtLeastTwoTypes =
new
(
64
internal static readonly DiagnosticDescriptor s_unionTypeMustBeAtsCompatible =
new
(
74
internal static readonly DiagnosticDescriptor s_duplicateExportId =
new
(
85
internal static readonly DiagnosticDescriptor s_missingExportAttribute =
new
(
95
internal static readonly DiagnosticDescriptor s_exportNameShouldBeUnique =
new
(
105
internal static readonly DiagnosticDescriptor s_exportedSyncDelegateInvokedInline =
new
(
115
internal static readonly DiagnosticDescriptor s_redundantExportId =
new
(
125
internal static readonly DiagnosticDescriptor s_callbackContextTypeMissingExport =
new
(
135
internal static readonly DiagnosticDescriptor s_duplicatePolyglotCapabilityId =
new
(
146
internal static readonly DiagnosticDescriptor s_duplicateGeneratedMethodName =
new
(
157
internal static readonly DiagnosticDescriptor s_descriptionShouldUseXmlDocs =
new
(
168
internal static readonly DiagnosticDescriptor s_dtoMutableCollectionPropertyMustBeInitSettable =
new
(
178
internal static readonly DiagnosticDescriptor s_missingPolyglotCompatibleMarker =
new
(
ConfigurationSchemaGenerator (1)
DiagnosticDescriptors.cs (1)
28
public static DiagnosticDescriptor PropertyNotSupported { get; } = new
DiagnosticDescriptor
(
EventSourceGenerator (2)
EventSourceGenerator.Parser.cs (2)
58
new
DiagnosticDescriptor
(
87
new
DiagnosticDescriptor
(
ILLink.RoslynAnalyzer (3)
DiagnosticDescriptors.cs (3)
14
return new
DiagnosticDescriptor
(diagnosticId.AsString(),
24
=> new
DiagnosticDescriptor
(diagnosticId.AsString(),
45
return new
DiagnosticDescriptor
(diagnosticId.AsString(),
Microsoft.Analyzers.Extra (1)
DiagDescriptors.cs (1)
134
return
new
(
Microsoft.Analyzers.Local (1)
DiagDescriptors.cs (1)
115
=>
new
(id, title, messageFormat, category, defaultSeverity, true, description);
Microsoft.AspNetCore.Analyzers (3)
StartupAnalyzer.Diagnostics.cs (3)
15
internal static readonly DiagnosticDescriptor BuildServiceProviderShouldNotCalledInConfigureServicesMethod = new
DiagnosticDescriptor
(
24
internal static readonly DiagnosticDescriptor UnsupportedUseMvcWithEndpointRouting = new
DiagnosticDescriptor
(
33
internal static readonly DiagnosticDescriptor IncorrectlyConfiguredAuthorizationMiddleware = new
DiagnosticDescriptor
(
Microsoft.AspNetCore.Components.AI.SourceGenerators (10)
DiagnosticDescriptors.cs (10)
11
public static readonly DiagnosticDescriptor NotPartial =
new
(
19
public static readonly DiagnosticDescriptor WrongBaseClass =
new
(
27
public static readonly DiagnosticDescriptor IsAbstract =
new
(
35
public static readonly DiagnosticDescriptor IsGeneric =
new
(
43
public static readonly DiagnosticDescriptor EmptyToolName =
new
(
51
public static readonly DiagnosticDescriptor DuplicateArgumentKey =
new
(
59
public static readonly DiagnosticDescriptor PropertyNoSetter =
new
(
67
public static readonly DiagnosticDescriptor DuplicateToolName =
new
(
75
public static readonly DiagnosticDescriptor NestedType =
new
(
83
public static readonly DiagnosticDescriptor DuplicateResultKey =
new
(
Microsoft.AspNetCore.Components.Testing.Generators (3)
DiagnosticDescriptors.cs (3)
10
internal static readonly DiagnosticDescriptor MethodNotFound =
new
(
18
internal static readonly DiagnosticDescriptor NonConstantMethodName =
new
(
26
internal static readonly DiagnosticDescriptor MethodMustBeStatic =
new
(
Microsoft.AspNetCore.Mvc.Analyzers (6)
DiagnosticDescriptors.cs (6)
15
new
DiagnosticDescriptor
(
24
new
DiagnosticDescriptor
(
33
new
DiagnosticDescriptor
(
42
new
DiagnosticDescriptor
(
51
new
DiagnosticDescriptor
(
64
new
DiagnosticDescriptor
(
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (20)
DiagnosticDescriptors.cs (20)
16
public static DiagnosticDescriptor HubServerProxyNonInterfaceGenericTypeArgument { get; } = new
DiagnosticDescriptor
(
24
public static DiagnosticDescriptor HubServerProxyUnsupportedReturnType { get; } = new
DiagnosticDescriptor
(
32
public static DiagnosticDescriptor TooManyHubServerProxyAttributedMethods { get; } = new
DiagnosticDescriptor
(
40
public static DiagnosticDescriptor HubServerProxyAttributedMethodBadAccessibility { get; } = new
DiagnosticDescriptor
(
48
public static DiagnosticDescriptor HubServerProxyAttributedMethodIsNotPartial { get; } = new
DiagnosticDescriptor
(
56
public static DiagnosticDescriptor HubServerProxyAttributedMethodIsNotExtension { get; } = new
DiagnosticDescriptor
(
64
public static DiagnosticDescriptor HubServerProxyAttributedMethodTypeArgCountIsBad { get; } = new
DiagnosticDescriptor
(
72
public static DiagnosticDescriptor HubServerProxyAttributedMethodTypeArgAndReturnTypeDoesNotMatch { get; } = new
DiagnosticDescriptor
(
80
public static DiagnosticDescriptor HubServerProxyAttributedMethodArgCountIsBad { get; } = new
DiagnosticDescriptor
(
88
public static DiagnosticDescriptor HubServerProxyAttributedMethodArgIsNotHubConnection { get; } = new
DiagnosticDescriptor
(
98
public static DiagnosticDescriptor HubClientProxyUnsupportedReturnType { get; } = new
DiagnosticDescriptor
(
106
public static DiagnosticDescriptor TooManyHubClientProxyAttributedMethods { get; } = new
DiagnosticDescriptor
(
114
public static DiagnosticDescriptor HubClientProxyAttributedMethodBadAccessibility { get; } = new
DiagnosticDescriptor
(
122
public static DiagnosticDescriptor HubClientProxyAttributedMethodIsNotPartial { get; } = new
DiagnosticDescriptor
(
130
public static DiagnosticDescriptor HubClientProxyAttributedMethodIsNotExtension { get; } = new
DiagnosticDescriptor
(
138
public static DiagnosticDescriptor HubClientProxyAttributedMethodTypeArgCountIsBad { get; } = new
DiagnosticDescriptor
(
146
public static DiagnosticDescriptor HubClientProxyAttributedMethodTypeArgAndProviderTypeDoesNotMatch { get; } = new
DiagnosticDescriptor
(
154
public static DiagnosticDescriptor HubClientProxyAttributedMethodArgCountIsBad { get; } = new
DiagnosticDescriptor
(
162
public static DiagnosticDescriptor HubClientProxyAttributedMethodArgIsNotHubConnection { get; } = new
DiagnosticDescriptor
(
170
public static DiagnosticDescriptor HubClientProxyAttributedMethodHasBadReturnType { get; } = new
DiagnosticDescriptor
(
Microsoft.CodeAnalysis (5)
CommandLine\AnalyzerConfigSet.cs (3)
95
= new
DiagnosticDescriptor
(
104
= new
DiagnosticDescriptor
(
113
= new
DiagnosticDescriptor
(
CommandLine\CommonCompiler.SuppressionDiagnostic.cs (1)
20
private static readonly DiagnosticDescriptor s_suppressionDiagnosticDescriptor = new
DiagnosticDescriptor
(
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
1504
return new
DiagnosticDescriptor
(
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
35
private static readonly DiagnosticDescriptor s_dummyDataflowAnalysisDescriptor =
new
(
Microsoft.CodeAnalysis.CodeStyle (1)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
34
private static readonly DiagnosticDescriptor s_enableGenerateDocumentationFileIdDescriptor =
new
(
Microsoft.CodeAnalysis.Features (2)
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
35
var descriptor = new
DiagnosticDescriptor
(AnalyzerExceptionDiagnosticId,
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
34
private static readonly DiagnosticDescriptor s_enableGenerateDocumentationFileIdDescriptor =
new
(
Microsoft.CodeAnalysis.NetAnalyzers (1)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
32
private static readonly DiagnosticDescriptor s_dummyDataflowAnalysisDescriptor =
new
(
Microsoft.CodeAnalysis.Razor.Compiler (1)
SourceGenerators\Diagnostics\RazorDiagnostics.cs (1)
94
var descriptor = new
DiagnosticDescriptor
(
Microsoft.CodeAnalysis.Workspaces (1)
Diagnostics\DiagnosticDescriptorData.cs (1)
59
return new
DiagnosticDescriptor
(
Microsoft.DotNet.CodeAnalysis (6)
Analyzers\AppContextDefaultsAnalyzer.cs (3)
27
new
DiagnosticDescriptor
(DiagnosticIds.BCL0010.ToString(), s_title, CreateDiagnosticMessage(s_defaultValueNotInitializedToTrue, DiagnosticIds.BCL0010.ToString()), s_analyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: s_description);
30
new
DiagnosticDescriptor
(DiagnosticIds.BCL0011.ToString(), s_title, CreateDiagnosticMessage(s_defaultValueInsideUnexpectedIfCondition, DiagnosticIds.BCL0011.ToString()), s_analyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: s_description);
33
new
DiagnosticDescriptor
(DiagnosticIds.BCL0012.ToString(), s_title, CreateDiagnosticMessage(s_defaultValueDefinedOutsideIfCondition, DiagnosticIds.BCL0012.ToString()), s_analyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: s_description);
Analyzers\MembersMustExistAnalyzer.cs (1)
26
new
DiagnosticDescriptor
(DiagnosticIds.BCL0001.ToString(), s_title, s_messageFormat, s_analyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: s_description, customTags: WellKnownDiagnosticTags.CompilationEnd);
Analyzers\PinvokeAnalyzer.cs (1)
24
private static DiagnosticDescriptor InvalidPinvokeCall = new
DiagnosticDescriptor
(DiagnosticIds.BCL0015.ToString(), Title, MessageFormat, AnalyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
Analyzers\ResourceUsageAnalyzer.cs (1)
19
private static DiagnosticDescriptor InvalidSRFormatCall = new
DiagnosticDescriptor
(DiagnosticIds.BCL0020.ToString(), Title, "", AnalyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
Microsoft.Extensions.Options.SourceGeneration (1)
DiagDescriptorsBase.cs (1)
21
return
new
(
Microsoft.Extensions.Validation.ValidationsGenerator (6)
Analyzers\ValidatableTypeInGeneratedCodeDiagnosticAnalyzer.cs (1)
17
internal static readonly DiagnosticDescriptor ValidatableTypeCantBeUsedInGeneratedCode =
new
(
Analyzers\ValidationsDiagnosticAnalyzer.cs (5)
27
internal static readonly DiagnosticDescriptor ValidatableTypeIsNotAccessible =
new
(
37
internal static readonly DiagnosticDescriptor EndpointParameterTypeIsNotAccessible =
new
(
48
internal static readonly DiagnosticDescriptor ValidatablePropertyIsNotAccessible =
new
(
58
internal static readonly DiagnosticDescriptor ValidatablePropertyIsNotAccessibleCompilationEnd =
new
(
69
internal static readonly DiagnosticDescriptor ValidatableTypeIsUsedWithoutAddValidation =
new
(
Microsoft.Gen.BuildMetadata (1)
DiagDescriptorsBase.cs (1)
28
return
new
(
Microsoft.Gen.ComplianceReports (1)
ComplianceReportsGenerator.cs (1)
92
var diagnostic = new
DiagnosticDescriptor
(
Microsoft.Gen.ContextualOptions (1)
DiagDescriptorsBase.cs (1)
28
return
new
(
Microsoft.Gen.Logging (1)
DiagDescriptorsBase.cs (1)
28
return
new
(
Microsoft.Gen.MetadataExtractor (4)
ComplianceReportsGenerator.cs (1)
92
var diagnostic = new
DiagnosticDescriptor
(
DiagDescriptorsBase.cs (1)
28
return
new
(
MetadataReportsGenerator.cs (1)
81
var diagnostic = new
DiagnosticDescriptor
(
MetricsReportsGenerator.cs (1)
56
var diagnostic = new
DiagnosticDescriptor
(
Microsoft.Gen.Metrics (1)
DiagDescriptorsBase.cs (1)
28
return
new
(
Microsoft.Gen.MetricsReports (2)
DiagDescriptorsBase.cs (1)
28
return
new
(
MetricsReportsGenerator.cs (1)
56
var diagnostic = new
DiagnosticDescriptor
(
Microsoft.Maui.Controls.BindingSourceGen (10)
DiagnosticsFactory.cs (10)
21
new
DiagnosticDescriptor
(
32
new
DiagnosticDescriptor
(
43
new
DiagnosticDescriptor
(
54
new
DiagnosticDescriptor
(
65
new
DiagnosticDescriptor
(
76
new
DiagnosticDescriptor
(
87
new
DiagnosticDescriptor
(
98
new
DiagnosticDescriptor
(
109
new
DiagnosticDescriptor
(
120
new
DiagnosticDescriptor
(
Microsoft.ML.CodeAnalyzer.Tests (1)
Code\RelaxTestNamingTest.cs (1)
107
public static readonly DiagnosticDescriptor Rule = new
DiagnosticDescriptor
(RelaxTestNamingSuppressor.Rule.SuppressedDiagnosticId, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
Microsoft.ML.InternalCodeAnalyzer (13)
BaseTestClassAnalyzer.cs (1)
25
new
DiagnosticDescriptor
(DiagnosticId, Title, Format, Category,
BestFriendAnalyzer.cs (1)
30
new
DiagnosticDescriptor
(DiagnosticId, Title, Format, Category,
BestFriendOnPublicDeclarationsAnalyzer.cs (1)
26
new
DiagnosticDescriptor
(DiagnosticId, Title, Format, Category,
ContractsCheckAnalyzer.cs (4)
33
new
DiagnosticDescriptor
(Id, Title, Format, Category,
47
new
DiagnosticDescriptor
(Id, Title, Format, Category,
58
new
DiagnosticDescriptor
(Id, Title, Format, Category,
70
new
DiagnosticDescriptor
(Id, Title, Format, Category,
InstanceInitializerAnalyzer.cs (1)
24
new
DiagnosticDescriptor
(DiagnosticId, Title, Format, Category,
NameAnalyzer.cs (2)
54
new
DiagnosticDescriptor
(Id, Title, Format, Category,
67
new
DiagnosticDescriptor
(Id, Title, Format, Category,
ParameterVariableNameAnalyzer.cs (1)
26
new
DiagnosticDescriptor
(Id, Title, Format, Category,
SingleVariableDeclarationAnalyzer.cs (1)
26
new
DiagnosticDescriptor
(DiagnosticId, Title, Format, Category,
TypeParamNameAnalyzer.cs (1)
25
new
DiagnosticDescriptor
(Id, Title, Format, Category,
System.Private.CoreLib.Generators (4)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (4)
34
private static readonly DiagnosticDescriptor Rule = new
DiagnosticDescriptor
(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
38
private static readonly DiagnosticDescriptor RuleHelper = new
DiagnosticDescriptor
(DiagnosticIdHelper, Title, MessageHelperFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
42
private static readonly DiagnosticDescriptor RuleCantParse = new
DiagnosticDescriptor
(DiagnosticIdConditionParsing, Title, MessageNonParseableConditionFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
46
private static readonly DiagnosticDescriptor RuleAttributeNotSpecificEnough = new
DiagnosticDescriptor
(DiagnosticIdAttributeNotSpecificEnough, Title, MessageAttributeNotSpecificEnoughFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);