285 instantiations of DiagnosticDescriptor
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.Diagnostics.cs (1)
14internal static readonly DiagnosticDescriptor s_modelNameMustBeValid = new(
Aspire.Hosting.Integration.Analyzers (10)
AspireExportAnalyzer.Diagnostics.cs (10)
14internal static readonly DiagnosticDescriptor s_exportMethodMustBeStatic = new( 24internal static readonly DiagnosticDescriptor s_invalidExportIdFormat = new( 34internal static readonly DiagnosticDescriptor s_returnTypeMustBeAtsCompatible = new( 44internal static readonly DiagnosticDescriptor s_parameterTypeMustBeAtsCompatible = new( 54internal static readonly DiagnosticDescriptor s_unionRequiresAtLeastTwoTypes = new( 64internal static readonly DiagnosticDescriptor s_unionTypeMustBeAtsCompatible = new( 74internal static readonly DiagnosticDescriptor s_duplicateExportId = new( 85internal static readonly DiagnosticDescriptor s_missingExportAttribute = new( 95internal static readonly DiagnosticDescriptor s_exportNameShouldBeUnique = new( 105internal static readonly DiagnosticDescriptor s_exportedSyncDelegateInvokedInline = new(
ConfigurationSchemaGenerator (2)
DiagnosticDescriptors.cs (1)
28public static DiagnosticDescriptor PropertyNotSupported { get; } = new DiagnosticDescriptor(
RuntimeSource\Roslyn\DiagnosticDescriptorHelper.cs (1)
22return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, helpLink, customTags);
EventSourceGenerator (2)
EventSourceGenerator.Parser.cs (2)
58new DiagnosticDescriptor( 87new DiagnosticDescriptor(
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
182rule = new DiagnosticDescriptor(rule.Id, rule.Title, rule.MessageFormat, rule.Category,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
262return new DiagnosticDescriptor(descriptor.Id, descriptor.Title, messageFormat,
ILLink.RoslynAnalyzer (4)
DiagnosticDescriptors.cs (4)
14return new DiagnosticDescriptor(diagnosticId.AsString(), 24=> new DiagnosticDescriptor(diagnosticId.AsString(), 45return new DiagnosticDescriptor(diagnosticId.AsString(), 54return new DiagnosticDescriptor(diagnosticId.AsString(),
Microsoft.Analyzers.Extra (1)
DiagDescriptors.cs (1)
134return 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)
15internal static readonly DiagnosticDescriptor BuildServiceProviderShouldNotCalledInConfigureServicesMethod = new DiagnosticDescriptor( 24internal static readonly DiagnosticDescriptor UnsupportedUseMvcWithEndpointRouting = new DiagnosticDescriptor( 33internal static readonly DiagnosticDescriptor IncorrectlyConfiguredAuthorizationMiddleware = new DiagnosticDescriptor(
Microsoft.AspNetCore.App.Analyzers (1)
DiagnosticDescriptors.cs (1)
234=> new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, GetHelpLinkUri(id), customTags);
Microsoft.AspNetCore.Components.Analyzers (15)
DiagnosticDescriptors.cs (15)
16public static readonly DiagnosticDescriptor ComponentParameterSettersShouldBePublic = new( 25public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesMustBeUnique = new( 34public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesHasWrongType = new( 43public static readonly DiagnosticDescriptor ComponentParametersShouldBePublic = new( 52public static readonly DiagnosticDescriptor ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent = new( 61public static readonly DiagnosticDescriptor DoNotUseRenderTreeTypes = new( 70public static readonly DiagnosticDescriptor ComponentParametersShouldBeAutoProperties = new( 79public static readonly DiagnosticDescriptor SupplyParameterFromFormShouldNotHavePropertyInitializer = new( 88public static readonly DiagnosticDescriptor PersistentStateShouldNotHavePropertyInitializer = new( 97public static readonly DiagnosticDescriptor UseInvokeVoidAsyncForObjectReturn = new( 106public static readonly DiagnosticDescriptor VirtualizeItemsProviderRequiresItemComparer = new( 115public static readonly DiagnosticDescriptor UnnecessaryStateHasChangedCall = new( 124public static readonly DiagnosticDescriptor AuthenticationStateProviderCachedWithoutSubscription = new( 133public static readonly DiagnosticDescriptor ForLoopIteratorVariableUsedInClosure = new( 142public static readonly DiagnosticDescriptor JSInvokableMethodShouldBePublic = new(
Microsoft.AspNetCore.Components.SdkAnalyzers (6)
DiagnosticDescriptors.cs (6)
20public static readonly DiagnosticDescriptor ComponentParameterSettersShouldBePublic = new DiagnosticDescriptor( 29public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesMustBeUnique = new DiagnosticDescriptor( 38public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesHasWrongType = new DiagnosticDescriptor( 47public static readonly DiagnosticDescriptor ComponentParametersShouldBePublic = new DiagnosticDescriptor( 56public static readonly DiagnosticDescriptor ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent = new DiagnosticDescriptor( 65public static readonly DiagnosticDescriptor DoNotUseRenderTreeTypes = new DiagnosticDescriptor(
Microsoft.AspNetCore.Components.Testing.Generators (3)
DiagnosticDescriptors.cs (3)
10internal static readonly DiagnosticDescriptor MethodNotFound = new( 18internal static readonly DiagnosticDescriptor NonConstantMethodName = new( 26internal static readonly DiagnosticDescriptor MethodMustBeStatic = new(
Microsoft.AspNetCore.Http.RequestDelegateGenerator (15)
DiagnosticDescriptors.cs (15)
15public static DiagnosticDescriptor UnableToResolveRoutePattern { get; } = new( 24public static DiagnosticDescriptor UnableToResolveMethod { get; } = new( 33public static DiagnosticDescriptor UnableToResolveParameterDescriptor { get; } = new( 42public static DiagnosticDescriptor UnableToResolveAnonymousReturnType { get; } = new( 51public static DiagnosticDescriptor InvalidAsParametersAbstractType { get; } = new( 60public static DiagnosticDescriptor InvalidAsParametersSignature { get; } = new( 69public static DiagnosticDescriptor InvalidAsParametersNoConstructorFound { get; } = new( 78public static DiagnosticDescriptor InvalidAsParametersSingleConstructorOnly { get; } = new( 87public static DiagnosticDescriptor InvalidAsParametersNested { get; } = new( 96public static DiagnosticDescriptor InvalidAsParametersNullable { get; } = new( 105public static DiagnosticDescriptor TypeParametersNotSupported { get; } = new( 114public static DiagnosticDescriptor InaccessibleTypesNotSupported { get; } = new( 123public static DiagnosticDescriptor KeyedAndNotKeyedServiceAttributesNotSupported { get; } = new( 132public static DiagnosticDescriptor InvalidAsParametersEnumerableType { get; } = new( 141public static DiagnosticDescriptor UnableToResolveReturnType { get; } = new(
Microsoft.AspNetCore.Mvc.Analyzers (6)
DiagnosticDescriptors.cs (6)
15new DiagnosticDescriptor( 24new DiagnosticDescriptor( 33new DiagnosticDescriptor( 42new DiagnosticDescriptor( 51new DiagnosticDescriptor( 64new DiagnosticDescriptor(
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
ApiDiagnosticDescriptors.cs (4)
14new DiagnosticDescriptor( 23new DiagnosticDescriptor( 32new DiagnosticDescriptor( 41new DiagnosticDescriptor(
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (20)
DiagnosticDescriptors.cs (20)
16public static DiagnosticDescriptor HubServerProxyNonInterfaceGenericTypeArgument { get; } = new DiagnosticDescriptor( 24public static DiagnosticDescriptor HubServerProxyUnsupportedReturnType { get; } = new DiagnosticDescriptor( 32public static DiagnosticDescriptor TooManyHubServerProxyAttributedMethods { get; } = new DiagnosticDescriptor( 40public static DiagnosticDescriptor HubServerProxyAttributedMethodBadAccessibility { get; } = new DiagnosticDescriptor( 48public static DiagnosticDescriptor HubServerProxyAttributedMethodIsNotPartial { get; } = new DiagnosticDescriptor( 56public static DiagnosticDescriptor HubServerProxyAttributedMethodIsNotExtension { get; } = new DiagnosticDescriptor( 64public static DiagnosticDescriptor HubServerProxyAttributedMethodTypeArgCountIsBad { get; } = new DiagnosticDescriptor( 72public static DiagnosticDescriptor HubServerProxyAttributedMethodTypeArgAndReturnTypeDoesNotMatch { get; } = new DiagnosticDescriptor( 80public static DiagnosticDescriptor HubServerProxyAttributedMethodArgCountIsBad { get; } = new DiagnosticDescriptor( 88public static DiagnosticDescriptor HubServerProxyAttributedMethodArgIsNotHubConnection { get; } = new DiagnosticDescriptor( 98public static DiagnosticDescriptor HubClientProxyUnsupportedReturnType { get; } = new DiagnosticDescriptor( 106public static DiagnosticDescriptor TooManyHubClientProxyAttributedMethods { get; } = new DiagnosticDescriptor( 114public static DiagnosticDescriptor HubClientProxyAttributedMethodBadAccessibility { get; } = new DiagnosticDescriptor( 122public static DiagnosticDescriptor HubClientProxyAttributedMethodIsNotPartial { get; } = new DiagnosticDescriptor( 130public static DiagnosticDescriptor HubClientProxyAttributedMethodIsNotExtension { get; } = new DiagnosticDescriptor( 138public static DiagnosticDescriptor HubClientProxyAttributedMethodTypeArgCountIsBad { get; } = new DiagnosticDescriptor( 146public static DiagnosticDescriptor HubClientProxyAttributedMethodTypeArgAndProviderTypeDoesNotMatch { get; } = new DiagnosticDescriptor( 154public static DiagnosticDescriptor HubClientProxyAttributedMethodArgCountIsBad { get; } = new DiagnosticDescriptor( 162public static DiagnosticDescriptor HubClientProxyAttributedMethodArgIsNotHubConnection { get; } = new DiagnosticDescriptor( 170public static DiagnosticDescriptor HubClientProxyAttributedMethodHasBadReturnType { get; } = new DiagnosticDescriptor(
Microsoft.CodeAnalysis (10)
CommandLine\AnalyzerConfigSet.cs (3)
95= new DiagnosticDescriptor( 104= new DiagnosticDescriptor( 113= new DiagnosticDescriptor(
CommandLine\CommonCompiler.SuppressionDiagnostic.cs (1)
20private static readonly DiagnosticDescriptor s_suppressionDiagnosticDescriptor = new DiagnosticDescriptor(
Diagnostic\CustomObsoleteDiagnosticInfo.cs (1)
94return new DiagnosticDescriptor(
Diagnostic\Diagnostic_SimpleDiagnostic.cs (1)
76var descriptor = new DiagnosticDescriptor(id, title, message,
Diagnostic\DiagnosticDescriptor.cs (1)
81/// use constructor overload <see cref="DiagnosticDescriptor(string, LocalizableString, LocalizableString, string, DiagnosticSeverity, bool, LocalizableString, string, string[])"/>.
Diagnostic\DiagnosticInfo.cs (1)
93return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity,
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
1504return new DiagnosticDescriptor(
SourceGeneration\GeneratorDriver.cs (1)
611var descriptor = new DiagnosticDescriptor(
Microsoft.CodeAnalysis.Analyzers (62)
FixAnalyzers\FixerWithFixAllAnalyzer.cs (3)
38internal static readonly DiagnosticDescriptor CreateCodeActionEquivalenceKeyRule = new( 48internal static readonly DiagnosticDescriptor OverrideCodeActionEquivalenceKeyRule = new( 58internal static readonly DiagnosticDescriptor OverrideGetFixAllProviderRule = new(
ImmutableObjectMethodAnalyzer.cs (1)
24public static readonly DiagnosticDescriptor DoNotIgnoreReturnValueDiagnosticRule = new(
ImplementationIsObsoleteAnalyzer.cs (1)
22public static readonly DiagnosticDescriptor Rule = new(
InternalImplementationOnlyAnalyzer.cs (1)
25public static readonly DiagnosticDescriptor Rule = new(
MetaAnalyzers\ClassIsNotDiagnosticAnalyzer.cs (1)
20public static readonly DiagnosticDescriptor Rule = new(
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (3)
40private static readonly DiagnosticDescriptor s_equalityRule = new( 50private static readonly DiagnosticDescriptor s_getHashCodeRule = new( 60private static readonly DiagnosticDescriptor s_collectionRule = new(
MetaAnalyzers\CompilerExtensionStrictApiAnalyzer.cs (3)
27public static readonly DiagnosticDescriptor DoNotDeclareCompilerFeatureInAssemblyWithWorkspacesReferenceStrictRule = new( 38public static readonly DiagnosticDescriptor DoNotDeclareCSharpCompilerFeatureInAssemblyWithVisualBasicReferenceStrictRule = new( 49public static readonly DiagnosticDescriptor DoNotDeclareVisualBasicCompilerFeatureInAssemblyWithCSharpReferenceStrictRule = new(
MetaAnalyzers\CompilerExtensionTargetFrameworkAnalyzer.cs (1)
25public static readonly DiagnosticDescriptor DoNotDeclareCompilerFeatureInAssemblyWithUnsupportedTargetFrameworkStrictRule = new(
MetaAnalyzers\ConfigureGeneratedCodeAnalysisAnalyzer.cs (1)
22public static readonly DiagnosticDescriptor Rule = new(
MetaAnalyzers\DiagnosticAnalyzerAPIUsageAnalyzer.cs (2)
38public static readonly DiagnosticDescriptor DoNotUseTypesFromAssemblyDirectRule = new( 49public static readonly DiagnosticDescriptor DoNotUseTypesFromAssemblyIndirectRule = new(
MetaAnalyzers\DiagnosticAnalyzerAttributeAnalyzer.cs (2)
23public static readonly DiagnosticDescriptor MissingDiagnosticAnalyzerAttributeRule = new( 33public static readonly DiagnosticDescriptor AddLanguageSupportToAnalyzerRule = new(
MetaAnalyzers\DiagnosticAnalyzerFieldsAnalyzer.cs (1)
39public static readonly DiagnosticDescriptor DoNotStorePerCompilationDataOntoFieldsRule = new(
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (3)
35public static readonly DiagnosticDescriptor DiagnosticIdMustBeInSpecifiedFormatRule = new( 45public static readonly DiagnosticDescriptor UseCategoriesFromSpecifiedRangeRule = new( 55public static readonly DiagnosticDescriptor AnalyzerCategoryAndIdRangeFileInvalidRule = new(
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ReleaseTracking.cs (12)
33internal static readonly DiagnosticDescriptor DeclareDiagnosticIdInAnalyzerReleaseRule = new( 44internal static readonly DiagnosticDescriptor UpdateDiagnosticIdInAnalyzerReleaseRule = new( 55internal static readonly DiagnosticDescriptor RemoveUnshippedDeletedDiagnosticIdRule = new( 66internal static readonly DiagnosticDescriptor RemoveShippedDeletedDiagnosticIdRule = new( 77internal static readonly DiagnosticDescriptor UnexpectedAnalyzerDiagnosticForRemovedDiagnosticIdRule = new( 88internal static readonly DiagnosticDescriptor RemoveDuplicateEntriesForAnalyzerReleaseRule = new( 99internal static readonly DiagnosticDescriptor RemoveDuplicateEntriesBetweenAnalyzerReleasesRule = new( 110internal static readonly DiagnosticDescriptor InvalidEntryInAnalyzerReleasesFileRule = new( 121internal static readonly DiagnosticDescriptor InvalidHeaderInAnalyzerReleasesFileRule = new( 132internal static readonly DiagnosticDescriptor InvalidUndetectedEntryInAnalyzerReleasesFileRule = new( 143internal static readonly DiagnosticDescriptor InvalidRemovedOrChangedWithoutPriorNewEntryInAnalyzerReleasesFileRule = new( 154internal static readonly DiagnosticDescriptor EnableAnalyzerReleaseTrackingRule = new(
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (10)
80public static readonly DiagnosticDescriptor UseLocalizableStringsInDescriptorRule = new( 90public static readonly DiagnosticDescriptor ProvideHelpUriInDescriptorRule = new( 100public static readonly DiagnosticDescriptor DiagnosticIdMustBeAConstantRule = new( 110public static readonly DiagnosticDescriptor UseUniqueDiagnosticIdRule = new( 120public static readonly DiagnosticDescriptor ProvideCustomTagsInDescriptorRule = new( 130public static readonly DiagnosticDescriptor DoNotUseReservedDiagnosticIdRule = new( 140public static readonly DiagnosticDescriptor DefineDiagnosticTitleCorrectlyRule = new( 149public static readonly DiagnosticDescriptor DefineDiagnosticMessageCorrectlyRule = new( 158public static readonly DiagnosticDescriptor DefineDiagnosticDescriptionCorrectlyRule = new( 167public static readonly DiagnosticDescriptor AddCompilationEndCustomTagRule = new(
MetaAnalyzers\DoNotUseCompilationGetSemanticModelAnalyzer.cs (1)
22public static readonly DiagnosticDescriptor Rule = new(
MetaAnalyzers\DoNotUseFileTypesForAnalyzersOrGenerators.cs (1)
17private static readonly DiagnosticDescriptor Rule = new(
MetaAnalyzers\EnableConcurrentExecutionAnalyzer.cs (1)
22public static readonly DiagnosticDescriptor Rule = new(
MetaAnalyzers\PreferIsKindAnalyzer.cs (1)
22internal static readonly DiagnosticDescriptor Rule = new(
MetaAnalyzers\RegisterActionAnalyzer.cs (7)
36public static readonly DiagnosticDescriptor MissingSymbolKindArgumentRule = new( 46public static readonly DiagnosticDescriptor MissingSyntaxKindArgumentRule = new( 56public static readonly DiagnosticDescriptor MissingOperationKindArgumentRule = new( 66public static readonly DiagnosticDescriptor UnsupportedSymbolKindArgumentRule = new( 75public static readonly DiagnosticDescriptor InvalidSyntaxKindTypeArgumentRule = new( 87public static readonly DiagnosticDescriptor StartActionWithNoRegisteredActionsRule = new( 97public static readonly DiagnosticDescriptor StartActionWithOnlyEndActionRule = new(
MetaAnalyzers\ReportDiagnosticAnalyzer.cs (1)
28public static readonly DiagnosticDescriptor InvalidReportDiagnosticRule = new(
MetaAnalyzers\SymbolIsBannedInAnalyzersAnalyzer.cs (2)
20public static readonly DiagnosticDescriptor SymbolIsBannedRule = new( 31public static readonly DiagnosticDescriptor NoSettingSpecifiedSymbolIsBannedRule = new(
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
182rule = new DiagnosticDescriptor(rule.Id, rule.Title, rule.MessageFormat, rule.Category,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
262return new DiagnosticDescriptor(descriptor.Id, descriptor.Title, messageFormat,
UpgradeMSBuildWorkspaceAnalyzer.cs (1)
25public static readonly DiagnosticDescriptor UpgradeMSBuildWorkspaceDiagnosticRule = new(
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
182rule = new DiagnosticDescriptor(rule.Id, rule.Title, rule.MessageFormat, rule.Category,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
35private static readonly DiagnosticDescriptor s_dummyDataflowAnalysisDescriptor = new(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
262return new DiagnosticDescriptor(descriptor.Id, descriptor.Title, messageFormat,
Microsoft.CodeAnalysis.CodeStyle (5)
src\roslyn\src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
59=> new(
src\roslyn\src\Analyzers\Core\Analyzers\AbstractCodeQualityDiagnosticAnalyzer.cs (1)
51=> new(
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
34private static readonly DiagnosticDescriptor s_enableGenerateDocumentationFileIdDescriptor = new(
src\roslyn\src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
34private static readonly DiagnosticDescriptor Rule = new(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
262return new DiagnosticDescriptor(descriptor.Id, descriptor.Title, messageFormat,
Microsoft.CodeAnalysis.CSharp.Analyzers (2)
MetaAnalyzers\CSharpSemanticModelGetDeclaredSymbolAlwaysReturnsNullAnalyzer.cs (2)
21internal static readonly DiagnosticDescriptor DiagnosticDescriptor = new( 32internal static readonly DiagnosticDescriptor FieldDiagnosticDescriptor = new(
Microsoft.CodeAnalysis.Features (8)
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (1)
50return new DiagnosticDescriptor(
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
35var descriptor = new DiagnosticDescriptor(AnalyzerExceptionDiagnosticId,
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (2)
60builder[index] = new DiagnosticDescriptor( 237s_lazyModuleDiagnosticDescriptors.Add(status, descriptor = new DiagnosticDescriptor(
src\roslyn\src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
59=> new(
src\roslyn\src\Analyzers\Core\Analyzers\AbstractCodeQualityDiagnosticAnalyzer.cs (1)
51=> new(
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
34private static readonly DiagnosticDescriptor s_enableGenerateDocumentationFileIdDescriptor = new(
src\roslyn\src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
34private static readonly DiagnosticDescriptor Rule = new(
Microsoft.CodeAnalysis.NetAnalyzers (3)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\DiagnosticDescriptorHelper.cs (1)
50return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, enabledByDefault, description, helpLink, customTags);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
196rule = new DiagnosticDescriptor(rule.Id, rule.Title, rule.MessageFormat, rule.Category,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
32private static readonly DiagnosticDescriptor s_dummyDataflowAnalysisDescriptor = new(
Microsoft.CodeAnalysis.Razor.Compiler (2)
SourceGenerators\Diagnostics\RazorDiagnostics.cs (2)
94var descriptor = new DiagnosticDescriptor( 132return new DiagnosticDescriptor(
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
182rule = new DiagnosticDescriptor(rule.Id, rule.Title, rule.MessageFormat, rule.Category,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
262return new DiagnosticDescriptor(descriptor.Id, descriptor.Title, messageFormat,
Microsoft.CodeAnalysis.Workspaces (3)
Diagnostics\DiagnosticDescriptorData.cs (1)
59return new DiagnosticDescriptor(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
262return new DiagnosticDescriptor(descriptor.Id, descriptor.Title, messageFormat,
Workspace\WorkspaceDiagnosticDescriptors.cs (1)
15ErrorReadingFileContent = new DiagnosticDescriptor(
Microsoft.DotNet.CodeAnalysis (6)
Analyzers\AppContextDefaultsAnalyzer.cs (3)
27new DiagnosticDescriptor(DiagnosticIds.BCL0010.ToString(), s_title, CreateDiagnosticMessage(s_defaultValueNotInitializedToTrue, DiagnosticIds.BCL0010.ToString()), s_analyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: s_description); 30new DiagnosticDescriptor(DiagnosticIds.BCL0011.ToString(), s_title, CreateDiagnosticMessage(s_defaultValueInsideUnexpectedIfCondition, DiagnosticIds.BCL0011.ToString()), s_analyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: s_description); 33new 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)
26new DiagnosticDescriptor(DiagnosticIds.BCL0001.ToString(), s_title, s_messageFormat, s_analyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: s_description, customTags: WellKnownDiagnosticTags.CompilationEnd);
Analyzers\PinvokeAnalyzer.cs (1)
24private static DiagnosticDescriptor InvalidPinvokeCall = new DiagnosticDescriptor(DiagnosticIds.BCL0015.ToString(), Title, MessageFormat, AnalyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
Analyzers\ResourceUsageAnalyzer.cs (1)
19private static DiagnosticDescriptor InvalidSRFormatCall = new DiagnosticDescriptor(DiagnosticIds.BCL0020.ToString(), Title, "", AnalyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
Microsoft.Extensions.Configuration.Binder.SourceGeneration (1)
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
22return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, helpLink, customTags);
Microsoft.Extensions.Logging.Generators (1)
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
22return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, helpLink, customTags);
Microsoft.Extensions.Options.SourceGeneration (1)
DiagDescriptorsBase.cs (1)
21return new(
Microsoft.Gen.BuildMetadata (1)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
28return new(
Microsoft.Gen.ComplianceReports (1)
ComplianceReportsGenerator.cs (1)
92var diagnostic = new DiagnosticDescriptor(
Microsoft.Gen.ContextualOptions (1)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
28return new(
Microsoft.Gen.Logging (1)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
28return new(
Microsoft.Gen.MetadataExtractor (4)
MetadataReportsGenerator.cs (1)
81var diagnostic = new DiagnosticDescriptor(
src\Generators\Microsoft.Gen.ComplianceReports\ComplianceReportsGenerator.cs (1)
92var diagnostic = new DiagnosticDescriptor(
src\Generators\Microsoft.Gen.MetricsReports\MetricsReportsGenerator.cs (1)
56var diagnostic = new DiagnosticDescriptor(
src\Generators\Shared\DiagDescriptorsBase.cs (1)
28return new(
Microsoft.Gen.Metrics (1)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
28return new(
Microsoft.Gen.MetricsReports (2)
MetricsReportsGenerator.cs (1)
56var diagnostic = new DiagnosticDescriptor(
src\Generators\Shared\DiagDescriptorsBase.cs (1)
28return new(
Microsoft.Interop.ComInterfaceGenerator (3)
GeneratorDiagnostics.cs (2)
544new DiagnosticDescriptor( 555new DiagnosticDescriptor(
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
22return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, helpLink, customTags);
Microsoft.Interop.JavaScript.JSImportGenerator (1)
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
22return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, helpLink, customTags);
Microsoft.Interop.LibraryImportGenerator (2)
GeneratorDiagnostics.cs (1)
259new DiagnosticDescriptor(
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
22return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, helpLink, customTags);
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
GeneratorDiagnostics.cs (1)
259new DiagnosticDescriptor(
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
22return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, helpLink, customTags);
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.Maui.Controls.SourceGen (1)
Descriptors.cs (1)
8 public static DiagnosticDescriptor XamlParserError = new DiagnosticDescriptor(
Microsoft.ML.CodeAnalyzer.Tests (1)
Code\RelaxTestNamingTest.cs (1)
107public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(RelaxTestNamingSuppressor.Rule.SuppressedDiagnosticId, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
Microsoft.ML.InternalCodeAnalyzer (13)
BaseTestClassAnalyzer.cs (1)
25new DiagnosticDescriptor(DiagnosticId, Title, Format, Category,
BestFriendAnalyzer.cs (1)
30new DiagnosticDescriptor(DiagnosticId, Title, Format, Category,
BestFriendOnPublicDeclarationsAnalyzer.cs (1)
26new DiagnosticDescriptor(DiagnosticId, Title, Format, Category,
ContractsCheckAnalyzer.cs (4)
33new DiagnosticDescriptor(Id, Title, Format, Category, 47new DiagnosticDescriptor(Id, Title, Format, Category, 58new DiagnosticDescriptor(Id, Title, Format, Category, 70new DiagnosticDescriptor(Id, Title, Format, Category,
InstanceInitializerAnalyzer.cs (1)
24new DiagnosticDescriptor(DiagnosticId, Title, Format, Category,
NameAnalyzer.cs (2)
54new DiagnosticDescriptor(Id, Title, Format, Category, 67new DiagnosticDescriptor(Id, Title, Format, Category,
ParameterVariableNameAnalyzer.cs (1)
26new DiagnosticDescriptor(Id, Title, Format, Category,
SingleVariableDeclarationAnalyzer.cs (1)
26new DiagnosticDescriptor(DiagnosticId, Title, Format, Category,
TypeParamNameAnalyzer.cs (1)
25new DiagnosticDescriptor(Id, Title, Format, Category,
Roslyn.Diagnostics.Analyzers (25)
AbstractDoNotCopyValue.cs (9)
31internal static readonly DiagnosticDescriptor Rule = new( 42internal static readonly DiagnosticDescriptor UnsupportedUseRule = new( 53internal static readonly DiagnosticDescriptor AvoidNullableWrapperRule = new( 64internal static readonly DiagnosticDescriptor NoAssignValueFromReferenceRule = new( 75internal static readonly DiagnosticDescriptor NoReturnValueFromReferenceRule = new( 86internal static readonly DiagnosticDescriptor NoBoxingRule = new( 97internal static readonly DiagnosticDescriptor NoUnboxingRule = new( 108internal static readonly DiagnosticDescriptor NoFieldOfCopyableTypeRule = new( 119internal static readonly DiagnosticDescriptor NoAutoPropertyRule = new(
DefaultableTypeShouldHaveDefaultableFieldsAnalyzer.cs (1)
26internal static readonly DiagnosticDescriptor Rule = new(
DoNotCallGetTestAccessor.cs (1)
23internal static readonly DiagnosticDescriptor DoNotCallGetTestAccessorRule = new(
DoNotMixAttributesFromDifferentVersionsOfMEF.cs (1)
26internal static readonly DiagnosticDescriptor Rule = new(
ExportedPartsShouldHaveImportingConstructor.cs (1)
29internal static readonly DiagnosticDescriptor Rule = new(
ImmutableArrayBoxingAnalyzer.cs (1)
25internal static readonly DiagnosticDescriptor Rule = new(
ImportingConstructorShouldBeObsolete.cs (1)
31internal static readonly DiagnosticDescriptor Rule = new(
IRemoteJsonServiceParameterAnalyzer.cs (1)
24internal static readonly DiagnosticDescriptor Rule = new(
PartsExportedWithMEFv2MustBeMarkedAsShared.cs (1)
24internal static readonly DiagnosticDescriptor Rule = new(
PooledArrayBuilderAsRefAnalyzer.cs (1)
25internal static readonly DiagnosticDescriptor Rule = new(
SpecializedEnumerableCreationAnalyzer.cs (2)
33internal static readonly DiagnosticDescriptor UseEmptyEnumerableRule = new( 42internal static readonly DiagnosticDescriptor UseSingletonEnumerableRule = new(
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
182rule = new DiagnosticDescriptor(rule.Id, rule.Title, rule.MessageFormat, rule.Category,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
262return new DiagnosticDescriptor(descriptor.Id, descriptor.Title, messageFormat,
SymbolDeclaredEventMustBeGeneratedForSourceSymbols.cs (1)
33internal static readonly DiagnosticDescriptor SymbolDeclaredEventRule = new(
TemporaryArrayAsRefAnalyzer.cs (1)
23internal static readonly DiagnosticDescriptor Rule = new(
TestExportsShouldNotBeDiscoverable.cs (1)
29internal static readonly DiagnosticDescriptor Rule = new(
Roslyn.Diagnostics.CSharp.Analyzers (4)
CSharpAvoidOptSuffixForNullableEnableCode.cs (1)
30internal static readonly DiagnosticDescriptor Rule = new(
CSharpDoNotCapturePrimaryContructorParameters.cs (1)
19private static readonly DiagnosticDescriptor Rule = new(
CSharpDoNotUseDebugAssertForInterpolatedStrings.cs (1)
20internal static readonly DiagnosticDescriptor Rule = new(
PreferNullLiteral.cs (1)
22internal static readonly DiagnosticDescriptor Rule = new(
System.Private.CoreLib.Generators (4)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (4)
34private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description); 38private static readonly DiagnosticDescriptor RuleHelper = new DiagnosticDescriptor(DiagnosticIdHelper, Title, MessageHelperFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description); 42private static readonly DiagnosticDescriptor RuleCantParse = new DiagnosticDescriptor(DiagnosticIdConditionParsing, Title, MessageNonParseableConditionFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description); 46private static readonly DiagnosticDescriptor RuleAttributeNotSpecificEnough = new DiagnosticDescriptor(DiagnosticIdAttributeNotSpecificEnough, Title, MessageAttributeNotSpecificEnoughFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description);
System.Text.Json.SourceGeneration (1)
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
22return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, helpLink, customTags);
System.Text.RegularExpressions.Generator (1)
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
22return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, helpLink, customTags);
System.Windows.Forms.Analyzers (1)
System\Windows\Forms\Analyzers\Diagnostics\DiagnosticDescriptorHelper.cs (1)
18params string[] customTags) => new DiagnosticDescriptor(
2757 references to DiagnosticDescriptor
Aspire.Hosting.Analyzers (3)
AppHostAnalyzer.cs (1)
18public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => Diagnostics.SupportedDiagnostics;
AppHostAnalyzer.Diagnostics.cs (2)
14internal static readonly DiagnosticDescriptor s_modelNameMustBeValid = new( 23public static readonly ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics = ImmutableArray.Create(
Aspire.Hosting.Analyzers.Tests (35)
AspireExportAnalyzerTests.cs (29)
69var diagnostic = AspireExportAnalyzer.Diagnostics.s_exportMethodMustBeStatic; 90var diagnostic = AspireExportAnalyzer.Diagnostics.s_invalidExportIdFormat; 111var diagnostic = AspireExportAnalyzer.Diagnostics.s_invalidExportIdFormat; 132var diagnostic = AspireExportAnalyzer.Diagnostics.s_returnTypeMustBeAtsCompatible; 154var diagnostic = AspireExportAnalyzer.Diagnostics.s_parameterTypeMustBeAtsCompatible; 273var diagnostic = AspireExportAnalyzer.Diagnostics.s_exportedSyncDelegateInvokedInline; 303var diagnostic = AspireExportAnalyzer.Diagnostics.s_exportedSyncDelegateInvokedInline; 333var diagnostic = AspireExportAnalyzer.Diagnostics.s_exportedSyncDelegateInvokedInline; 394var diagnostic = AspireExportAnalyzer.Diagnostics.s_exportedSyncDelegateInvokedInline; 456var diagnostic = AspireExportAnalyzer.Diagnostics.s_exportedSyncDelegateInvokedInline; 717var diagnostic = AspireExportAnalyzer.Diagnostics.s_parameterTypeMustBeAtsCompatible; 742var diagnostic = AspireExportAnalyzer.Diagnostics.s_unionRequiresAtLeastTwoTypes; 763var diagnostic = AspireExportAnalyzer.Diagnostics.s_unionRequiresAtLeastTwoTypes; 822var diagnostic = AspireExportAnalyzer.Diagnostics.s_unionTypeMustBeAtsCompatible; 844var diagnostic = AspireExportAnalyzer.Diagnostics.s_unionTypeMustBeAtsCompatible; 908var diagnostic = AspireExportAnalyzer.Diagnostics.s_duplicateExportId; 1071var diagnostic = AspireExportAnalyzer.Diagnostics.s_unionTypeMustBeAtsCompatible; 1100var diagnostic = AspireExportAnalyzer.Diagnostics.s_duplicateExportId; 1130var diagnostic = AspireExportAnalyzer.Diagnostics.s_duplicateExportId; 1163var asp011 = AspireExportAnalyzer.Diagnostics.s_unionRequiresAtLeastTwoTypes; 1164var asp012 = AspireExportAnalyzer.Diagnostics.s_unionTypeMustBeAtsCompatible; 1191var diagnostic = AspireExportAnalyzer.Diagnostics.s_missingExportAttribute; 1211var diagnostic = AspireExportAnalyzer.Diagnostics.s_missingExportAttribute; 1232var diagnostic = AspireExportAnalyzer.Diagnostics.s_missingExportAttribute; 1341var diagnostic = AspireExportAnalyzer.Diagnostics.s_missingExportAttribute; 1366var diagnostic = AspireExportAnalyzer.Diagnostics.s_missingExportAttribute; 1392var diagnostic = AspireExportAnalyzer.Diagnostics.s_missingExportAttribute; 1449var diagnostic = AspireExportAnalyzer.Diagnostics.s_exportNameShouldBeUnique; 1570var diagnostic = AspireExportAnalyzer.Diagnostics.s_exportNameShouldBeUnique;
CombinationsAnalyzerTests.cs (2)
19var diagnostic = AppHostAnalyzer.Diagnostics.s_modelNameMustBeValid; 54var diagnostic = AppHostAnalyzer.Diagnostics.s_modelNameMustBeValid;
EndpointNameAnalyzerTests.cs (2)
18var diagnostic = AppHostAnalyzer.Diagnostics.s_modelNameMustBeValid; 40var diagnostic = AppHostAnalyzer.Diagnostics.s_modelNameMustBeValid;
ResourceNameAnalyzerTests.cs (2)
18var diagnostic = AppHostAnalyzer.Diagnostics.s_modelNameMustBeValid; 39var diagnostic = AppHostAnalyzer.Diagnostics.s_modelNameMustBeValid;
Aspire.Hosting.Integration.Analyzers (12)
AspireExportAnalyzer.cs (1)
26public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => Diagnostics.SupportedDiagnostics;
AspireExportAnalyzer.Diagnostics.cs (11)
14internal static readonly DiagnosticDescriptor s_exportMethodMustBeStatic = new( 24internal static readonly DiagnosticDescriptor s_invalidExportIdFormat = new( 34internal static readonly DiagnosticDescriptor s_returnTypeMustBeAtsCompatible = new( 44internal static readonly DiagnosticDescriptor s_parameterTypeMustBeAtsCompatible = new( 54internal static readonly DiagnosticDescriptor s_unionRequiresAtLeastTwoTypes = new( 64internal static readonly DiagnosticDescriptor s_unionTypeMustBeAtsCompatible = new( 74internal static readonly DiagnosticDescriptor s_duplicateExportId = new( 85internal static readonly DiagnosticDescriptor s_missingExportAttribute = new( 95internal static readonly DiagnosticDescriptor s_exportNameShouldBeUnique = new( 105internal static readonly DiagnosticDescriptor s_exportedSyncDelegateInvokedInline = new( 114public static readonly ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics = ImmutableArray.Create(
CodeStyleConfigFileGenerator (6)
Program.cs (6)
52var allRulesById = new SortedList<string, DiagnosticDescriptor>(); 61foreach (var rule in analyzer.SupportedDiagnostics) 87SortedList<string, DiagnosticDescriptor> sortedRulesById) 96static string GetGlobalconfigText(AnalysisMode analysisMode, SortedList<string, DiagnosticDescriptor> sortedRulesById) 135bool AddRule(DiagnosticDescriptor rule) 158(bool isEnabledByDefault, DiagnosticSeverity effectiveSeverity) GetEnabledByDefaultAndSeverity(DiagnosticDescriptor rule, AnalysisMode analysisMode)
ConfigurationSchemaGenerator (24)
DiagnosticDescriptors.cs (14)
19public static DiagnosticDescriptor TypeNotSupported { get; } = CreateTypeNotSupportedDescriptor("TypeNotSupported"); 20public static DiagnosticDescriptor MissingPublicInstanceConstructor { get; } = CreateTypeNotSupportedDescriptor("MissingPublicInstanceConstructor"); 21public static DiagnosticDescriptor CollectionNotSupported { get; } = CreateTypeNotSupportedDescriptor("CollectionNotSupported"); 22public static DiagnosticDescriptor DictionaryKeyNotSupported { get; } = CreateTypeNotSupportedDescriptor("DictionaryKeyNotSupported"); 23public static DiagnosticDescriptor ElementTypeNotSupported { get; } = CreateTypeNotSupportedDescriptor("ElementTypeNotSupported"); 24public static DiagnosticDescriptor MultipleParameterizedConstructors { get; } = CreateTypeNotSupportedDescriptor("MultipleParameterizedConstructors"); 25public static DiagnosticDescriptor MultiDimArraysNotSupported { get; } = CreateTypeNotSupportedDescriptor("MultiDimArraysNotSupported"); 26public static DiagnosticDescriptor NullableUnderlyingTypeNotSupported { get; } = CreateTypeNotSupportedDescriptor("NullableUnderlyingTypeNotSupported"); 28public static DiagnosticDescriptor PropertyNotSupported { get; } = new DiagnosticDescriptor( 36public static DiagnosticDescriptor LanguageVersionNotSupported { get; } = DiagnosticDescriptorHelper.Create( 44public static DiagnosticDescriptor ValueTypesInvalidForBind { get; } = DiagnosticDescriptorHelper.Create( 52public static DiagnosticDescriptor CouldNotDetermineTypeInfo { get; } = DiagnosticDescriptorHelper.Create( 60private static DiagnosticDescriptor CreateTypeNotSupportedDescriptor(string nameofLocalizableMessageFormat) => 69public static DiagnosticDescriptor GetNotSupportedDescriptor(NotSupportedReason reason) =>
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (5)
159private TypeRef EnqueueTransitiveType(TypeParseInfo containingTypeParseInfo, ITypeSymbol memberTypeSymbol, DiagnosticDescriptor diagDescriptor, string? memberName = null) 597DiagnosticDescriptor? initDiagDescriptor = null; 895DiagnosticDescriptor descriptor = DiagnosticDescriptors.GetNotSupportedDescriptor(unsupportedTypeSpec.NotSupportedReason); 905private void RecordTypeDiagnostic(TypeParseInfo typeParseInfo, DiagnosticDescriptor descriptor) 929private void RecordDiagnostic(DiagnosticDescriptor descriptor, Location trimmedLocation, params object?[]? messageArgs)
RuntimeSource\Configuration.Binder\Parser\Extensions.cs (2)
37public TypeParseInfo ToTransitiveTypeParseInfo(ITypeSymbol memberType, DiagnosticDescriptor? diagDescriptor = null, string? memberName = null) 60public required DiagnosticDescriptor Descriptor { get; init; }
RuntimeSource\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
RuntimeSource\SourceGenerators\DiagnosticInfo.cs (2)
17public DiagnosticDescriptor Descriptor { get; private init; } 21public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, Location? location, object?[]? messageArgs)
dotnet-format (3)
Analyzers\AnalyzerOptionExtensions.cs (1)
34DiagnosticDescriptor descriptor,
Analyzers\Extensions.cs (2)
90foreach (var descriptor in analyzer.SupportedDiagnostics) 127DiagnosticDescriptor descriptor,
GenerateDocumentationAndConfigFiles (93)
Program.cs (20)
267var allRulesById = new SortedList<string, DiagnosticDescriptor>(); 270var rulesMetadata = new SortedList<string, (string path, SortedList<string, (DiagnosticDescriptor rule, string typeName, string[]? languages)> rules)>(); 285var assemblyRulesMetadata = (path, rules: new SortedList<string, (DiagnosticDescriptor rule, string typeName, string[]? languages)>()); 291foreach (var rule in analyzer.SupportedDiagnostics) 556DiagnosticDescriptor descriptor = ruleById.Value; 671var descriptor = rule.Value.rule; 795DiagnosticDescriptor descriptor = ruleById.Value; 1094SortedList<string, DiagnosticDescriptor> sortedRulesById, 1140static void addRuleEntry(StringBuilder result, DiagnosticDescriptor rule, string severity) 1160SortedList<string, DiagnosticDescriptor> sortedRulesById) 1208static void addRuleEntry(StringBuilder result, DiagnosticDescriptor rule, string severity) 1222Action<StringBuilder, DiagnosticDescriptor, string> addRuleEntry, 1228SortedList<string, DiagnosticDescriptor> sortedRulesById) 1273void addRule(DiagnosticDescriptor rule) 1284bool shouldSkipRule(DiagnosticDescriptor rule) 1315string getRuleAction(DiagnosticDescriptor rule) 1385SortedList<string, DiagnosticDescriptor> sortedRulesById, 1412SortedList<string, DiagnosticDescriptor> sortedRulesById, 1455bool AddRule(DiagnosticDescriptor rule, string? category) 1485(bool isEnabledByDefault, DiagnosticSeverity effectiveSeverity) GetEnabledByDefaultAndSeverity(DiagnosticDescriptor rule, AnalysisMode analysisMode)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (16)
20DiagnosticDescriptor rule, 26DiagnosticDescriptor rule, 33DiagnosticDescriptor rule, 47DiagnosticDescriptor rule, 53DiagnosticDescriptor rule, 62DiagnosticDescriptor rule, 72DiagnosticDescriptor rule, 80DiagnosticDescriptor rule, 88DiagnosticDescriptor rule, 97DiagnosticDescriptor rule, 107DiagnosticDescriptor rule, 114DiagnosticDescriptor rule, 134DiagnosticDescriptor rule, 142DiagnosticDescriptor rule, 161DiagnosticDescriptor rule, 167DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (4)
31public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 48public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 67public bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, out T value) 93private (bool found, object? value) ComputeOptionValue<T, TArg>(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (3)
82public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 100public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 110private bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, [MaybeNullWhen(false)] out T value)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (37)
47DiagnosticDescriptor rule, 57DiagnosticDescriptor rule, 65DiagnosticDescriptor rule, 75DiagnosticDescriptor rule, 83DiagnosticDescriptor rule, 93DiagnosticDescriptor rule, 101DiagnosticDescriptor rule, 108DiagnosticDescriptor rule, 116DiagnosticDescriptor rule, 126DiagnosticDescriptor rule, 135DiagnosticDescriptor rule, 151DiagnosticDescriptor rule, 178DiagnosticDescriptor rule, 188DiagnosticDescriptor rule, 199DiagnosticDescriptor? rule, 211DiagnosticDescriptor rule, 223DiagnosticDescriptor rule, 239DiagnosticDescriptor rule, 246DiagnosticDescriptor rule, 253DiagnosticDescriptor rule, 260DiagnosticDescriptor rule, 297DiagnosticDescriptor rule, 306DiagnosticDescriptor rule, 316DiagnosticDescriptor rule, 323DiagnosticDescriptor rule, 330DiagnosticDescriptor rule, 337DiagnosticDescriptor rule, 379DiagnosticDescriptor rule, 386DiagnosticDescriptor rule, 425DiagnosticDescriptor rule, 433DiagnosticDescriptor rule, 440DiagnosticDescriptor rule, 447DiagnosticDescriptor rule, 455DiagnosticDescriptor rule, 577DiagnosticDescriptor rule, 592DiagnosticDescriptor rule, 611DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\ICategorizedAnalyzerConfigOptions.cs (2)
51T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality); 53T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (10)
23public static ImmutableArray<string> ImmutableCustomTags(this DiagnosticDescriptor descriptor) 35this DiagnosticDescriptor descriptor, 64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions) 97public static bool IsDefinedInEditorConfig(this DiagnosticDescriptor descriptor, AnalyzerConfigOptions analyzerConfigOptions) 146this DiagnosticDescriptor descriptor, 215DiagnosticDescriptor descriptor, 251public static bool IsCompilationEnd(this DiagnosticDescriptor descriptor) 255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 259public static DiagnosticDescriptor WithMessageFormat(this DiagnosticDescriptor descriptor, LocalizableString messageFormat)
ILLink.CodeFixProvider (6)
DynamicallyAccessedMembersCodeFixProvider.cs (3)
25private static ImmutableArray<DiagnosticDescriptor> GetSupportedDiagnostics() 28var diagDescriptorsArrayBuilder = ImmutableArray.CreateBuilder<DiagnosticDescriptor>(); 62public static ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => GetSupportedDiagnostics();
RequiresAssemblyFilesCodeFixProvider.cs (1)
20public static ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
RequiresDynamicCodeCodeFixProvider.cs (1)
20public static ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresDynamicCode));
RequiresUnreferencedCodeCodeFixProvider.cs (1)
20public static ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresUnreferencedCode));
ILLink.RoslynAnalyzer (48)
COMAnalyzer.cs (2)
22private static readonly DiagnosticDescriptor s_correctnessOfCOMCannotBeGuaranteed = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.CorrectnessOfCOMCannotBeGuaranteed, 25public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_correctnessOfCOMCannotBeGuaranteed);
DiagnosticDescriptors.cs (3)
11public static DiagnosticDescriptor GetDiagnosticDescriptor(DiagnosticId diagnosticId) 23public static DiagnosticDescriptor GetDiagnosticDescriptor(DiagnosticId diagnosticId, DiagnosticString diagnosticString) 32public static DiagnosticDescriptor GetDiagnosticDescriptor(DiagnosticId diagnosticId,
DynamicallyAccessedMembersAnalyzer.cs (4)
37public static ImmutableArray<DiagnosticDescriptor> GetSupportedDiagnostics() 39var diagDescriptorsArrayBuilder = ImmutableArray.CreateBuilder<DiagnosticDescriptor>(27); 73foreach (var diagnosticDescriptor in requiresAnalyzer.SupportedDiagnostics) 91public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => GetSupportedDiagnostics();
RequiresAnalyzerBase.cs (5)
30private protected abstract DiagnosticDescriptor RequiresDiagnosticRule { get; } 34private protected abstract DiagnosticDescriptor RequiresAttributeMismatch { get; } 35private protected abstract DiagnosticDescriptor RequiresOnStaticCtor { get; } 36private protected abstract DiagnosticDescriptor RequiresOnEntryPoint { get; } 417DiagnosticDescriptor diagnosticDescriptor)
RequiresAssemblyFilesAnalyzer.cs (11)
22private static readonly DiagnosticDescriptor s_locationRule = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.AvoidAssemblyLocationInSingleFile, 25private static readonly DiagnosticDescriptor s_getFilesRule = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.AvoidAssemblyGetFilesInSingleFile, 28private static readonly DiagnosticDescriptor s_requiresAssemblyFilesRule = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresAssemblyFiles, 31private static readonly DiagnosticDescriptor s_requiresAssemblyFilesAttributeMismatch = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresAssemblyFilesAttributeMismatch); 33private static readonly DiagnosticDescriptor s_requiresAssemblyFilesOnStaticCtor = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresAssemblyFilesOnStaticConstructor); 35private static readonly DiagnosticDescriptor s_requiresAssemblyFilesOnEntryPoint = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresAssemblyFilesOnEntryPoint); 37public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_locationRule, s_getFilesRule, s_requiresAssemblyFilesRule, s_requiresAssemblyFilesAttributeMismatch, s_requiresAssemblyFilesOnStaticCtor, s_requiresAssemblyFilesOnEntryPoint); 45private protected override DiagnosticDescriptor RequiresDiagnosticRule => s_requiresAssemblyFilesRule; 49private protected override DiagnosticDescriptor RequiresAttributeMismatch => s_requiresAssemblyFilesAttributeMismatch; 51private protected override DiagnosticDescriptor RequiresOnStaticCtor => s_requiresAssemblyFilesOnStaticCtor; 53private protected override DiagnosticDescriptor RequiresOnEntryPoint => s_requiresAssemblyFilesOnEntryPoint;
RequiresDynamicCodeAnalyzer.cs (10)
22private static readonly DiagnosticDescriptor s_requiresDynamicCodeOnStaticCtor = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresDynamicCodeOnStaticConstructor); 23private static readonly DiagnosticDescriptor s_requiresDynamicCodeOnEntryPoint = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresDynamicCodeOnEntryPoint); 24private static readonly DiagnosticDescriptor s_requiresDynamicCodeRule = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresDynamicCode); 25private static readonly DiagnosticDescriptor s_requiresDynamicCodeAttributeMismatch = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresDynamicCodeAttributeMismatch); 26private static readonly DiagnosticDescriptor s_referenceNotMarkedIsAotCompatibleRule = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.ReferenceNotMarkedIsAotCompatible); 28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 37private protected override DiagnosticDescriptor RequiresDiagnosticRule => s_requiresDynamicCodeRule; 41private protected override DiagnosticDescriptor RequiresAttributeMismatch => s_requiresDynamicCodeAttributeMismatch; 43private protected override DiagnosticDescriptor RequiresOnStaticCtor => s_requiresDynamicCodeOnStaticCtor; 45private protected override DiagnosticDescriptor RequiresOnEntryPoint => s_requiresDynamicCodeOnEntryPoint;
RequiresUnreferencedCodeAnalyzer.cs (13)
25private static readonly DiagnosticDescriptor s_requiresUnreferencedCodeRule = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresUnreferencedCode); 26private static readonly DiagnosticDescriptor s_requiresUnreferencedCodeAttributeMismatch = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresUnreferencedCodeAttributeMismatch); 27private static readonly DiagnosticDescriptor s_makeGenericTypeRule = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.MakeGenericType); 28private static readonly DiagnosticDescriptor s_makeGenericMethodRule = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.MakeGenericMethod); 29private static readonly DiagnosticDescriptor s_requiresUnreferencedCodeOnStaticCtor = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresUnreferencedCodeOnStaticConstructor); 30private static readonly DiagnosticDescriptor s_requiresUnreferencedCodeOnEntryPoint = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.RequiresUnreferencedCodeOnEntryPoint); 32private static readonly DiagnosticDescriptor s_referenceNotMarkedIsTrimmableRule = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.ReferenceNotMarkedIsTrimmable); 34private static readonly DiagnosticDescriptor s_dynamicallyAccessedMembersMismatchTypeArgumentTargetsGenericParameterRule = DiagnosticDescriptors.GetDiagnosticDescriptor(DiagnosticId.DynamicallyAccessedMembersMismatchTypeArgumentTargetsGenericParameter); 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 45private protected override DiagnosticDescriptor RequiresDiagnosticRule => s_requiresUnreferencedCodeRule; 49private protected override DiagnosticDescriptor RequiresAttributeMismatch => s_requiresUnreferencedCodeAttributeMismatch; 51private protected override DiagnosticDescriptor RequiresOnStaticCtor => s_requiresUnreferencedCodeOnStaticCtor; 53private protected override DiagnosticDescriptor RequiresOnEntryPoint => s_requiresUnreferencedCodeOnEntryPoint;
Microsoft.Analyzers.Extra (22)
AsyncCallInsideUsingBlockAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
AsyncMethodWithoutCancellation.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
CallAnalysis\CallAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
CoalesceAnalyzer.cs (1)
18public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagDescriptors.CoalesceAssignment, DiagDescriptors.Coalesce);
ConditionalAccessAnalyzer.cs (1)
18public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagDescriptors.ConditionalAccess);
DiagDescriptors.cs (15)
19public static DiagnosticDescriptor LegacyLogging { get; } = Make( 27public static DiagnosticDescriptor UsingToStringInLoggers { get; } = Make( 35public static DiagnosticDescriptor StaticTime { get; } = Make( 43public static DiagnosticDescriptor StartsEndsWith { get; } = Make( 51public static DiagnosticDescriptor MakeExeTypesInternal { get; } = Make( 59public static DiagnosticDescriptor Arrays { get; } = Make( 67public static DiagnosticDescriptor ValueTuple { get; } = Make( 75public static DiagnosticDescriptor LegacyCollection { get; } = Make( 83public static DiagnosticDescriptor Split { get; } = Make( 91public static DiagnosticDescriptor AsyncCallInsideUsingBlock { get; } = Make( 99public static DiagnosticDescriptor ConditionalAccess { get; } = Make( 107public static DiagnosticDescriptor CoalesceAssignment { get; } = Make( 115public static DiagnosticDescriptor Coalesce { get; } = Make( 123public static DiagnosticDescriptor AsyncMethodWithoutCancellation { get; } = Make( 131private static DiagnosticDescriptor Make(string id, string title, string description, string messageFormat, string category, DiagnosticSeverity defaultSeverity)
MakeExeTypesInternalAnalyzer.cs (1)
50public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagDescriptors.MakeExeTypesInternal);
UsingToStringInLoggersAnalyzer.cs (1)
17public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagDescriptors.UsingToStringInLoggers);
Microsoft.Analyzers.Extra.Tests (3)
Resources\RoslynTestUtils.cs (3)
137public static void AssertDiagnostic(this string text, int spanNum, DiagnosticDescriptor expected, Diagnostic actual) 153public static IList<Diagnostic> FilterDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 158foreach (var f in filter)
Microsoft.Analyzers.Local (14)
ApiLifecycle\ApiLifecycleAnalyzer.cs (1)
19public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
CallAnalysis\CallAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
DiagDescriptors.cs (10)
42public static DiagnosticDescriptor ThrowsExpression { get; } = Make( 50public static DiagnosticDescriptor ThrowsStatement { get; } = Make( 58public static DiagnosticDescriptor ToInvariantString { get; } = Make( 66public static DiagnosticDescriptor NewSymbolsMustBeMarkedExperimental { get; } = Make( 74public static DiagnosticDescriptor ExperimentalSymbolsCantBeMarkedObsolete { get; } = Make( 82public static DiagnosticDescriptor PublishedSymbolsCantBeMarkedExperimental { get; } = Make( 90public static DiagnosticDescriptor PublishedSymbolsCantBeDeleted { get; } = Make( 98public static DiagnosticDescriptor PublishedSymbolsCantChange { get; } = Make( 106public static DiagnosticDescriptor InternalReferencedInPublicDoc { get; } = Make( 114private static DiagnosticDescriptor Make(string id, string title, string description, string messageFormat, string category, DiagnosticSeverity defaultSeverity)
InternalReferencedInPublicDocAnalyzer.cs (2)
21private static readonly ImmutableArray<DiagnosticDescriptor> _supportedDiagnostics = ImmutableArray.Create(DiagDescriptors.InternalReferencedInPublicDoc); 101public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => _supportedDiagnostics;
Microsoft.Analyzers.Local.Tests (4)
ApiLifecycle\ApiLifecycleAnalyzerTest.cs (1)
28string testAssemblyName, DiagnosticDescriptor descriptor, string source)
Resources\RoslynTestUtils.cs (3)
137public static void AssertDiagnostic(this string text, int spanNum, DiagnosticDescriptor expected, Diagnostic actual) 153public static IList<Diagnostic> FilterDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 158foreach (var f in filter)
Microsoft.AspNetCore.Analyzers (6)
StartupAnalyzer.cs (1)
15public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => Diagnostics.SupportedDiagnostics;
StartupAnalyzer.Diagnostics.cs (5)
15internal static readonly DiagnosticDescriptor BuildServiceProviderShouldNotCalledInConfigureServicesMethod = new DiagnosticDescriptor( 24internal static readonly DiagnosticDescriptor UnsupportedUseMvcWithEndpointRouting = new DiagnosticDescriptor( 33internal static readonly DiagnosticDescriptor IncorrectlyConfiguredAuthorizationMiddleware = new DiagnosticDescriptor( 42public static readonly ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics = ImmutableArray.Create<DiagnosticDescriptor>(new[]
Microsoft.AspNetCore.App.Analyzers (39)
Authorization\AddAuthorizationBuilderAnalyzer.cs (1)
19public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.UseAddAuthorizationBuilder);
DiagnosticDescriptors.cs (27)
16internal static readonly DiagnosticDescriptor DoNotUseModelBindingAttributesOnRouteHandlerParameters = CreateDiagnosticDescriptor( 24internal static readonly DiagnosticDescriptor DoNotReturnActionResultsFromRouteHandlers = CreateDiagnosticDescriptor( 32internal static readonly DiagnosticDescriptor DetectMisplacedLambdaAttribute = CreateDiagnosticDescriptor( 40internal static readonly DiagnosticDescriptor DoNotUseNonLiteralSequenceNumbers = CreateDiagnosticDescriptor( 48internal static readonly DiagnosticDescriptor DetectMismatchedParameterOptionality = CreateDiagnosticDescriptor( 56internal static readonly DiagnosticDescriptor DoNotUseConfigureWebHostWithConfigureHostBuilder = CreateDiagnosticDescriptor( 64internal static readonly DiagnosticDescriptor DoNotUseConfigureWithConfigureWebHostBuilder = CreateDiagnosticDescriptor( 72internal static readonly DiagnosticDescriptor DoNotUseUseStartupWithConfigureWebHostBuilder = CreateDiagnosticDescriptor( 80internal static readonly DiagnosticDescriptor DoNotUseHostConfigureLogging = CreateDiagnosticDescriptor( 88internal static readonly DiagnosticDescriptor DoNotUseHostConfigureServices = CreateDiagnosticDescriptor( 96internal static readonly DiagnosticDescriptor DisallowConfigureAppConfigureHostBuilder = CreateDiagnosticDescriptor( 104internal static readonly DiagnosticDescriptor UseTopLevelRouteRegistrationsInsteadOfUseEndpoints = CreateDiagnosticDescriptor( 112internal static readonly DiagnosticDescriptor UseHeaderDictionaryPropertiesInsteadOfIndexer = CreateDiagnosticDescriptor( 120internal static readonly DiagnosticDescriptor DoNotReturnValueFromRequestDelegate = CreateDiagnosticDescriptor( 128internal static readonly DiagnosticDescriptor RoutePatternIssue = CreateDiagnosticDescriptor( 136internal static readonly DiagnosticDescriptor RoutePatternUnusedParameter = CreateDiagnosticDescriptor( 144internal static readonly DiagnosticDescriptor DoNotUseIHeaderDictionaryAdd = CreateDiagnosticDescriptor( 152internal static readonly DiagnosticDescriptor RouteParameterComplexTypeIsNotParsable = CreateDiagnosticDescriptor( 160internal static readonly DiagnosticDescriptor BindAsyncSignatureMustReturnValueTaskOfT = CreateDiagnosticDescriptor( 168internal static readonly DiagnosticDescriptor AmbiguousRouteHandlerRoute = CreateDiagnosticDescriptor( 176internal static readonly DiagnosticDescriptor AmbiguousActionRoute = CreateDiagnosticDescriptor( 184internal static readonly DiagnosticDescriptor AtMostOneFromBodyAttribute = CreateDiagnosticDescriptor( 192internal static readonly DiagnosticDescriptor UseAddAuthorizationBuilder = CreateDiagnosticDescriptor( 200internal static readonly DiagnosticDescriptor OverriddenAuthorizeAttribute = CreateDiagnosticDescriptor( 208internal static readonly DiagnosticDescriptor PublicPartialProgramClassNotRequired = CreateDiagnosticDescriptor( 217internal static readonly DiagnosticDescriptor KestrelShouldListenOnIPv6AnyInsteadOfIpAny = CreateDiagnosticDescriptor( 225private static DiagnosticDescriptor CreateDiagnosticDescriptor(
Http\HeaderDictionaryAddAnalyzer.cs (1)
17public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.DoNotUseIHeaderDictionaryAdd);
Http\HeaderDictionaryIndexerAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.UseHeaderDictionaryPropertiesInsteadOfIndexer);
Http\RequestDelegateReturnTypeAnalyzer.cs (1)
17public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.DoNotReturnValueFromRequestDelegate);
Kestrel\ListenOnIPv6AnyAnalyzer.cs (1)
17public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => [ DiagnosticDescriptors.KestrelShouldListenOnIPv6AnyInsteadOfIpAny ];
Mvc\MvcAnalyzer.cs (1)
24public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
RenderTreeBuilder\RenderTreeBuilderAnalyzer.cs (1)
19public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.DoNotUseNonLiteralSequenceNumbers);
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (1)
21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(new[]
RouteHandlers\RouteHandlerAnalyzer.cs (1)
23public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
WebApplicationBuilder\PublicPartialProgramClassAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.PublicPartialProgramClassNotRequired);
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (2)
21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 255static Diagnostic CreateDiagnostic(DiagnosticDescriptor descriptor, IInvocationOperation operation)
Microsoft.AspNetCore.Components.Analyzers (30)
AuthenticationStateProviderAnalyzer.cs (1)
23public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
ComponentInternalUsageDiagnosticAnalzyer.cs (1)
29public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.DoNotUseRenderTreeTypes);
ComponentParameterAnalyzer.cs (1)
34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
ComponentParameterUsageAnalyzer.cs (1)
23public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
DiagnosticDescriptors.cs (15)
16public static readonly DiagnosticDescriptor ComponentParameterSettersShouldBePublic = new( 25public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesMustBeUnique = new( 34public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesHasWrongType = new( 43public static readonly DiagnosticDescriptor ComponentParametersShouldBePublic = new( 52public static readonly DiagnosticDescriptor ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent = new( 61public static readonly DiagnosticDescriptor DoNotUseRenderTreeTypes = new( 70public static readonly DiagnosticDescriptor ComponentParametersShouldBeAutoProperties = new( 79public static readonly DiagnosticDescriptor SupplyParameterFromFormShouldNotHavePropertyInitializer = new( 88public static readonly DiagnosticDescriptor PersistentStateShouldNotHavePropertyInitializer = new( 97public static readonly DiagnosticDescriptor UseInvokeVoidAsyncForObjectReturn = new( 106public static readonly DiagnosticDescriptor VirtualizeItemsProviderRequiresItemComparer = new( 115public static readonly DiagnosticDescriptor UnnecessaryStateHasChangedCall = new( 124public static readonly DiagnosticDescriptor AuthenticationStateProviderCachedWithoutSubscription = new( 133public static readonly DiagnosticDescriptor ForLoopIteratorVariableUsedInClosure = new( 142public static readonly DiagnosticDescriptor JSInvokableMethodShouldBePublic = new(
ForLoopIteratorInClosureAnalyzer.cs (1)
19public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
InternalUsageAnalyzer.cs (4)
16private readonly DiagnosticDescriptor _descriptor; 20/// a given symbol is internal or not, and a <see cref="DiagnosticDescriptor" /> to create errors. 25/// The <see cref="DiagnosticDescriptor" /> used to create errors. The error message should expect a single parameter 28public InternalUsageAnalyzer(Func<ISymbol, bool> isInInternalNamespace, Func<ISymbol, bool> hasInternalAttribute, DiagnosticDescriptor descriptor)
InvokeAsyncOfObjectAnalyzer.cs (1)
24public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
JSInvokableAnalyzer.cs (1)
18public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
PersistentStateAnalyzer.cs (1)
24public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
StateHasChangedAnalyzer.cs (1)
22public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
SupplyParameterFromFormAnalyzer.cs (1)
24public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
VirtualizeItemComparerAnalyzer.cs (1)
23public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
Microsoft.AspNetCore.Components.SdkAnalyzers (13)
ComponentInternalUsageDiagnosticAnalzyer.cs (1)
29public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.DoNotUseRenderTreeTypes);
ComponentParameterAnalyzer.cs (1)
28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
ComponentParameterUsageAnalyzer.cs (1)
23public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
DiagnosticDescriptors.cs (6)
20public static readonly DiagnosticDescriptor ComponentParameterSettersShouldBePublic = new DiagnosticDescriptor( 29public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesMustBeUnique = new DiagnosticDescriptor( 38public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesHasWrongType = new DiagnosticDescriptor( 47public static readonly DiagnosticDescriptor ComponentParametersShouldBePublic = new DiagnosticDescriptor( 56public static readonly DiagnosticDescriptor ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent = new DiagnosticDescriptor( 65public static readonly DiagnosticDescriptor DoNotUseRenderTreeTypes = new DiagnosticDescriptor(
InternalUsageAnalyzer.cs (4)
16private readonly DiagnosticDescriptor _descriptor; 20/// a given symbol is internal or not, and a <see cref="DiagnosticDescriptor" /> to create errors. 25/// The <see cref="DiagnosticDescriptor" /> used to create errors. The error message should expect a single parameter 28public InternalUsageAnalyzer(Func<ISymbol, bool> isInInternalNamespace, Func<ISymbol, bool> hasInternalAttribute, DiagnosticDescriptor descriptor)
Microsoft.AspNetCore.Components.Testing.Generators (4)
DiagnosticDescriptors.cs (3)
10internal static readonly DiagnosticDescriptor MethodNotFound = new( 18internal static readonly DiagnosticDescriptor NonConstantMethodName = new( 26internal static readonly DiagnosticDescriptor MethodMustBeStatic = new(
ServiceOverrideAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
Microsoft.AspNetCore.Http.RequestDelegateGenerator (15)
DiagnosticDescriptors.cs (15)
15public static DiagnosticDescriptor UnableToResolveRoutePattern { get; } = new( 24public static DiagnosticDescriptor UnableToResolveMethod { get; } = new( 33public static DiagnosticDescriptor UnableToResolveParameterDescriptor { get; } = new( 42public static DiagnosticDescriptor UnableToResolveAnonymousReturnType { get; } = new( 51public static DiagnosticDescriptor InvalidAsParametersAbstractType { get; } = new( 60public static DiagnosticDescriptor InvalidAsParametersSignature { get; } = new( 69public static DiagnosticDescriptor InvalidAsParametersNoConstructorFound { get; } = new( 78public static DiagnosticDescriptor InvalidAsParametersSingleConstructorOnly { get; } = new( 87public static DiagnosticDescriptor InvalidAsParametersNested { get; } = new( 96public static DiagnosticDescriptor InvalidAsParametersNullable { get; } = new( 105public static DiagnosticDescriptor TypeParametersNotSupported { get; } = new( 114public static DiagnosticDescriptor InaccessibleTypesNotSupported { get; } = new( 123public static DiagnosticDescriptor KeyedAndNotKeyedServiceAttributesNotSupported { get; } = new( 132public static DiagnosticDescriptor InvalidAsParametersEnumerableType { get; } = new( 141public static DiagnosticDescriptor UnableToResolveReturnType { get; } = new(
Microsoft.AspNetCore.Mvc.Analyzers (12)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (1)
13public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
DiagnosticDescriptors.cs (6)
14public static readonly DiagnosticDescriptor MVC1000_HtmlHelperPartialShouldBeAvoided = 23public static readonly DiagnosticDescriptor MVC1001_FiltersShouldNotBeAppliedToPageHandlerMethods = 32public static readonly DiagnosticDescriptor MVC1002_RouteAttributesShouldNotBeAppliedToPageHandlerMethods = 41public static readonly DiagnosticDescriptor MVC1003_RouteAttributesShouldNotBeAppliedToPageModels = 50public static readonly DiagnosticDescriptor MVC1004_ParameterNameCollidesWithTopLevelProperty = 63public static readonly DiagnosticDescriptor MVC1006_FunctionsContainingTagHelpersMustBeAsyncAndReturnTask =
TagHelpersInCodeBlocksAnalyzer.cs (1)
20public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
TopLevelParameterNameAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
ViewFeatureAnalyzerBase.cs (3)
12public ViewFeatureAnalyzerBase(DiagnosticDescriptor diagnosticDescriptor) 18protected DiagnosticDescriptor SupportedDiagnostic { get; } 20public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
Microsoft.AspNetCore.Mvc.Api.Analyzers (6)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzer.cs (1)
15public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
ApiConventionAnalyzer.cs (1)
15public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
ApiDiagnosticDescriptors.cs (4)
13public static readonly DiagnosticDescriptor API1000_ActionReturnsUndocumentedStatusCode = 22public static readonly DiagnosticDescriptor API1001_ActionReturnsUndocumentedSuccessResult = 31public static readonly DiagnosticDescriptor API1002_ActionDoesNotReturnDocumentedStatusCode = 40public static readonly DiagnosticDescriptor API1003_ApiActionsDoNotRequireExplicitModelValidationCheck =
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (20)
DiagnosticDescriptors.cs (20)
16public static DiagnosticDescriptor HubServerProxyNonInterfaceGenericTypeArgument { get; } = new DiagnosticDescriptor( 24public static DiagnosticDescriptor HubServerProxyUnsupportedReturnType { get; } = new DiagnosticDescriptor( 32public static DiagnosticDescriptor TooManyHubServerProxyAttributedMethods { get; } = new DiagnosticDescriptor( 40public static DiagnosticDescriptor HubServerProxyAttributedMethodBadAccessibility { get; } = new DiagnosticDescriptor( 48public static DiagnosticDescriptor HubServerProxyAttributedMethodIsNotPartial { get; } = new DiagnosticDescriptor( 56public static DiagnosticDescriptor HubServerProxyAttributedMethodIsNotExtension { get; } = new DiagnosticDescriptor( 64public static DiagnosticDescriptor HubServerProxyAttributedMethodTypeArgCountIsBad { get; } = new DiagnosticDescriptor( 72public static DiagnosticDescriptor HubServerProxyAttributedMethodTypeArgAndReturnTypeDoesNotMatch { get; } = new DiagnosticDescriptor( 80public static DiagnosticDescriptor HubServerProxyAttributedMethodArgCountIsBad { get; } = new DiagnosticDescriptor( 88public static DiagnosticDescriptor HubServerProxyAttributedMethodArgIsNotHubConnection { get; } = new DiagnosticDescriptor( 98public static DiagnosticDescriptor HubClientProxyUnsupportedReturnType { get; } = new DiagnosticDescriptor( 106public static DiagnosticDescriptor TooManyHubClientProxyAttributedMethods { get; } = new DiagnosticDescriptor( 114public static DiagnosticDescriptor HubClientProxyAttributedMethodBadAccessibility { get; } = new DiagnosticDescriptor( 122public static DiagnosticDescriptor HubClientProxyAttributedMethodIsNotPartial { get; } = new DiagnosticDescriptor( 130public static DiagnosticDescriptor HubClientProxyAttributedMethodIsNotExtension { get; } = new DiagnosticDescriptor( 138public static DiagnosticDescriptor HubClientProxyAttributedMethodTypeArgCountIsBad { get; } = new DiagnosticDescriptor( 146public static DiagnosticDescriptor HubClientProxyAttributedMethodTypeArgAndProviderTypeDoesNotMatch { get; } = new DiagnosticDescriptor( 154public static DiagnosticDescriptor HubClientProxyAttributedMethodArgCountIsBad { get; } = new DiagnosticDescriptor( 162public static DiagnosticDescriptor HubClientProxyAttributedMethodArgIsNotHubConnection { get; } = new DiagnosticDescriptor( 170public static DiagnosticDescriptor HubClientProxyAttributedMethodHasBadReturnType { get; } = new DiagnosticDescriptor(
Microsoft.CodeAnalysis (107)
CommandLine\AnalyzerConfigSet.cs (3)
94private static readonly DiagnosticDescriptor InvalidAnalyzerConfigSeverityDescriptor 103private static readonly DiagnosticDescriptor MultipleGlobalAnalyzerKeysDescriptor 112private static readonly DiagnosticDescriptor InvalidGlobalAnalyzerSectionDescriptor
CommandLine\CommonCompiler.cs (1)
1561protected virtual void AddAnalyzerDescriptorsAndExecutionTime(ErrorLogger errorLogger, ImmutableArray<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)> descriptorsWithInfo, double totalAnalyzerExecutionTime)
CommandLine\CommonCompiler.SuppressionDiagnostic.cs (2)
20private static readonly DiagnosticDescriptor s_suppressionDiagnosticDescriptor = new DiagnosticDescriptor( 47public override DiagnosticDescriptor Descriptor => s_suppressionDiagnosticDescriptor;
CommandLine\ErrorLogger.cs (2)
16public abstract void AddAnalyzerDescriptorsAndExecutionTime(ImmutableArray<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)> descriptors, double totalAnalyzerExecutionTime); 20/// Contains information associated with a <see cref="DiagnosticDescriptor"/>
CommandLine\SarifDiagnosticComparer.cs (7)
16/// We cannot just use <see cref="DiagnosticDescriptor"/>'s built-in implementation 19/// 1. <see cref="DiagnosticDescriptor.MessageFormat"/> is part of that built-in 24/// 2. <see cref="DiagnosticDescriptor.CustomTags"/> is *not* part of that built-in 29internal sealed class SarifDiagnosticComparer : IEqualityComparer<DiagnosticDescriptor> 37public bool Equals(DiagnosticDescriptor? x, DiagnosticDescriptor? y) 59public int GetHashCode(DiagnosticDescriptor obj)
CommandLine\SarifV1ErrorLogger.cs (11)
131public override void AddAnalyzerDescriptorsAndExecutionTime(ImmutableArray<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)> descriptors, double totalAnalyzerExecutionTime) 158DiagnosticDescriptor descriptor = pair.Value; 225/// Represents a distinct set of <see cref="DiagnosticDescriptor"/>s and provides unique string keys 228/// The first <see cref="DiagnosticDescriptor"/> added with a given <see cref="DiagnosticDescriptor.Id"/> 238private readonly Dictionary<DiagnosticDescriptor, string> _keys = new Dictionary<DiagnosticDescriptor, string>(SarifDiagnosticComparer.Instance); 251public string Add(DiagnosticDescriptor descriptor) 284public List<KeyValuePair<string, DiagnosticDescriptor>> ToSortedList() 288var list = new List<KeyValuePair<string, DiagnosticDescriptor>>(Count); 293list.Add(new KeyValuePair<string, DiagnosticDescriptor>(pair.Value, pair.Key));
CommandLine\SarifV2ErrorLogger.cs (9)
120public override void AddAnalyzerDescriptorsAndExecutionTime(ImmutableArray<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)> descriptors, double totalAnalyzerExecutionTime) 333var defaultSeverity = descriptor.IsEnabledByDefault ? DiagnosticDescriptor.MapSeverityToReport(descriptor.DefaultSeverity) : ReportDiagnostic.Suppress; 401var reportDiagnostic = DiagnosticDescriptor.MapReportToSeverity(severity); 423private void WriteDefaultConfiguration(DiagnosticDescriptor descriptor) 452/// Represents a distinct set of <see cref="DiagnosticDescriptor"/>s and provides unique integer indices 459private readonly Dictionary<DiagnosticDescriptor, DescriptorInfoWithIndex> _distinctDescriptors = new(SarifDiagnosticComparer.Instance); 472public int Add(DiagnosticDescriptor descriptor, DiagnosticDescriptorErrorLoggerInfo? info = null) 496public List<(int Index, DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)> ToSortedList() 500var list = new List<(int Index, DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)>(Count);
Diagnostic\CustomObsoleteDiagnosticInfo.cs (4)
12private DiagnosticDescriptor? _descriptor; 41public override DiagnosticDescriptor Descriptor 59private DiagnosticDescriptor CreateDescriptor() 61var baseDescriptor = base.Descriptor;
Diagnostic\Diagnostic_SimpleDiagnostic.cs (5)
22private readonly DiagnosticDescriptor _descriptor; 32DiagnosticDescriptor descriptor, 58DiagnosticDescriptor descriptor, 76var descriptor = new DiagnosticDescriptor(id, title, message, 81public override DiagnosticDescriptor Descriptor
Diagnostic\Diagnostic.cs (13)
43/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic</param> 48DiagnosticDescriptor descriptor, 58/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 68DiagnosticDescriptor descriptor, 79/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 89DiagnosticDescriptor descriptor, 100/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 115DiagnosticDescriptor descriptor, 127/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 143DiagnosticDescriptor descriptor, 299public abstract DiagnosticDescriptor Descriptor { get; } 317/// Gets the default <see cref="DiagnosticSeverity"/> of the diagnostic's <see cref="DiagnosticDescriptor"/>. 328/// To get the default severity of diagnostic's <see cref="DiagnosticDescriptor"/>, use <see cref="DefaultSeverity"/>.
Diagnostic\Diagnostic.DiagnosticWithProgrammaticSuppression.cs (1)
33public override DiagnosticDescriptor Descriptor
Diagnostic\DiagnosticDescriptor.cs (3)
18public sealed class DiagnosticDescriptor : IEquatable<DiagnosticDescriptor?> 195public bool Equals(DiagnosticDescriptor? other) 216return Equals(obj as DiagnosticDescriptor);
Diagnostic\DiagnosticInfo.cs (6)
34private static ImmutableDictionary<int, DiagnosticDescriptor> s_errorCodeToDescriptorMap = ImmutableDictionary<int, DiagnosticDescriptor>.Empty; 69internal static DiagnosticDescriptor GetDescriptor(int errorCode, CommonMessageProvider messageProvider) 75private static DiagnosticDescriptor GetOrCreateDescriptor(int errorCode, DiagnosticSeverity defaultSeverity, CommonMessageProvider messageProvider) 84private static DiagnosticDescriptor CreateDescriptor(int errorCode, DiagnosticSeverity defaultSeverity, CommonMessageProvider messageProvider) 188public virtual DiagnosticDescriptor Descriptor
Diagnostic\DiagnosticWithInfo.cs (1)
51public override DiagnosticDescriptor Descriptor
DiagnosticAnalyzer\AnalyzerDriver.cs (9)
547foreach (var descriptor in descriptors) 902/// Returns an array of <see cref="DiagnosticDescriptor"/>s for all <see cref="Analyzers"/> 905public ImmutableArray<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)> GetAllDiagnosticDescriptorsWithInfo(CancellationToken cancellationToken, out double totalAnalyzerExecutionTime) 911var builder = ArrayBuilder<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)>.GetInstance(); 929foreach (var descriptor in descriptors) 951DiagnosticDescriptor descriptor, 957DiagnosticDescriptor.MapSeverityToReport(descriptor.DefaultSeverity) : 1401foreach (var descriptor in descriptors) 2034severityFilter.Contains(DiagnosticDescriptor.MapSeverityToReport(diagnostic.Severity)))
DiagnosticAnalyzer\AnalyzerExecutor.cs (4)
1443var descriptor = GetAnalyzerExceptionDiagnosticDescriptor(AnalyzerExceptionDiagnosticId, title, messageFormat); 1463foreach (var diagnostic in analyzer.SupportedDiagnostics) 1490var descriptor = GetAnalyzerExceptionDiagnosticDescriptor(AnalyzerDriverExceptionDiagnosticId, title, messageFormat); 1494internal static DiagnosticDescriptor GetAnalyzerExceptionDiagnosticDescriptor(string? id = null, string? title = null, string? messageFormat = null)
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (6)
59private ImmutableArray<DiagnosticDescriptor> _lazyDiagnosticDescriptors; 249public ImmutableArray<DiagnosticDescriptor> GetOrComputeDiagnosticDescriptors(DiagnosticAnalyzer analyzer, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken) 287private static ImmutableArray<DiagnosticDescriptor> ComputeDiagnosticDescriptors_NoLock( 292var supportedDiagnostics = ImmutableArray<DiagnosticDescriptor>.Empty; 302foreach (var descriptor in supportedDiagnosticsLocal) 322foreach (var descriptor in supportedDiagnostics)
DiagnosticAnalyzer\AnalyzerManager.cs (8)
253public ImmutableArray<DiagnosticDescriptor> GetSupportedDiagnosticDescriptors( 285foreach (var descriptor in supportedDescriptors) 308Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnosticDescriptors = 316bool isEnabledWithAnalyzerConfigOptions(DiagnosticDescriptor descriptor) 346Func<DiagnosticDescriptor, bool> isEnabledWithAnalyzerConfigOptions, 347Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnosticDescriptors, 360foreach (var diag in supportedDiagnostics) 397severity = isSuppressed ? ReportDiagnostic.Suppress : DiagnosticDescriptor.MapSeverityToReport(diag.DefaultSeverity);
DiagnosticAnalyzer\AnalyzerOptionsExtensions.cs (1)
37DiagnosticDescriptor descriptor,
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (2)
1237Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnosticDescriptors = analyzer => 1245return ImmutableArray<DiagnosticDescriptor>.Empty;
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
88public override DiagnosticDescriptor Descriptor => _original.Descriptor;
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.cs (3)
16private ImmutableArray<DiagnosticDescriptor> _supportedDiagnostics; 23public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 30var builder = ArrayBuilder<DiagnosticDescriptor>.GetInstance(errorCodes.Length);
DiagnosticAnalyzer\DiagnosticAnalyzer.cs (1)
18public abstract ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
DiagnosticAnalyzer\DiagnosticSuppressor.cs (2)
15public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray<DiagnosticDescriptor>.Empty;
SourceGeneration\GeneratorDriver.cs (1)
611var descriptor = new DiagnosticDescriptor(
Symbols\Attributes\ObsoleteAttributeData.cs (1)
65/// When specified, the obsolete diagnostic's <see cref="DiagnosticDescriptor.HelpLinkUri"/> will be produced
Microsoft.CodeAnalysis.Analyzers (161)
FixAnalyzers\FixerWithFixAllAnalyzer.cs (4)
38internal static readonly DiagnosticDescriptor CreateCodeActionEquivalenceKeyRule = new( 48internal static readonly DiagnosticDescriptor OverrideCodeActionEquivalenceKeyRule = new( 58internal static readonly DiagnosticDescriptor OverrideGetFixAllProviderRule = new( 68public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
ImmutableObjectMethodAnalyzer.cs (2)
24public static readonly DiagnosticDescriptor DoNotIgnoreReturnValueDiagnosticRule = new( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DoNotIgnoreReturnValueDiagnosticRule);
ImplementationIsObsoleteAnalyzer.cs (2)
22public static readonly DiagnosticDescriptor Rule = new( 31public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
InternalImplementationOnlyAnalyzer.cs (2)
25public static readonly DiagnosticDescriptor Rule = new( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
MetaAnalyzers\ClassIsNotDiagnosticAnalyzer.cs (2)
20public static readonly DiagnosticDescriptor Rule = new( 29public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
MetaAnalyzers\CompareSymbolsCorrectlyAnalyzer.cs (4)
40private static readonly DiagnosticDescriptor s_equalityRule = new( 50private static readonly DiagnosticDescriptor s_getHashCodeRule = new( 60private static readonly DiagnosticDescriptor s_collectionRule = new( 79public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(s_equalityRule);
MetaAnalyzers\CompilerExtensionStrictApiAnalyzer.cs (5)
27public static readonly DiagnosticDescriptor DoNotDeclareCompilerFeatureInAssemblyWithWorkspacesReferenceStrictRule = new( 38public static readonly DiagnosticDescriptor DoNotDeclareCSharpCompilerFeatureInAssemblyWithVisualBasicReferenceStrictRule = new( 49public static readonly DiagnosticDescriptor DoNotDeclareVisualBasicCompilerFeatureInAssemblyWithCSharpReferenceStrictRule = new( 60public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 135DiagnosticDescriptor descriptor;
MetaAnalyzers\CompilerExtensionTargetFrameworkAnalyzer.cs (2)
25public static readonly DiagnosticDescriptor DoNotDeclareCompilerFeatureInAssemblyWithUnsupportedTargetFrameworkStrictRule = new( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
MetaAnalyzers\ConfigureGeneratedCodeAnalysisAnalyzer.cs (2)
22public static readonly DiagnosticDescriptor Rule = new( 31public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
MetaAnalyzers\DiagnosticAnalyzerAPIUsageAnalyzer.cs (4)
38public static readonly DiagnosticDescriptor DoNotUseTypesFromAssemblyDirectRule = new( 49public static readonly DiagnosticDescriptor DoNotUseTypesFromAssemblyIndirectRule = new( 61public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DoNotUseTypesFromAssemblyDirectRule, DoNotUseTypesFromAssemblyIndirectRule); 159DiagnosticDescriptor rule;
MetaAnalyzers\DiagnosticAnalyzerAttributeAnalyzer.cs (3)
23public static readonly DiagnosticDescriptor MissingDiagnosticAnalyzerAttributeRule = new( 33public static readonly DiagnosticDescriptor AddLanguageSupportToAnalyzerRule = new( 43public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(MissingDiagnosticAnalyzerAttributeRule, AddLanguageSupportToAnalyzerRule);
MetaAnalyzers\DiagnosticAnalyzerFieldsAnalyzer.cs (2)
39public static readonly DiagnosticDescriptor DoNotStorePerCompilationDataOntoFieldsRule = new( 49public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DoNotStorePerCompilationDataOntoFieldsRule);
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (3)
35public static readonly DiagnosticDescriptor DiagnosticIdMustBeInSpecifiedFormatRule = new( 45public static readonly DiagnosticDescriptor UseCategoriesFromSpecifiedRangeRule = new( 55public static readonly DiagnosticDescriptor AnalyzerCategoryAndIdRangeFileInvalidRule = new(
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ReleaseTracking.cs (13)
33internal static readonly DiagnosticDescriptor DeclareDiagnosticIdInAnalyzerReleaseRule = new( 44internal static readonly DiagnosticDescriptor UpdateDiagnosticIdInAnalyzerReleaseRule = new( 55internal static readonly DiagnosticDescriptor RemoveUnshippedDeletedDiagnosticIdRule = new( 66internal static readonly DiagnosticDescriptor RemoveShippedDeletedDiagnosticIdRule = new( 77internal static readonly DiagnosticDescriptor UnexpectedAnalyzerDiagnosticForRemovedDiagnosticIdRule = new( 88internal static readonly DiagnosticDescriptor RemoveDuplicateEntriesForAnalyzerReleaseRule = new( 99internal static readonly DiagnosticDescriptor RemoveDuplicateEntriesBetweenAnalyzerReleasesRule = new( 110internal static readonly DiagnosticDescriptor InvalidEntryInAnalyzerReleasesFileRule = new( 121internal static readonly DiagnosticDescriptor InvalidHeaderInAnalyzerReleasesFileRule = new( 132internal static readonly DiagnosticDescriptor InvalidUndetectedEntryInAnalyzerReleasesFileRule = new( 143internal static readonly DiagnosticDescriptor InvalidRemovedOrChangedWithoutPriorNewEntryInAnalyzerReleasesFileRule = new( 154internal static readonly DiagnosticDescriptor EnableAnalyzerReleaseTrackingRule = new( 221var rule = invalidEntryKind switch
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (12)
80public static readonly DiagnosticDescriptor UseLocalizableStringsInDescriptorRule = new( 90public static readonly DiagnosticDescriptor ProvideHelpUriInDescriptorRule = new( 100public static readonly DiagnosticDescriptor DiagnosticIdMustBeAConstantRule = new( 110public static readonly DiagnosticDescriptor UseUniqueDiagnosticIdRule = new( 120public static readonly DiagnosticDescriptor ProvideCustomTagsInDescriptorRule = new( 130public static readonly DiagnosticDescriptor DoNotUseReservedDiagnosticIdRule = new( 140public static readonly DiagnosticDescriptor DefineDiagnosticTitleCorrectlyRule = new( 149public static readonly DiagnosticDescriptor DefineDiagnosticMessageCorrectlyRule = new( 158public static readonly DiagnosticDescriptor DefineDiagnosticDescriptionCorrectlyRule = new( 167public static readonly DiagnosticDescriptor AddCompilationEndCustomTagRule = new( 177public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 664DiagnosticDescriptor descriptor,
MetaAnalyzers\DoNotUseCompilationGetSemanticModelAnalyzer.cs (2)
22public static readonly DiagnosticDescriptor Rule = new( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
MetaAnalyzers\DoNotUseFileTypesForAnalyzersOrGenerators.cs (2)
17private static readonly DiagnosticDescriptor Rule = new( 26public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
MetaAnalyzers\EnableConcurrentExecutionAnalyzer.cs (2)
22public static readonly DiagnosticDescriptor Rule = new( 31public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
MetaAnalyzers\PreferIsKindAnalyzer.cs (2)
22internal static readonly DiagnosticDescriptor Rule = new( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
MetaAnalyzers\RegisterActionAnalyzer.cs (9)
36public static readonly DiagnosticDescriptor MissingSymbolKindArgumentRule = new( 46public static readonly DiagnosticDescriptor MissingSyntaxKindArgumentRule = new( 56public static readonly DiagnosticDescriptor MissingOperationKindArgumentRule = new( 66public static readonly DiagnosticDescriptor UnsupportedSymbolKindArgumentRule = new( 75public static readonly DiagnosticDescriptor InvalidSyntaxKindTypeArgumentRule = new( 87public static readonly DiagnosticDescriptor StartActionWithNoRegisteredActionsRule = new( 97public static readonly DiagnosticDescriptor StartActionWithOnlyEndActionRule = new( 107public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 341DiagnosticDescriptor rule;
MetaAnalyzers\ReportDiagnosticAnalyzer.cs (2)
28public static readonly DiagnosticDescriptor InvalidReportDiagnosticRule = new( 38public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(InvalidReportDiagnosticRule);
MetaAnalyzers\SymbolIsBannedInAnalyzersAnalyzer.cs (4)
20public static readonly DiagnosticDescriptor SymbolIsBannedRule = new( 31public static readonly DiagnosticDescriptor NoSettingSpecifiedSymbolIsBannedRule = new( 46public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(SymbolIsBannedInAnalyzersAnalyzer.SymbolIsBannedRule, SymbolIsBannedInAnalyzersAnalyzer.NoSettingSpecifiedSymbolIsBannedRule); 48protected sealed override DiagnosticDescriptor SymbolIsBannedRule => SymbolIsBannedInAnalyzersAnalyzer.SymbolIsBannedRule;
src\roslyn\src\RoslynAnalyzers\Microsoft.CodeAnalysis.BannedApiAnalyzers\Core\SymbolIsBannedAnalyzerBase.cs (1)
28protected abstract DiagnosticDescriptor SymbolIsBannedRule { get; }
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (16)
20DiagnosticDescriptor rule, 26DiagnosticDescriptor rule, 33DiagnosticDescriptor rule, 47DiagnosticDescriptor rule, 53DiagnosticDescriptor rule, 62DiagnosticDescriptor rule, 72DiagnosticDescriptor rule, 80DiagnosticDescriptor rule, 88DiagnosticDescriptor rule, 97DiagnosticDescriptor rule, 107DiagnosticDescriptor rule, 114DiagnosticDescriptor rule, 134DiagnosticDescriptor rule, 142DiagnosticDescriptor rule, 161DiagnosticDescriptor rule, 167DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (4)
31public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 48public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 67public bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, out T value) 93private (bool found, object? value) ComputeOptionValue<T, TArg>(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (3)
82public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 100public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 110private bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, [MaybeNullWhen(false)] out T value)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (37)
47DiagnosticDescriptor rule, 57DiagnosticDescriptor rule, 65DiagnosticDescriptor rule, 75DiagnosticDescriptor rule, 83DiagnosticDescriptor rule, 93DiagnosticDescriptor rule, 101DiagnosticDescriptor rule, 108DiagnosticDescriptor rule, 116DiagnosticDescriptor rule, 126DiagnosticDescriptor rule, 135DiagnosticDescriptor rule, 151DiagnosticDescriptor rule, 178DiagnosticDescriptor rule, 188DiagnosticDescriptor rule, 199DiagnosticDescriptor? rule, 211DiagnosticDescriptor rule, 223DiagnosticDescriptor rule, 239DiagnosticDescriptor rule, 246DiagnosticDescriptor rule, 253DiagnosticDescriptor rule, 260DiagnosticDescriptor rule, 297DiagnosticDescriptor rule, 306DiagnosticDescriptor rule, 316DiagnosticDescriptor rule, 323DiagnosticDescriptor rule, 330DiagnosticDescriptor rule, 337DiagnosticDescriptor rule, 379DiagnosticDescriptor rule, 386DiagnosticDescriptor rule, 425DiagnosticDescriptor rule, 433DiagnosticDescriptor rule, 440DiagnosticDescriptor rule, 447DiagnosticDescriptor rule, 455DiagnosticDescriptor rule, 577DiagnosticDescriptor rule, 592DiagnosticDescriptor rule, 611DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\ICategorizedAnalyzerConfigOptions.cs (2)
51T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality); 53T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (10)
23public static ImmutableArray<string> ImmutableCustomTags(this DiagnosticDescriptor descriptor) 35this DiagnosticDescriptor descriptor, 64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions) 97public static bool IsDefinedInEditorConfig(this DiagnosticDescriptor descriptor, AnalyzerConfigOptions analyzerConfigOptions) 146this DiagnosticDescriptor descriptor, 215DiagnosticDescriptor descriptor, 251public static bool IsCompilationEnd(this DiagnosticDescriptor descriptor) 255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 259public static DiagnosticDescriptor WithMessageFormat(this DiagnosticDescriptor descriptor, LocalizableString messageFormat)
UpgradeMSBuildWorkspaceAnalyzer.cs (2)
25public static readonly DiagnosticDescriptor UpgradeMSBuildWorkspaceDiagnosticRule = new( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(UpgradeMSBuildWorkspaceDiagnosticRule);
Microsoft.CodeAnalysis.AnalyzerUtilities (99)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (16)
20DiagnosticDescriptor rule, 26DiagnosticDescriptor rule, 33DiagnosticDescriptor rule, 47DiagnosticDescriptor rule, 53DiagnosticDescriptor rule, 62DiagnosticDescriptor rule, 72DiagnosticDescriptor rule, 80DiagnosticDescriptor rule, 88DiagnosticDescriptor rule, 97DiagnosticDescriptor rule, 107DiagnosticDescriptor rule, 114DiagnosticDescriptor rule, 134DiagnosticDescriptor rule, 142DiagnosticDescriptor rule, 161DiagnosticDescriptor rule, 167DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (4)
31public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 48public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 67public bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, out T value) 93private (bool found, object? value) ComputeOptionValue<T, TArg>(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (3)
82public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 100public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 110private bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, [MaybeNullWhen(false)] out T value)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (37)
47DiagnosticDescriptor rule, 57DiagnosticDescriptor rule, 65DiagnosticDescriptor rule, 75DiagnosticDescriptor rule, 83DiagnosticDescriptor rule, 93DiagnosticDescriptor rule, 101DiagnosticDescriptor rule, 108DiagnosticDescriptor rule, 116DiagnosticDescriptor rule, 126DiagnosticDescriptor rule, 135DiagnosticDescriptor rule, 151DiagnosticDescriptor rule, 178DiagnosticDescriptor rule, 188DiagnosticDescriptor rule, 199DiagnosticDescriptor? rule, 211DiagnosticDescriptor rule, 223DiagnosticDescriptor rule, 239DiagnosticDescriptor rule, 246DiagnosticDescriptor rule, 253DiagnosticDescriptor rule, 260DiagnosticDescriptor rule, 297DiagnosticDescriptor rule, 306DiagnosticDescriptor rule, 316DiagnosticDescriptor rule, 323DiagnosticDescriptor rule, 330DiagnosticDescriptor rule, 337DiagnosticDescriptor rule, 379DiagnosticDescriptor rule, 386DiagnosticDescriptor rule, 425DiagnosticDescriptor rule, 433DiagnosticDescriptor rule, 440DiagnosticDescriptor rule, 447DiagnosticDescriptor rule, 455DiagnosticDescriptor rule, 577DiagnosticDescriptor rule, 592DiagnosticDescriptor rule, 611DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\ICategorizedAnalyzerConfigOptions.cs (2)
51T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality); 53T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.cs (1)
41DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysisHelper.cs (1)
126DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\GlobalFlowStateAnalysis\GlobalFlowStateAnalysis.cs (2)
40/// <param name="rule"><see cref="DiagnosticDescriptor"/> for fetching any rule specific analyzer option values from <paramref name="analyzerOptions"/>.</param> 64DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ParameterValidationAnalysis\ParameterValidationAnalysis.cs (1)
35DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataAnalysis.cs (1)
33DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ValueContentAnalysis\ValueContentAnalysis.cs (2)
34DiagnosticDescriptor rule, 48DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
35private static readonly DiagnosticDescriptor s_dummyDataflowAnalysisDescriptor = new(
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\InterproceduralAnalysisConfiguration.cs (5)
43DiagnosticDescriptor rule, 54DiagnosticDescriptor rule, 83ImmutableArray<DiagnosticDescriptor> rules, 94ImmutableArray<DiagnosticDescriptor> rules, 105foreach (var rule in rules)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\Options\AnalyzerOptionsExtensions_FlowAnalysis.cs (12)
16DiagnosticDescriptor rule, 26DiagnosticDescriptor rule, 34DiagnosticDescriptor rule, 44DiagnosticDescriptor rule, 52DiagnosticDescriptor rule, 62DiagnosticDescriptor rule, 70DiagnosticDescriptor rule, 80DiagnosticDescriptor rule, 88DiagnosticDescriptor rule, 98DiagnosticDescriptor rule, 106DiagnosticDescriptor rule, 116DiagnosticDescriptor rule,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (10)
23public static ImmutableArray<string> ImmutableCustomTags(this DiagnosticDescriptor descriptor) 35this DiagnosticDescriptor descriptor, 64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions) 97public static bool IsDefinedInEditorConfig(this DiagnosticDescriptor descriptor, AnalyzerConfigOptions analyzerConfigOptions) 146this DiagnosticDescriptor descriptor, 215DiagnosticDescriptor descriptor, 251public static bool IsCompilationEnd(this DiagnosticDescriptor descriptor) 255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 259public static DiagnosticDescriptor WithMessageFormat(this DiagnosticDescriptor descriptor, LocalizableString messageFormat)
Microsoft.CodeAnalysis.CodeStyle (78)
src\roslyn\src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (5)
16protected readonly DiagnosticDescriptor Descriptor; 38protected AbstractBuiltInCodeStyleDiagnosticAnalyzer(ImmutableArray<DiagnosticDescriptor> supportedDiagnostics) 47public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 49protected static DiagnosticDescriptor CreateDescriptorWithId( 205foreach (var descriptor in SupportedDiagnostics)
src\roslyn\src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs (2)
82protected AbstractBuiltInCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, IOption2 Option)> supportedDiagnosticsWithOptions) 95protected AbstractBuiltInCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, ImmutableHashSet<IOption2> Options)> supportedDiagnosticsWithOptions)
src\roslyn\src\Analyzers\Core\Analyzers\AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer.cs (3)
72protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<DiagnosticDescriptor> descriptors) 80protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, IOption2 Option)> supportedDiagnosticsWithOptions) 88protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, ImmutableHashSet<IOption2> Options)> supportedDiagnosticsWithOptions)
src\roslyn\src\Analyzers\Core\Analyzers\AbstractCodeQualityDiagnosticAnalyzer.cs (3)
16ImmutableArray<DiagnosticDescriptor> descriptors, 24public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 38protected static DiagnosticDescriptor CreateDescriptor(
src\roslyn\src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
26protected readonly DiagnosticDescriptor ModifierRemovedDescriptor = CreateDescriptorWithId(
src\roslyn\src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (3)
16private static readonly DiagnosticDescriptor s_invalidHeaderDescriptor = CreateDescriptorForFileHeader(s_invalidHeaderTitle, s_invalidHeaderMessage); 20private static readonly DiagnosticDescriptor s_missingHeaderDescriptor = CreateDescriptorForFileHeader(s_missingHeaderTitle, s_missingHeaderMessage); 22private static DiagnosticDescriptor CreateDescriptorForFileHeader(LocalizableString title, LocalizableString message)
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (13)
21/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 38DiagnosticDescriptor descriptor, 53private static LocalizableString CreateMessage(DiagnosticDescriptor descriptor, object[] messageArgs) 68/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 86DiagnosticDescriptor descriptor, 105DiagnosticDescriptor descriptor, 132/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 154DiagnosticDescriptor descriptor, 175DiagnosticDescriptor descriptor, 201DiagnosticDescriptor descriptor, 243/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 260DiagnosticDescriptor descriptor, 291static IEnumerable<string> GetEffectiveCustomTags(DiagnosticDescriptor descriptor, NotificationOption2 notificationOption, AnalyzerOptions analyzerOptions)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (11)
30private static readonly DiagnosticDescriptor s_fixableIdDescriptor = CreateDescriptorWithId( 34private static readonly DiagnosticDescriptor s_enableGenerateDocumentationFileIdDescriptor = new( 46private readonly DiagnosticDescriptor _classificationIdDescriptor; 47private readonly DiagnosticDescriptor _generatedCodeClassificationIdDescriptor; 50: base(GetDescriptors(titleAndMessage, out var classificationIdDescriptor, out var generatedCodeClassificationIdDescriptor)) 56private static ImmutableArray<DiagnosticDescriptor> GetDescriptors(LocalizableString titleAndMessage, out DiagnosticDescriptor classificationIdDescriptor, out DiagnosticDescriptor generatedCodeClassificationIdDescriptor) 105var descriptor = context.IsGeneratedCode 200DiagnosticDescriptor descriptor, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (3)
26private static readonly DiagnosticDescriptor s_invalidScopeDescriptor = CreateDescriptor( 31private static readonly DiagnosticDescriptor s_invalidOrMissingTargetDescriptor = CreateDescriptor( 41internal static readonly DiagnosticDescriptor LegacyFormatTargetDescriptor = CreateDescriptor(
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (4)
30internal static readonly DiagnosticDescriptor s_removeUnnecessarySuppressionDescriptor = CreateDescriptor( 88Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics, 394Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics, 425foreach (var descriptor in getSupportedDiagnostics(analyzer))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (4)
44private static readonly DiagnosticDescriptor s_removeUnusedMembersRule = CreateDescriptorWithId( 54internal static readonly DiagnosticDescriptor s_removeUnreadMembersRule = CreateDescriptorWithId( 668var rule = !valueUsageInfo.IsWrittenTo() && !valueUsageInfo.IsNameOnly() && !symbolsReferencedInDocComments.Contains(member) 743DiagnosticDescriptor rule,
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (3)
65private static readonly DiagnosticDescriptor s_expressionValueIsUnusedRule = CreateDescriptorWithId( 74private static readonly DiagnosticDescriptor s_valueAssignedIsUnusedRule = CreateDescriptorWithId( 84private static readonly DiagnosticDescriptor s_unusedParameterRule = CreateDescriptorWithId(
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (4)
28private static readonly DiagnosticDescriptor s_descriptorSimplifyNames = CreateDescriptorWithId(IDEDiagnosticIds.SimplifyNamesDiagnosticId, 36private static readonly DiagnosticDescriptor s_descriptorSimplifyMemberAccess = CreateDescriptorWithId(IDEDiagnosticIds.SimplifyMemberAccessDiagnosticId, 43private static readonly DiagnosticDescriptor s_descriptorPreferBuiltinOrFrameworkType = CreateDescriptorWithId(IDEDiagnosticIds.PreferBuiltInOrFrameworkTypeDiagnosticId, 123DiagnosticDescriptor descriptor;
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
54private static readonly DiagnosticDescriptor s_descriptor = CreateDescriptorWithId( 62private static readonly DiagnosticDescriptor s_unnecessaryCodeDescriptor = CreateDescriptorWithId(
src\roslyn\src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
31private readonly DiagnosticDescriptor _incrementDescriptor; 33private readonly DiagnosticDescriptor _decrementDescriptor;
src\roslyn\src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (2)
45private static readonly DiagnosticDescriptor s_descriptor = CreateDescriptorWithId( 53private static readonly DiagnosticDescriptor s_unnecessaryCodeDescriptor = CreateDescriptorWithId(
src\roslyn\src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (2)
34private static readonly DiagnosticDescriptor Rule = new( 44public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (10)
23public static ImmutableArray<string> ImmutableCustomTags(this DiagnosticDescriptor descriptor) 35this DiagnosticDescriptor descriptor, 64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions) 97public static bool IsDefinedInEditorConfig(this DiagnosticDescriptor descriptor, AnalyzerConfigOptions analyzerConfigOptions) 146this DiagnosticDescriptor descriptor, 215DiagnosticDescriptor descriptor, 251public static bool IsCompilationEnd(this DiagnosticDescriptor descriptor) 255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 259public static DiagnosticDescriptor WithMessageFormat(this DiagnosticDescriptor descriptor, LocalizableString messageFormat)
Microsoft.CodeAnalysis.CSharp (1)
Compilation\CSharpDiagnosticFilter.cs (1)
213report = DiagnosticDescriptor.MapSeverityToReport(severity);
Microsoft.CodeAnalysis.CSharp.Analyzers (3)
MetaAnalyzers\CSharpSemanticModelGetDeclaredSymbolAlwaysReturnsNullAnalyzer.cs (3)
21internal static readonly DiagnosticDescriptor DiagnosticDescriptor = new( 32internal static readonly DiagnosticDescriptor FieldDiagnosticDescriptor = new( 43public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DiagnosticDescriptor, FieldDiagnosticDescriptor);
Microsoft.CodeAnalysis.CSharp.CodeStyle (14)
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
16private static readonly DiagnosticDescriptor s_diagnosticDescriptor = CreateDescriptor(
src\roslyn\src\Analyzers\CSharp\Analyzers\MisplacedUsingDirectives\MisplacedUsingDirectivesDiagnosticAnalyzer.cs (3)
24private static readonly DiagnosticDescriptor s_outsideDiagnosticDescriptor = CreateDescriptorWithId( 33private static readonly DiagnosticDescriptor s_insideDiagnosticDescriptor = CreateDescriptorWithId( 107SyntaxNodeAnalysisContext context, DiagnosticDescriptor descriptor,
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\AbstractCSharpUseCollectionExpressionDiagnosticAnalyzer.cs (2)
23protected readonly DiagnosticDescriptor UnnecessaryCodeDescriptor; 34private static DiagnosticDescriptor CreateDescriptor(string diagnosticId, EnforceOnBuild enforceOnBuild, bool isUnnecessary)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (3)
30private static ImmutableArray<(DiagnosticDescriptor, IOption2)> GetSupportedDescriptorsWithOptions() 32var builder = new FixedSizeArrayBuilder<(DiagnosticDescriptor, IOption2)>(_helpers.Length); 35var descriptor = CreateDescriptorWithId(helper.DiagnosticId, helper.EnforceOnBuild, hasAnyCodeStyleOption: true, helper.UseExpressionBodyTitle, helper.UseExpressionBodyTitle);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (3)
19private static readonly DiagnosticDescriptor s_useExpressionBodyForLambda = CreateDescriptorWithId(UseExpressionBodyForLambdaHelpers.UseExpressionBodyTitle, UseExpressionBodyForLambdaHelpers.UseExpressionBodyTitle); 20private static readonly DiagnosticDescriptor s_useBlockBodyForLambda = CreateDescriptorWithId(UseExpressionBodyForLambdaHelpers.UseBlockBodyTitle, UseExpressionBodyForLambdaHelpers.UseBlockBodyTitle); 107private static DiagnosticDescriptor CreateDescriptorWithId(
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
67var descriptor = Descriptor;
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
32private static readonly DiagnosticDescriptor s_unsafeDescriptor = CreateDescriptorWithId(
Microsoft.CodeAnalysis.CSharp.Features (18)
Diagnostics\Analyzers\CSharpUnboundIdentifiersDiagnosticAnalyzer.cs (1)
25protected override DiagnosticDescriptor DiagnosticDescriptor
Diagnostics\Analyzers\FileBasedPrograms\FileLevelDirectiveDiagnosticAnalyzer.cs (1)
20private static readonly DiagnosticDescriptor s_descriptor = CreateDescriptor(
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (2)
133var diagnosticDescriptor = supportedDiagnostics.FirstOrDefault(d => d.Id == errorCode); 142private static QuickInfoItem CreateQuickInfo(TextSpan location, DiagnosticDescriptor descriptor,
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
16private static readonly DiagnosticDescriptor s_diagnosticDescriptor = CreateDescriptor(
src\roslyn\src\Analyzers\CSharp\Analyzers\MisplacedUsingDirectives\MisplacedUsingDirectivesDiagnosticAnalyzer.cs (3)
24private static readonly DiagnosticDescriptor s_outsideDiagnosticDescriptor = CreateDescriptorWithId( 33private static readonly DiagnosticDescriptor s_insideDiagnosticDescriptor = CreateDescriptorWithId( 107SyntaxNodeAnalysisContext context, DiagnosticDescriptor descriptor,
src\roslyn\src\Analyzers\CSharp\Analyzers\UseCollectionExpression\AbstractCSharpUseCollectionExpressionDiagnosticAnalyzer.cs (2)
23protected readonly DiagnosticDescriptor UnnecessaryCodeDescriptor; 34private static DiagnosticDescriptor CreateDescriptor(string diagnosticId, EnforceOnBuild enforceOnBuild, bool isUnnecessary)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (3)
30private static ImmutableArray<(DiagnosticDescriptor, IOption2)> GetSupportedDescriptorsWithOptions() 32var builder = new FixedSizeArrayBuilder<(DiagnosticDescriptor, IOption2)>(_helpers.Length); 35var descriptor = CreateDescriptorWithId(helper.DiagnosticId, helper.EnforceOnBuild, hasAnyCodeStyleOption: true, helper.UseExpressionBodyTitle, helper.UseExpressionBodyTitle);
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (3)
19private static readonly DiagnosticDescriptor s_useExpressionBodyForLambda = CreateDescriptorWithId(UseExpressionBodyForLambdaHelpers.UseExpressionBodyTitle, UseExpressionBodyForLambdaHelpers.UseExpressionBodyTitle); 20private static readonly DiagnosticDescriptor s_useBlockBodyForLambda = CreateDescriptorWithId(UseExpressionBodyForLambdaHelpers.UseBlockBodyTitle, UseExpressionBodyForLambdaHelpers.UseBlockBodyTitle); 107private static DiagnosticDescriptor CreateDescriptorWithId(
src\roslyn\src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
67var descriptor = Descriptor;
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
32private static readonly DiagnosticDescriptor s_unsafeDescriptor = CreateDescriptorWithId(
Microsoft.CodeAnalysis.Features (99)
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (3)
28protected abstract DiagnosticDescriptor DiagnosticDescriptor { get; } 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 47protected static DiagnosticDescriptor GetDiagnosticDescriptor(string id, LocalizableString messageFormat)
Diagnostics\DiagnosticAnalyzerExtensions.cs (2)
23public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions options) 45public static Task<ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsAsync(
Diagnostics\IDiagnosticAnalyzerService.cs (4)
101Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync( 105Task<ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsAsync( 155public static Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync( 159public static Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync(
Diagnostics\Service\DiagnosticAnalyzerService_RemoteOrLocalDispatcher.cs (4)
41public async Task<ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsAsync( 96foreach (var buildOnlyDescriptor in _analyzerInfoCache.GetCompilationEndDiagnosticDescriptors(analyzer)) 131public async Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync( 143return ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>.Empty;
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
35var descriptor = new DiagnosticDescriptor(AnalyzerExceptionDiagnosticId,
EditAndContinue\DebuggingSession.cs (2)
296var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.ErrorReadingFile); 426var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.ErrorReadingFile);
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (9)
28private static readonly ImmutableArray<DiagnosticDescriptor> s_descriptors; 34private static Dictionary<ManagedHotReloadAvailabilityStatus, DiagnosticDescriptor>? s_lazyModuleDiagnosticDescriptors; 45var builder = ImmutableArray.CreateBuilder<DiagnosticDescriptor>(); 217internal static ImmutableArray<DiagnosticDescriptor> GetDescriptors() 220internal static DiagnosticDescriptor GetDescriptor(RudeEditKind kind) 223internal static DiagnosticDescriptor GetDescriptor(ProjectSettingKind kind) 226internal static DiagnosticDescriptor GetDescriptor(EditAndContinueErrorCode errorCode) 229internal static DiagnosticDescriptor GetModuleDiagnosticDescriptor(ManagedHotReloadAvailabilityStatus status) 235if (!s_lazyModuleDiagnosticDescriptors.TryGetValue(status, out var descriptor))
EditAndContinue\EditSession.cs (5)
143var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.AddingTypeRuntimeCapabilityRequired); 163var descriptor = EditAndContinueDiagnosticDescriptors.GetModuleDiagnosticDescriptor(availability.Status); 633var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.UnableToReadSourceFileOrPdb); 671var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.UpdatingUnsupportedProject); 1527var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.UpdatingDocumentInStaleProject);
EditAndContinue\EmitSolutionUpdateResults.cs (1)
85var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.CannotApplyChangesUnexpectedError);
EditAndContinue\RudeEditDiagnostic.cs (1)
43var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(Kind);
src\roslyn\src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (5)
16protected readonly DiagnosticDescriptor Descriptor; 38protected AbstractBuiltInCodeStyleDiagnosticAnalyzer(ImmutableArray<DiagnosticDescriptor> supportedDiagnostics) 47public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 49protected static DiagnosticDescriptor CreateDescriptorWithId( 205foreach (var descriptor in SupportedDiagnostics)
src\roslyn\src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs (2)
82protected AbstractBuiltInCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, IOption2 Option)> supportedDiagnosticsWithOptions) 95protected AbstractBuiltInCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, ImmutableHashSet<IOption2> Options)> supportedDiagnosticsWithOptions)
src\roslyn\src\Analyzers\Core\Analyzers\AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer.cs (3)
72protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<DiagnosticDescriptor> descriptors) 80protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, IOption2 Option)> supportedDiagnosticsWithOptions) 88protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, ImmutableHashSet<IOption2> Options)> supportedDiagnosticsWithOptions)
src\roslyn\src\Analyzers\Core\Analyzers\AbstractCodeQualityDiagnosticAnalyzer.cs (3)
16ImmutableArray<DiagnosticDescriptor> descriptors, 24public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 38protected static DiagnosticDescriptor CreateDescriptor(
src\roslyn\src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
26protected readonly DiagnosticDescriptor ModifierRemovedDescriptor = CreateDescriptorWithId(
src\roslyn\src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (3)
16private static readonly DiagnosticDescriptor s_invalidHeaderDescriptor = CreateDescriptorForFileHeader(s_invalidHeaderTitle, s_invalidHeaderMessage); 20private static readonly DiagnosticDescriptor s_missingHeaderDescriptor = CreateDescriptorForFileHeader(s_missingHeaderTitle, s_missingHeaderMessage); 22private static DiagnosticDescriptor CreateDescriptorForFileHeader(LocalizableString title, LocalizableString message)
src\roslyn\src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (13)
21/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 38DiagnosticDescriptor descriptor, 53private static LocalizableString CreateMessage(DiagnosticDescriptor descriptor, object[] messageArgs) 68/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 86DiagnosticDescriptor descriptor, 105DiagnosticDescriptor descriptor, 132/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 154DiagnosticDescriptor descriptor, 175DiagnosticDescriptor descriptor, 201DiagnosticDescriptor descriptor, 243/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 260DiagnosticDescriptor descriptor, 291static IEnumerable<string> GetEffectiveCustomTags(DiagnosticDescriptor descriptor, NotificationOption2 notificationOption, AnalyzerOptions analyzerOptions)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (11)
30private static readonly DiagnosticDescriptor s_fixableIdDescriptor = CreateDescriptorWithId( 34private static readonly DiagnosticDescriptor s_enableGenerateDocumentationFileIdDescriptor = new( 46private readonly DiagnosticDescriptor _classificationIdDescriptor; 47private readonly DiagnosticDescriptor _generatedCodeClassificationIdDescriptor; 50: base(GetDescriptors(titleAndMessage, out var classificationIdDescriptor, out var generatedCodeClassificationIdDescriptor)) 56private static ImmutableArray<DiagnosticDescriptor> GetDescriptors(LocalizableString titleAndMessage, out DiagnosticDescriptor classificationIdDescriptor, out DiagnosticDescriptor generatedCodeClassificationIdDescriptor) 105var descriptor = context.IsGeneratedCode 200DiagnosticDescriptor descriptor, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (3)
26private static readonly DiagnosticDescriptor s_invalidScopeDescriptor = CreateDescriptor( 31private static readonly DiagnosticDescriptor s_invalidOrMissingTargetDescriptor = CreateDescriptor( 41internal static readonly DiagnosticDescriptor LegacyFormatTargetDescriptor = CreateDescriptor(
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (4)
30internal static readonly DiagnosticDescriptor s_removeUnnecessarySuppressionDescriptor = CreateDescriptor( 88Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics, 394Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics, 425foreach (var descriptor in getSupportedDiagnostics(analyzer))
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (4)
44private static readonly DiagnosticDescriptor s_removeUnusedMembersRule = CreateDescriptorWithId( 54internal static readonly DiagnosticDescriptor s_removeUnreadMembersRule = CreateDescriptorWithId( 668var rule = !valueUsageInfo.IsWrittenTo() && !valueUsageInfo.IsNameOnly() && !symbolsReferencedInDocComments.Contains(member) 743DiagnosticDescriptor rule,
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (3)
65private static readonly DiagnosticDescriptor s_expressionValueIsUnusedRule = CreateDescriptorWithId( 74private static readonly DiagnosticDescriptor s_valueAssignedIsUnusedRule = CreateDescriptorWithId( 84private static readonly DiagnosticDescriptor s_unusedParameterRule = CreateDescriptorWithId(
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (4)
28private static readonly DiagnosticDescriptor s_descriptorSimplifyNames = CreateDescriptorWithId(IDEDiagnosticIds.SimplifyNamesDiagnosticId, 36private static readonly DiagnosticDescriptor s_descriptorSimplifyMemberAccess = CreateDescriptorWithId(IDEDiagnosticIds.SimplifyMemberAccessDiagnosticId, 43private static readonly DiagnosticDescriptor s_descriptorPreferBuiltinOrFrameworkType = CreateDescriptorWithId(IDEDiagnosticIds.PreferBuiltInOrFrameworkTypeDiagnosticId, 123DiagnosticDescriptor descriptor;
src\roslyn\src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
54private static readonly DiagnosticDescriptor s_descriptor = CreateDescriptorWithId( 62private static readonly DiagnosticDescriptor s_unnecessaryCodeDescriptor = CreateDescriptorWithId(
src\roslyn\src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
31private readonly DiagnosticDescriptor _incrementDescriptor; 33private readonly DiagnosticDescriptor _decrementDescriptor;
src\roslyn\src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (2)
45private static readonly DiagnosticDescriptor s_descriptor = CreateDescriptorWithId( 53private static readonly DiagnosticDescriptor s_unnecessaryCodeDescriptor = CreateDescriptorWithId(
src\roslyn\src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (2)
34private static readonly DiagnosticDescriptor Rule = new( 44public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Microsoft.CodeAnalysis.NetAnalyzers (925)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\AbstractTypesShouldNotHaveConstructors.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\AvoidEmptyInterfaces.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\AvoidExcessiveParametersOnGenericTypes.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\AvoidOutParameters.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\CancellationTokenParametersMustComeLast.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\CollectionPropertiesShouldBeReadOnly.cs (2)
39internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 49public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\CollectionsShouldImplementGenericInterface.cs (3)
33internal static readonly DiagnosticDescriptor Rule = 44internal static readonly DiagnosticDescriptor RuleMultiple = 55public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DeclareTypesInNamespaces.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DefineAccessorsForAttributeArguments.cs (4)
33internal static readonly DiagnosticDescriptor DefaultRule = DiagnosticDescriptorHelper.Create( 43internal static readonly DiagnosticDescriptor IncreaseVisibilityRule = DiagnosticDescriptorHelper.Create( 53internal static readonly DiagnosticDescriptor RemoveSetterRule = DiagnosticDescriptorHelper.Create( 63public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DefaultRule, IncreaseVisibilityRule, RemoveSetterRule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotCatchGeneralExceptionTypes.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotDeclareProtectedMembersInSealedTypes.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotDeclareStaticMembersOnGenericTypes.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotDeclareVisibleInstanceFields.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotDirectlyAwaitATask.cs (2)
23public static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotExposeGenericLists.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotHideBaseClassMethods.cs (2)
24public static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotNameEnumValuesReserved.cs (2)
24public static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotOverloadOperatorEqualsOnReferenceTypes.cs (2)
22public static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotPassTypesByReference.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotPrefixEnumValuesWithTypeName.cs (2)
27internal static readonly DiagnosticDescriptor Rule = 38public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotRaiseExceptionsInUnexpectedLocations.cs (6)
29internal static readonly DiagnosticDescriptor PropertyGetterRule = DiagnosticDescriptorHelper.Create( 39internal static readonly DiagnosticDescriptor HasAllowedExceptionsRule = DiagnosticDescriptorHelper.Create( 49internal static readonly DiagnosticDescriptor NoAllowedExceptionsRule = DiagnosticDescriptorHelper.Create( 59public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = 140public DiagnosticDescriptor Rule { get; } 148public MethodCategory(Func<IMethodSymbol, Compilation, bool> matchFunction, bool analyzeOnlyPublicMethods, DiagnosticDescriptor rule, params ITypeSymbol?[] allowedExceptionTypes)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumShouldNotHaveDuplicatedValues.cs (3)
27internal static readonly DiagnosticDescriptor RuleDuplicatedValue = DiagnosticDescriptorHelper.Create( 37internal static readonly DiagnosticDescriptor RuleDuplicatedBitwiseValuePart = DiagnosticDescriptorHelper.Create( 47public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(RuleDuplicatedValue, RuleDuplicatedBitwiseValuePart);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumsShouldHaveZeroValue.cs (4)
50internal static readonly DiagnosticDescriptor RuleRename = DiagnosticDescriptorHelper.Create( 61internal static readonly DiagnosticDescriptor RuleMultipleZero = DiagnosticDescriptorHelper.Create( 72internal static readonly DiagnosticDescriptor RuleNoZero = DiagnosticDescriptorHelper.Create( 83public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(RuleRename, RuleMultipleZero, RuleNoZero);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumStorageShouldBeInt32.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumWithFlagsAttribute.cs (3)
40internal static readonly DiagnosticDescriptor Rule1027 = DiagnosticDescriptorHelper.Create( 50internal static readonly DiagnosticDescriptor Rule2217 = DiagnosticDescriptorHelper.Create( 60public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule1027, Rule2217);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EquatableAnalyzer.cs (3)
25internal static readonly DiagnosticDescriptor ImplementIEquatableDescriptor = DiagnosticDescriptorHelper.Create( 35internal static readonly DiagnosticDescriptor OverridesObjectEqualsDescriptor = DiagnosticDescriptorHelper.Create( 45public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(ImplementIEquatableDescriptor, OverridesObjectEqualsDescriptor);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EventsShouldNotHaveBeforeOrAfterPrefix.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ExceptionsShouldBePublic.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldDifferByMoreThanCase.cs (2)
30internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 40public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldHaveCorrectPrefix.cs (3)
27public static readonly DiagnosticDescriptor InterfaceRule = DiagnosticDescriptorHelper.Create( 37public static readonly DiagnosticDescriptor TypeParameterRule = DiagnosticDescriptorHelper.Create( 47public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(InterfaceRule, TypeParameterRule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldHaveCorrectSuffix.cs (6)
43internal static readonly DiagnosticDescriptor OneSuffixRule = DiagnosticDescriptorHelper.Create(RuleId, 51internal static readonly DiagnosticDescriptor MultipleSuffixesRule = DiagnosticDescriptorHelper.Create(RuleId, 59internal static readonly DiagnosticDescriptor UserSuffixRule = DiagnosticDescriptorHelper.Create(RuleId, 68public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(OneSuffixRule, MultipleSuffixesRule, UserSuffixRule); 158if (TryGetTypeSuffix(baseTypes, baseTypeSuffixMap, userTypeSuffixMap, out var typesSuffixes, out var rule)) 203SymbolNamesWithValueOption<string?> userMap, out ImmutableArray<string> suffixes, [NotNullWhen(true)] out DiagnosticDescriptor? rule)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldNotContainTypeNames.cs (2)
70internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 80public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldNotContainUnderscores.cs (9)
39internal static readonly DiagnosticDescriptor AssemblyRule = DiagnosticDescriptorHelper.Create( 49internal static readonly DiagnosticDescriptor NamespaceRule = DiagnosticDescriptorHelper.Create( 59internal static readonly DiagnosticDescriptor TypeRule = DiagnosticDescriptorHelper.Create( 69internal static readonly DiagnosticDescriptor MemberRule = DiagnosticDescriptorHelper.Create( 79internal static readonly DiagnosticDescriptor TypeTypeParameterRule = DiagnosticDescriptorHelper.Create( 89internal static readonly DiagnosticDescriptor MethodTypeParameterRule = DiagnosticDescriptorHelper.Create( 99internal static readonly DiagnosticDescriptor MemberParameterRule = DiagnosticDescriptorHelper.Create( 109internal static readonly DiagnosticDescriptor DelegateParameterRule = DiagnosticDescriptorHelper.Create( 119public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(AssemblyRule, NamespaceRule, TypeRule, MemberRule, TypeTypeParameterRule, MethodTypeParameterRule, MemberParameterRule, DelegateParameterRule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldNotHaveIncorrectSuffix.cs (5)
27internal static readonly DiagnosticDescriptor TypeNoAlternateRule = DiagnosticDescriptorHelper.Create( 37internal static readonly DiagnosticDescriptor MemberNewerVersionRule = DiagnosticDescriptorHelper.Create( 47internal static readonly DiagnosticDescriptor TypeNewerVersionRule = DiagnosticDescriptorHelper.Create( 57internal static readonly DiagnosticDescriptor MemberWithAlternateRule = DiagnosticDescriptorHelper.Create( 67public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldNotMatchKeywords.cs (7)
28internal static readonly DiagnosticDescriptor MemberParameterRule = DiagnosticDescriptorHelper.Create( 38internal static readonly DiagnosticDescriptor MemberRule = DiagnosticDescriptorHelper.Create( 48internal static readonly DiagnosticDescriptor TypeRule = DiagnosticDescriptorHelper.Create( 58internal static readonly DiagnosticDescriptor NamespaceRule = DiagnosticDescriptorHelper.Create( 86public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(MemberParameterRule, MemberRule, TypeRule, NamespaceRule); 106private static bool ShouldAnalyze(SymbolAnalysisContext context, DiagnosticDescriptor rule) 116private static ImmutableHashSet<SymbolKind> GetSymbolKindsToAnalyze(SymbolAnalysisContext context, DiagnosticDescriptor rule)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ImplementIDisposableCorrectly.cs (10)
34internal static readonly DiagnosticDescriptor IDisposableReimplementationRule = DiagnosticDescriptorHelper.Create( 44internal static readonly DiagnosticDescriptor FinalizeOverrideRule = DiagnosticDescriptorHelper.Create( 54internal static readonly DiagnosticDescriptor DisposeOverrideRule = DiagnosticDescriptorHelper.Create( 64internal static readonly DiagnosticDescriptor DisposeSignatureRule = DiagnosticDescriptorHelper.Create( 74internal static readonly DiagnosticDescriptor RenameDisposeRule = DiagnosticDescriptorHelper.Create( 84internal static readonly DiagnosticDescriptor DisposeBoolSignatureRule = DiagnosticDescriptorHelper.Create( 94internal static readonly DiagnosticDescriptor DisposeImplementationRule = DiagnosticDescriptorHelper.Create( 104internal static readonly DiagnosticDescriptor FinalizeImplementationRule = DiagnosticDescriptorHelper.Create( 114internal static readonly DiagnosticDescriptor ProvideDisposeBoolRule = DiagnosticDescriptorHelper.Create( 124public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ImplementStandardExceptionConstructors.cs (2)
36internal static readonly DiagnosticDescriptor MissingConstructorRule = DiagnosticDescriptorHelper.Create( 46public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(MissingConstructorRule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\InterfaceMethodsShouldBeCallableByChildTypes.cs (2)
33public static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 43public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\MarkAssembliesWithAttributesDiagnosticAnalyzer.cs (3)
24internal static readonly DiagnosticDescriptor CA1016Rule = DiagnosticDescriptorHelper.Create( 35internal static readonly DiagnosticDescriptor CA1014Rule = DiagnosticDescriptorHelper.Create( 47public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(CA1016Rule, CA1014Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\MarkAssembliesWithComVisible.cs (3)
25internal static readonly DiagnosticDescriptor RuleChangeComVisible = DiagnosticDescriptorHelper.Create( 37internal static readonly DiagnosticDescriptor RuleAddComVisible = DiagnosticDescriptorHelper.Create( 49public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(RuleChangeComVisible, RuleAddComVisible);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\MarkAttributesWithAttributeUsage.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\MovePInvokesToNativeMethodsClass.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 38public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\NestedTypesShouldNotBeVisible.cs (4)
27internal static readonly DiagnosticDescriptor DefaultRule = DiagnosticDescriptorHelper.Create( 37internal static readonly DiagnosticDescriptor VisualBasicModuleRule = DiagnosticDescriptorHelper.Create( 47public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DefaultRule, VisualBasicModuleRule); 128DiagnosticDescriptor descriptor = containingType.TypeKind == TypeKind.Module
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\NonConstantFieldsShouldNotBeVisible.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OperatorOverloadsHaveNamedAlternates.cs (6)
34internal static readonly DiagnosticDescriptor DefaultRule = DiagnosticDescriptorHelper.Create( 44internal static readonly DiagnosticDescriptor PropertyRule = DiagnosticDescriptorHelper.Create( 54internal static readonly DiagnosticDescriptor MultipleRule = DiagnosticDescriptorHelper.Create( 64internal static readonly DiagnosticDescriptor VisibilityRule = DiagnosticDescriptorHelper.Create( 74public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DefaultRule, PropertyRule, MultipleRule, VisibilityRule); 187private static Diagnostic CreateDiagnostic(DiagnosticDescriptor descriptor, Location location, string kind, params string[] messageArgs)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OperatorsShouldHaveSymmetricalOverloads.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverloadOperatorEqualsOnOverridingValueTypeEquals.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverrideEqualsAndOperatorEqualsOnValueTypes.cs (3)
26internal static readonly DiagnosticDescriptor EqualsRule = DiagnosticDescriptorHelper.Create( 36internal static readonly DiagnosticDescriptor OpEqualityRule = DiagnosticDescriptorHelper.Create( 46public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(EqualsRule, OpEqualityRule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverrideMethodsOnComparableTypes.cs (4)
31internal static readonly DiagnosticDescriptor RuleEquals = DiagnosticDescriptorHelper.Create( 41internal static readonly DiagnosticDescriptor RuleOperator = DiagnosticDescriptorHelper.Create( 51internal static readonly DiagnosticDescriptor RuleBoth = DiagnosticDescriptorHelper.Create( 61public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(RuleBoth, RuleEquals, RuleOperator);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ParameterNamesShouldMatchBaseDeclaration.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\PassSystemUriObjectsInsteadOfStrings.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\PropertiesShouldNotBeWriteOnly.cs (5)
26internal static readonly DiagnosticDescriptor AddGetterRule = DiagnosticDescriptorHelper.Create( 36internal static readonly DiagnosticDescriptor MakeMoreAccessibleRule = DiagnosticDescriptorHelper.Create( 46public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(AddGetterRule, MakeMoreAccessibleRule); 66if (property.IsOverride || GetRule(property) is not DiagnosticDescriptor descriptor || property.IsImplementationOfAnyInterfaceMember()) 81private static DiagnosticDescriptor? GetRule(IPropertySymbol property)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\PropertiesShouldNotReturnArrays.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\PropertyNamesShouldNotMatchGetMethods.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ProvideObsoleteAttributeMessage.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\StaticHolderTypes.cs (2)
45internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 55public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\TypeNamesShouldNotMatchNamespaces.cs (3)
28internal static readonly DiagnosticDescriptor DefaultRule = DiagnosticDescriptorHelper.Create( 39internal static readonly DiagnosticDescriptor SystemRule = DiagnosticDescriptorHelper.Create( 50public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DefaultRule, SystemRule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\TypesThatOwnDisposableFieldsShouldBeDisposable.cs (2)
27internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 37public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UriParametersShouldNotBeStrings.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UriPropertiesShouldNotBeStrings.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UriReturnValuesShouldNotBeStrings.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UseEventsWhereAppropriate.cs (2)
30internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 40public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UseGenericEventHandlerInstances.cs (4)
31internal static readonly DiagnosticDescriptor RuleForDelegates = DiagnosticDescriptorHelper.Create( 41internal static readonly DiagnosticDescriptor RuleForEvents = DiagnosticDescriptorHelper.Create( 51internal static readonly DiagnosticDescriptor RuleForEvents2 = DiagnosticDescriptorHelper.Create( 61public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(RuleForDelegates, RuleForEvents, RuleForEvents2);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UseIntegralOrStringArgumentForIndexers.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 49public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UsePreferredTerms.cs (2)
196public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray<DiagnosticDescriptor>.Empty;
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UsePropertiesWhereAppropriate.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 40public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\ApiReview\AvoidCallingProblematicMethods.cs (2)
130public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray<DiagnosticDescriptor>.Empty;
Microsoft.CodeQuality.Analyzers\Documentation\AvoidUsingCrefTagsWithAPrefix.cs (2)
20internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 30public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidDeadConditionalCode.cs (4)
36internal static readonly DiagnosticDescriptor AlwaysTrueFalseOrNullRule = DiagnosticDescriptorHelper.Create( 46internal static readonly DiagnosticDescriptor NeverNullRule = DiagnosticDescriptorHelper.Create( 56public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(AlwaysTrueFalseOrNullRule, NeverNullRule); 167DiagnosticDescriptor rule;
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidLengthCalculationWhenSlicingToEnd.cs (2)
28internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 38public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUninstantiatedInternalClasses.cs (2)
29internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 40public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUnusedPrivateFields.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\Maintainability\CodeMetricsAnalyzer.cs (6)
52internal static readonly DiagnosticDescriptor CA1501Rule = DiagnosticDescriptorHelper.Create( 64internal static readonly DiagnosticDescriptor CA1502Rule = DiagnosticDescriptorHelper.Create( 76internal static readonly DiagnosticDescriptor CA1505Rule = DiagnosticDescriptorHelper.Create( 88internal static readonly DiagnosticDescriptor CA1506Rule = DiagnosticDescriptorHelper.Create( 100internal static readonly DiagnosticDescriptor InvalidEntryInCodeMetricsConfigFileRule = DiagnosticDescriptorHelper.Create( 112public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(CA1501Rule, CA1502Rule, CA1505Rule, CA1506Rule, InvalidEntryInCodeMetricsConfigFileRule);
Microsoft.CodeQuality.Analyzers\Maintainability\DoNotIgnoreMethodResults.cs (9)
69internal static readonly DiagnosticDescriptor ObjectCreationRule = DiagnosticDescriptorHelper.Create( 79internal static readonly DiagnosticDescriptor StringCreationRule = DiagnosticDescriptorHelper.Create( 89internal static readonly DiagnosticDescriptor HResultOrErrorCodeRule = DiagnosticDescriptorHelper.Create( 99internal static readonly DiagnosticDescriptor PureMethodRule = DiagnosticDescriptorHelper.Create( 109internal static readonly DiagnosticDescriptor TryParseRule = DiagnosticDescriptorHelper.Create( 119internal static readonly DiagnosticDescriptor LinqMethodRule = DiagnosticDescriptorHelper.Create( 129internal static readonly DiagnosticDescriptor UserDefinedMethodRule = DiagnosticDescriptorHelper.Create( 139public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(ObjectCreationRule, StringCreationRule, HResultOrErrorCodeRule, TryParseRule, PureMethodRule); 167DiagnosticDescriptor? rule = null;
Microsoft.CodeQuality.Analyzers\Maintainability\MakeTypesInternal.cs (2)
19protected static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 61public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\Maintainability\UseCrossPlatformIntrinsicsAnalyzer.cs (3)
28internal static readonly ImmutableArray<DiagnosticDescriptor> Rules = ImmutableArray.CreateRange( 43public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => Rules; 45private static DiagnosticDescriptor CreateDiagnosticDescriptor(RuleKind ruleKind) => DiagnosticDescriptorHelper.Create(
Microsoft.CodeQuality.Analyzers\Maintainability\UseNameofInPlaceOfString.cs (2)
26internal static readonly DiagnosticDescriptor RuleWithSuggestion = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(RuleWithSuggestion);
Microsoft.CodeQuality.Analyzers\Maintainability\VariableNamesShouldNotMatchFieldNames.cs (2)
42public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray<DiagnosticDescriptor>.Empty;
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AssigningSymbolAndItsMemberInSameStatement.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidDuplicateElementInitialization.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidInfiniteRecursion.cs (3)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create(RuleId, 32internal static readonly DiagnosticDescriptor MaybeRule = DiagnosticDescriptorHelper.Create(RuleId, 41public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule, MaybeRule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidMultipleEnumerations\AvoidMultipleEnumerations.cs (2)
25private static readonly DiagnosticDescriptor MultipleEnumerableDescriptor = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(MultipleEnumerableDescriptor);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidMultipleEnumerations\FlowAnalysis\GlobalFlowStateDictionaryAnalysis.cs (1)
43DiagnosticDescriptor rule,
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidPropertySelfAssignment.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create(RuleId, 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\DoNotCallOverridableMethodsInConstructors.cs (2)
30public static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 40public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\DoNotDeclareEventFieldsAsVirtual.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\DoNotInitializeUnnecessarily.cs (2)
23internal static readonly DiagnosticDescriptor DefaultRule = DiagnosticDescriptorHelper.Create(RuleId, 32public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DefaultRule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\DoNotPassDisposablesIntoUnawaitedTasks.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\DoNotRaiseExceptionsInExceptionClauses.cs (2)
30internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 40public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\MarkMembersAsStatic.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\PreferJaggedArraysOverMultidimensional.cs (4)
27internal static readonly DiagnosticDescriptor DefaultRule = DiagnosticDescriptorHelper.Create( 37internal static readonly DiagnosticDescriptor ReturnRule = DiagnosticDescriptorHelper.Create( 47internal static readonly DiagnosticDescriptor BodyRule = DiagnosticDescriptorHelper.Create( 57public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DefaultRule, ReturnRule, BodyRule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\RemoveEmptyFinalizers.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\RethrowToPreserveStackDetails.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\SealMethodsThatSatisfyPrivateInterfaces.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\UseLiteralsWhereAppropriate.cs (3)
27internal static readonly DiagnosticDescriptor DefaultRule = DiagnosticDescriptorHelper.Create( 37internal static readonly DiagnosticDescriptor EmptyStringRule = DiagnosticDescriptorHelper.Create( 47public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DefaultRule, EmptyStringRule);
Microsoft.CodeQuality.Analyzers\QualityGuidelines\ValidateArgumentsOfPublicMethods.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Data\ReviewSqlQueriesForSecurityVulnerabilities.cs (2)
27internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 37public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\ImmutableCollections\DoNotCallToImmutableCollectionOnAnImmutableCollectionValue.cs (2)
27internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 49public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\InteropServices\AvoidStringBuilderPInvokeParameters.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\InteropServices\DisableRuntimeMarshalling.cs (11)
25private static readonly DiagnosticDescriptor FeatureUnsupportedWhenRuntimeMarshallingDisabledSetLastErrorTrue = 36private static readonly DiagnosticDescriptor FeatureUnsupportedWhenRuntimeMarshallingDisabledHResultSwapping = 47private static readonly DiagnosticDescriptor FeatureUnsupportedWhenRuntimeMarshallingDisabledUsingLCIDConversionAttribute = 58private static readonly DiagnosticDescriptor FeatureUnsupportedWhenRuntimeMarshallingDisabledVarargPInvokes = 69private static readonly DiagnosticDescriptor FeatureUnsupportedWhenRuntimeMarshallingDisabledByRefParameters = 80private static readonly DiagnosticDescriptor FeatureUnsupportedWhenRuntimeMarshallingDisabledManagedParameterOrReturnTypes = 91private static readonly DiagnosticDescriptor FeatureUnsupportedWhenRuntimeMarshallingDisabledAutoLayoutTypes = 102private static readonly DiagnosticDescriptor FeatureUnsupportedWhenRuntimeMarshallingDisabledDelegateUsage = 115private static readonly DiagnosticDescriptor MethodUsesRuntimeMarshallingEvenWhenMarshallingDisabled = 128public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 164private static void AnalyzeMethodSignature(AutoLayoutTypeCache autoLayoutCache, Action<Diagnostic> reportDiagnostic, IMethodSymbol method, ImmutableArray<Location> locationsOverride = default, DiagnosticDescriptor? descriptorOverride = null)
Microsoft.NetCore.Analyzers\InteropServices\DoNotUseOutAttributeStringPInvokeParameters.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\InteropServices\DynamicInterfaceCastableImplementation.cs (4)
24private static readonly DiagnosticDescriptor DynamicInterfaceCastableImplementationUnsupported = 37private static readonly DiagnosticDescriptor InterfaceMembersMissingImplementation = 50private static readonly DiagnosticDescriptor MembersDeclaredOnImplementationTypeMustBeStatic = 63public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
Microsoft.NetCore.Analyzers\InteropServices\MarkBooleanPInvokeArgumentsWithMarshalAs.cs (2)
39public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray<DiagnosticDescriptor>.Empty;
Microsoft.NetCore.Analyzers\InteropServices\PInvokeDiagnosticAnalyzer.cs (3)
26internal static readonly DiagnosticDescriptor RuleCA1401 = DiagnosticDescriptorHelper.Create( 38internal static readonly DiagnosticDescriptor RuleCA2101 = DiagnosticDescriptorHelper.Create( 48public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(RuleCA1401, RuleCA2101);
Microsoft.NetCore.Analyzers\InteropServices\PlatformCompatibilityAnalyzer.cs (14)
63internal static readonly DiagnosticDescriptor OnlySupportedCsReachable = DiagnosticDescriptorHelper.Create( 73internal static readonly DiagnosticDescriptor OnlySupportedCsUnreachable = DiagnosticDescriptorHelper.Create( 83internal static readonly DiagnosticDescriptor OnlySupportedCsAllPlatforms = DiagnosticDescriptorHelper.Create( 93internal static readonly DiagnosticDescriptor SupportedCsAllPlatforms = DiagnosticDescriptorHelper.Create( 103internal static readonly DiagnosticDescriptor SupportedCsReachable = DiagnosticDescriptorHelper.Create( 113internal static readonly DiagnosticDescriptor UnsupportedCsAllPlatforms = DiagnosticDescriptorHelper.Create( 123internal static readonly DiagnosticDescriptor UnsupportedCsReachable = DiagnosticDescriptorHelper.Create( 133internal static readonly DiagnosticDescriptor ObsoletedCsAllPlatforms = DiagnosticDescriptorHelper.Create( 143internal static readonly DiagnosticDescriptor ObsoletedCsReachable = DiagnosticDescriptorHelper.Create( 153public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(OnlySupportedCsReachable, OnlySupportedCsUnreachable, 845var rule = supportedRule ? SwitchSupportedRule(callsite) : SwitchRule(callsite, true); 854static DiagnosticDescriptor SwitchSupportedRule(Callsite callsite) 940static DiagnosticDescriptor SwitchObsoletedRule(Callsite callsite) 950static DiagnosticDescriptor SwitchRule(Callsite callsite, bool unsupported)
Microsoft.NetCore.Analyzers\InteropServices\ProvidePublicParameterlessSafeHandleConstructor.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\InteropServices\UseManagedEquivalentsOfWin32Api.cs (2)
28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray<DiagnosticDescriptor>.Empty;
Microsoft.NetCore.Analyzers\InteropServices\UseValidPlatformString.cs (4)
36internal static readonly DiagnosticDescriptor UnknownPlatform = DiagnosticDescriptorHelper.Create(RuleId, 45internal static readonly DiagnosticDescriptor InvalidVersion = DiagnosticDescriptorHelper.Create(RuleId, 54internal static readonly DiagnosticDescriptor NoVersion = DiagnosticDescriptorHelper.Create(RuleId, 63public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(UnknownPlatform, InvalidVersion, NoVersion);
Microsoft.NetCore.Analyzers\Performance\AvoidPotentiallyExpensiveCallWhenLogging.cs (2)
33private static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 53public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Performance\AvoidSingleUseOfLocalJsonSerializerOptions.cs (2)
22internal static readonly DiagnosticDescriptor s_Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_Rule);
Microsoft.NetCore.Analyzers\Performance\CollapseMultiplePathOperations.cs (2)
27internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 37public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Performance\ConstantExpectedAnalyzer.cs (9)
32internal static readonly DiagnosticDescriptor UnsupportedTypeRule = DiagnosticDescriptorHelper.Create( 42internal static readonly DiagnosticDescriptor IncompatibleConstantTypeRule = DiagnosticDescriptorHelper.Create( 52internal static readonly DiagnosticDescriptor InvalidBoundsRule = DiagnosticDescriptorHelper.Create( 62internal static readonly DiagnosticDescriptor InvertedRangeRule = DiagnosticDescriptorHelper.Create( 78internal static readonly DiagnosticDescriptor ConstantOutOfBoundsRule = DiagnosticDescriptorHelper.Create( 88internal static readonly DiagnosticDescriptor ConstantNotConstantRule = DiagnosticDescriptorHelper.Create( 98internal static readonly DiagnosticDescriptor ConstantInvalidConstantRule = DiagnosticDescriptorHelper.Create( 108internal static readonly DiagnosticDescriptor AttributeExpectedRule = DiagnosticDescriptorHelper.Create( 118public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
Microsoft.NetCore.Analyzers\Performance\DoNotGuardCall.cs (4)
29internal static readonly DiagnosticDescriptor DoNotGuardDictionaryRemoveByContainsKeyRule = DiagnosticDescriptorHelper.Create( 39internal static readonly DiagnosticDescriptor DoNotGuardSetAddOrRemoveByContainsRule = DiagnosticDescriptorHelper.Create( 81public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = 217private record GuardedCallContext(DiagnosticDescriptor Rule, ConditionMethodContext ConditionMethodContext, ImmutableArray<GuardedMethodContext> GuardedMethodContexts);
Microsoft.NetCore.Analyzers\Performance\DoNotUseAsParallelInForEachLoop.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Performance\PreferConvertToHexStringOverBitConverter.cs (2)
34internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 44public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Performance\PreferDictionaryTryMethodsOverContainsKeyGuardAnalyzer.cs (4)
29internal static readonly DiagnosticDescriptor PreferTryGetValueDiagnostic = DiagnosticDescriptorHelper.Create( 39private static readonly DiagnosticDescriptor PreferTryAddDiagnostic = DiagnosticDescriptorHelper.Create( 49public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(PreferTryGetValueDiagnostic, PreferTryAddDiagnostic); 153void ReportGuardedDictionaryPattern(SearchContext searchContext, DiagnosticDescriptor diagnosticDescriptor)
Microsoft.NetCore.Analyzers\Performance\PreferHashDataOverComputeHash.cs (2)
38internal static readonly DiagnosticDescriptor StringRule = DiagnosticDescriptorHelper.Create( 48public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(StringRule);
Microsoft.NetCore.Analyzers\Performance\PreferLengthCountIsEmptyOverAnyAnalyzer.cs (4)
32internal static readonly DiagnosticDescriptor IsEmptyDescriptor = DiagnosticDescriptorHelper.Create( 43internal static readonly DiagnosticDescriptor LengthDescriptor = DiagnosticDescriptorHelper.Create( 54internal static readonly DiagnosticDescriptor CountDescriptor = DiagnosticDescriptorHelper.Create( 65public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
Microsoft.NetCore.Analyzers\Performance\PreferReadOnlySpanOverSpan.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Performance\RecommendCaseInsensitiveStringComparison.Analyzer.cs (5)
44internal static readonly DiagnosticDescriptor RecommendCaseInsensitiveStringComparisonRule = DiagnosticDescriptorHelper.Create( 54internal static readonly DiagnosticDescriptor RecommendCaseInsensitiveStringComparerRule = DiagnosticDescriptorHelper.Create( 64internal static readonly DiagnosticDescriptor RecommendCaseInsensitiveStringEqualsRule = DiagnosticDescriptorHelper.Create( 74public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 245DiagnosticDescriptor? chosenRule;
Microsoft.NetCore.Analyzers\Performance\UseAsSpanInsteadOfRangeIndexer.cs (5)
35internal static readonly DiagnosticDescriptor StringRule = DiagnosticDescriptorHelper.Create( 45internal static readonly DiagnosticDescriptor ArrayReadOnlyRule = DiagnosticDescriptorHelper.Create( 55internal static readonly DiagnosticDescriptor ArrayReadWriteRule = DiagnosticDescriptorHelper.Create( 65public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(StringRule, ArrayReadOnlyRule, ArrayReadWriteRule); 183DiagnosticDescriptor rule;
Microsoft.NetCore.Analyzers\Performance\UseCompositeFormat.cs (2)
28internal static readonly DiagnosticDescriptor UseCompositeFormatRule = DiagnosticDescriptorHelper.Create("CA1863", 39public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Microsoft.NetCore.Analyzers\Performance\UseConcreteTypeAnalyzer.cs (7)
63internal static readonly DiagnosticDescriptor UseConcreteTypeForMethodReturn = DiagnosticDescriptorHelper.Create( 73internal static readonly DiagnosticDescriptor UseConcreteTypeForProperty = DiagnosticDescriptorHelper.Create( 83internal static readonly DiagnosticDescriptor UseConcreteTypeForParameter = DiagnosticDescriptorHelper.Create( 93internal static readonly DiagnosticDescriptor UseConcreteTypeForLocal = DiagnosticDescriptorHelper.Create( 103internal static readonly DiagnosticDescriptor UseConcreteTypeForField = DiagnosticDescriptorHelper.Create( 113public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create( 244void Evaluate(ISymbol affectedSymbol, ITypeSymbol fromType, PooledConcurrentSet<ITypeSymbol> typesAssigned, PooledConcurrentSet<IMethodSymbol>? targets, DiagnosticDescriptor desc)
Microsoft.NetCore.Analyzers\Performance\UseCountProperly.cs (5)
53internal static readonly DiagnosticDescriptor s_rule_CA1827 = DiagnosticDescriptorHelper.Create( 63internal static readonly DiagnosticDescriptor s_rule_CA1828 = DiagnosticDescriptorHelper.Create( 73internal static readonly DiagnosticDescriptor s_rule_CA1829 = DiagnosticDescriptorHelper.Create( 83internal static readonly DiagnosticDescriptor s_rule_CA1836 = DiagnosticDescriptorHelper.Create( 93public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
Microsoft.NetCore.Analyzers\Performance\UseSearchValues.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Performance\UseSpanClearInsteadOfFill.cs (2)
26internal static readonly DiagnosticDescriptor s_Rule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(s_Rule);
Microsoft.NetCore.Analyzers\Performance\UseStartsWithInsteadOfIndexOfComparisonWithZero.cs (2)
30internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 41public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Performance\UseStringContainsCharOverloadWithSingleCharactersAnalyzer.cs (2)
24internal static readonly DiagnosticDescriptor s_rule_CA1847 = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(s_rule_CA1847);
Microsoft.NetCore.Analyzers\Performance\UseStringMethodCharOverloadWithSingleCharacters.cs (5)
25internal static readonly DiagnosticDescriptor SafeTransformationRule = DiagnosticDescriptorHelper.Create( 35internal static readonly DiagnosticDescriptor NoSpecifiedComparisonRule = DiagnosticDescriptorHelper.Create( 45internal static readonly DiagnosticDescriptor AnyOtherSpecifiedComparisonRule = DiagnosticDescriptorHelper.Create( 61public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 121DiagnosticDescriptor? rule;
Microsoft.NetCore.Analyzers\Resources\MarkAssembliesWithNeutralResourcesLanguage.cs (2)
30internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 42public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\AttributeStringLiteralsShouldParseCorrectly.cs (3)
31internal static readonly DiagnosticDescriptor DefaultRule = DiagnosticDescriptorHelper.Create( 41internal static readonly DiagnosticDescriptor EmptyRule = DiagnosticDescriptorHelper.Create( 51public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DefaultRule, EmptyRule);
Microsoft.NetCore.Analyzers\Runtime\AvoidConstArrays.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create(RuleId, 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\AvoidRedundantRegexIsMatchBeforeMatch.cs (2)
30internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 40public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\AvoidUnreliableStreamRead.cs (2)
28internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 38public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\AvoidUnsealedAttributes.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\AvoidZeroLengthArrayAllocations.cs (2)
34internal static readonly DiagnosticDescriptor UseArrayEmptyDescriptor = DiagnosticDescriptorHelper.Create( 45public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(UseArrayEmptyDescriptor);
Microsoft.NetCore.Analyzers\Runtime\BufferBlockCopyLengthAnalyzer.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create(RuleId, 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\CallGCSuppressFinalizeCorrectly.cs (6)
27internal static readonly DiagnosticDescriptor NotCalledWithFinalizerRule = DiagnosticDescriptorHelper.Create( 37internal static readonly DiagnosticDescriptor NotCalledRule = DiagnosticDescriptorHelper.Create( 47internal static readonly DiagnosticDescriptor NotPassedThisRule = DiagnosticDescriptorHelper.Create( 57internal static readonly DiagnosticDescriptor OutsideDisposeRule = DiagnosticDescriptorHelper.Create( 67public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(NotCalledWithFinalizerRule, NotCalledRule, NotPassedThisRule, OutsideDisposeRule); 172var descriptor = _containingMethodSymbol.ContainingType.HasFinalizer() ? NotCalledWithFinalizerRule : NotCalledRule;
Microsoft.NetCore.Analyzers\Runtime\DetectPreviewFeatureAnalyzer.cs (26)
33internal static readonly DiagnosticDescriptor GeneralPreviewFeatureAttributeRule = DiagnosticDescriptorHelper.Create(RuleId, 41internal static readonly DiagnosticDescriptor GeneralPreviewFeatureAttributeRuleWithCustomMessage = DiagnosticDescriptorHelper.Create(RuleId, 50internal static readonly DiagnosticDescriptor ImplementsPreviewInterfaceRule = DiagnosticDescriptorHelper.Create(RuleId, 58internal static readonly DiagnosticDescriptor ImplementsPreviewInterfaceRuleWithCustomMessage = DiagnosticDescriptorHelper.Create(RuleId, 67internal static readonly DiagnosticDescriptor ImplementsPreviewMethodRule = DiagnosticDescriptorHelper.Create(RuleId, 75internal static readonly DiagnosticDescriptor ImplementsPreviewMethodRuleWithCustomMessage = DiagnosticDescriptorHelper.Create(RuleId, 84internal static readonly DiagnosticDescriptor OverridesPreviewMethodRule = DiagnosticDescriptorHelper.Create(RuleId, 92internal static readonly DiagnosticDescriptor OverridesPreviewMethodRuleWithCustomMessage = DiagnosticDescriptorHelper.Create(RuleId, 101internal static readonly DiagnosticDescriptor DerivesFromPreviewClassRule = DiagnosticDescriptorHelper.Create(RuleId, 109internal static readonly DiagnosticDescriptor DerivesFromPreviewClassRuleWithCustomMessage = DiagnosticDescriptorHelper.Create(RuleId, 118internal static readonly DiagnosticDescriptor UsesPreviewTypeParameterRule = DiagnosticDescriptorHelper.Create(RuleId, 126internal static readonly DiagnosticDescriptor UsesPreviewTypeParameterRuleWithCustomMessage = DiagnosticDescriptorHelper.Create(RuleId, 135internal static readonly DiagnosticDescriptor MethodReturnsPreviewTypeRule = DiagnosticDescriptorHelper.Create(RuleId, 143internal static readonly DiagnosticDescriptor MethodReturnsPreviewTypeRuleWithCustomMessage = DiagnosticDescriptorHelper.Create(RuleId, 152internal static readonly DiagnosticDescriptor MethodUsesPreviewTypeAsParameterRule = DiagnosticDescriptorHelper.Create(RuleId, 160internal static readonly DiagnosticDescriptor MethodUsesPreviewTypeAsParameterRuleWithCustomMessage = DiagnosticDescriptorHelper.Create(RuleId, 168internal static readonly DiagnosticDescriptor FieldOrEventIsPreviewTypeRule = DiagnosticDescriptorHelper.Create(RuleId, 176internal static readonly DiagnosticDescriptor FieldOrEventIsPreviewTypeRuleWithCustomMessage = DiagnosticDescriptorHelper.Create(RuleId, 185internal static readonly DiagnosticDescriptor StaticAbstractIsPreviewFeatureRule = DiagnosticDescriptorHelper.Create(RuleId, 194public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 910DiagnosticDescriptor diagnosticDescriptor, 911DiagnosticDescriptor diagnosticDescriptorWithPlaceholdersForCustomMessage, 936DiagnosticDescriptor diagnosticDescriptor, 937DiagnosticDescriptor diagnosticDescriptorWithPlaceholdersForCustomMessage, 963DiagnosticDescriptor diagnosticDescriptor, 964DiagnosticDescriptor diagnosticDescriptorWithPlaceholdersForCustomMessage,
Microsoft.NetCore.Analyzers\Runtime\DisposableFieldsShouldBeDisposed.cs (2)
30internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 40public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\DisposableTypesShouldDeclareFinalizer.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\DisposeMethodsShouldCallBaseClassDispose.cs (2)
28internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 38public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\DisposeObjectsBeforeLosingScope.cs (7)
33internal static readonly DiagnosticDescriptor NotDisposedRule = DiagnosticDescriptorHelper.Create( 43internal static readonly DiagnosticDescriptor MayBeDisposedRule = DiagnosticDescriptorHelper.Create( 53internal static readonly DiagnosticDescriptor NotDisposedOnExceptionPathsRule = DiagnosticDescriptorHelper.Create( 63internal static readonly DiagnosticDescriptor MayBeDisposedOnExceptionPathsRule = DiagnosticDescriptorHelper.Create( 73public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = 227var rule = GetRule(isNotDisposed); 249DiagnosticDescriptor GetRule(bool isNotDisposed)
Microsoft.NetCore.Analyzers\Runtime\DoNotCallEnumerableCastOrOfTypeWithIncompatibleTypesAnalyzer.cs (5)
30internal static DiagnosticDescriptor CastRule = DiagnosticDescriptorHelper.Create(RuleId, 39internal static DiagnosticDescriptor OfTypeRule = DiagnosticDescriptorHelper.Create(RuleId, 48private static readonly ImmutableArray<(string MethodName, DiagnosticDescriptor Rule)> s_methodMetadataNames = ImmutableArray.Create( 53public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 94if (!methodRuleDictionary.TryGetValue(targetMethod, out var rule))
Microsoft.NetCore.Analyzers\Runtime\DoNotDefineFinalizersForTypesDerivedFromMemoryManager.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\DoNotLockOnObjectsWithWeakIdentity.cs (2)
31internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 41public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\DoNotPassLiteralsAsLocalizedParameters.cs (2)
38internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 48public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\DoNotRaiseReservedExceptionTypes.cs (3)
58internal static readonly DiagnosticDescriptor TooGenericRule = DiagnosticDescriptorHelper.Create( 68internal static readonly DiagnosticDescriptor ReservedRule = DiagnosticDescriptorHelper.Create( 80public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(TooGenericRule, ReservedRule);
Microsoft.NetCore.Analyzers\Runtime\DoNotUseEndOfStreamInAsyncMethods.cs (2)
25private static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectly.cs (2)
28internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 38public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\DoNotUseReferenceEqualsWithValueTypes.cs (4)
26internal static readonly DiagnosticDescriptor ComparerRule = DiagnosticDescriptorHelper.Create( 36internal static readonly DiagnosticDescriptor MethodRule = DiagnosticDescriptorHelper.Create( 46public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(MethodRule, ComparerRule); 89DiagnosticDescriptor rule;
Microsoft.NetCore.Analyzers\Runtime\DoNotUseStackallocInLoopsAnalyzer.cs (2)
20internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 30public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\DoNotUseTimersThatPreventPowerStateChanges.cs (2)
28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray<DiagnosticDescriptor>.Empty;
Microsoft.NetCore.Analyzers\Runtime\ForwardCancellationTokenToInvocations.Analyzer.cs (2)
45internal static readonly DiagnosticDescriptor ForwardCancellationTokenToInvocationsRule = DiagnosticDescriptorHelper.Create( 60public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Microsoft.NetCore.Analyzers\Runtime\InitializeStaticFieldsInline.cs (3)
28internal static readonly DiagnosticDescriptor CA1810Rule = DiagnosticDescriptorHelper.Create( 38internal static readonly DiagnosticDescriptor CA2207Rule = DiagnosticDescriptorHelper.Create( 48public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(CA1810Rule, CA2207Rule);
Microsoft.NetCore.Analyzers\Runtime\InstantiateArgumentExceptionsCorrectly.cs (4)
29internal static readonly DiagnosticDescriptor RuleNoArguments = DiagnosticDescriptorHelper.Create( 39internal static readonly DiagnosticDescriptor RuleIncorrectMessage = DiagnosticDescriptorHelper.Create( 49internal static readonly DiagnosticDescriptor RuleIncorrectParameterName = DiagnosticDescriptorHelper.Create( 59public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(RuleNoArguments, RuleIncorrectMessage, RuleIncorrectParameterName);
Microsoft.NetCore.Analyzers\Runtime\LoggerMessageDefineAnalyzer.cs (7)
38internal static readonly DiagnosticDescriptor CA1727Rule = DiagnosticDescriptorHelper.Create(CA1727RuleId, 48internal static readonly DiagnosticDescriptor CA1848Rule = DiagnosticDescriptorHelper.Create(CA1848RuleId, 58internal static readonly DiagnosticDescriptor CA2253Rule = DiagnosticDescriptorHelper.Create(CA2253RuleId, 68internal static readonly DiagnosticDescriptor CA2254Rule = DiagnosticDescriptorHelper.Create(CA2254RuleId, 78internal static readonly DiagnosticDescriptor CA2017Rule = DiagnosticDescriptorHelper.Create(CA2017RuleId, 88internal static readonly DiagnosticDescriptor CA2023Rule = DiagnosticDescriptorHelper.Create(CA2023RuleId, 98public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(CA1727Rule, CA1848Rule, CA2253Rule, CA2254Rule, CA2017Rule, CA2023Rule);
Microsoft.NetCore.Analyzers\Runtime\ModuleInitializerAttributeShouldNotBeUsedInLibraries.cs (2)
30internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create(RuleId, 39public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\NormalizeStringsToUppercase.cs (2)
30internal static readonly DiagnosticDescriptor ToUpperRule = DiagnosticDescriptorHelper.Create( 40public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(ToUpperRule);
Microsoft.NetCore.Analyzers\Runtime\PreferAsSpanOverSubstring.cs (2)
27internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 37public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\PreferConstCharOverConstUnitStringAnalyzer.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\PreferDictionaryContainsMethods.cs (3)
25internal static readonly DiagnosticDescriptor ContainsKeyRule = DiagnosticDescriptorHelper.Create( 35internal static readonly DiagnosticDescriptor ContainsValueRule = DiagnosticDescriptorHelper.Create( 51public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(ContainsKeyRule, ContainsValueRule);
Microsoft.NetCore.Analyzers\Runtime\PreferJsonElementParse.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\PreferStreamAsyncMemoryOverloads.cs (4)
44internal static readonly DiagnosticDescriptor PreferStreamReadAsyncMemoryOverloadsRule = DiagnosticDescriptorHelper.Create( 54internal static readonly DiagnosticDescriptor PreferStreamWriteAsyncMemoryOverloadsRule = DiagnosticDescriptorHelper.Create( 64public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = 216DiagnosticDescriptor rule;
Microsoft.NetCore.Analyzers\Runtime\PreferStringContainsOverIndexOfAnalyzer.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\PreferTypedStringBuilderAppendOverloads.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\PreventNumericIntPtrUIntPtrBehavioralChanges.cs (4)
26internal static readonly DiagnosticDescriptor OperatorThrowsRule = DiagnosticDescriptorHelper.Create( 36internal static readonly DiagnosticDescriptor ConversionThrowsRule = DiagnosticDescriptorHelper.Create( 46internal static readonly DiagnosticDescriptor ConversionNotThrowRule = DiagnosticDescriptorHelper.Create( 56public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(OperatorThrowsRule, ConversionThrowsRule, ConversionNotThrowRule);
Microsoft.NetCore.Analyzers\Runtime\ProvideCorrectArgumentsToFormattingMethods.cs (3)
28internal static readonly DiagnosticDescriptor ArgumentCountRule = DiagnosticDescriptorHelper.Create( 38internal static readonly DiagnosticDescriptor InvalidFormatRule = DiagnosticDescriptorHelper.Create( 48public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Microsoft.NetCore.Analyzers\Runtime\ProvideDeserializationMethodsForOptionalFields.cs (2)
42public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray<DiagnosticDescriptor>.Empty;
Microsoft.NetCore.Analyzers\Runtime\ProvideStreamMemoryBasedAsyncOverrides.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\SealInternalTypes.cs (2)
21internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\SerializationRulesDiagnosticAnalyzer.cs (3)
25internal static readonly DiagnosticDescriptor RuleCA2237 = DiagnosticDescriptorHelper.Create( 38internal static readonly DiagnosticDescriptor RuleCA2235 = DiagnosticDescriptorHelper.Create( 48public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(RuleCA2235, RuleCA2237);
Microsoft.NetCore.Analyzers\Runtime\SpecifyCultureForToLowerAndToUpper.cs (2)
20internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\SpecifyCultureInfo.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\SpecifyIFormatProvider.cs (8)
30internal static readonly DiagnosticDescriptor IFormatProviderAlternateStringRule = DiagnosticDescriptorHelper.Create( 40internal static readonly DiagnosticDescriptor IFormatProviderAlternateRule = DiagnosticDescriptorHelper.Create( 50internal static readonly DiagnosticDescriptor IFormatProviderOptionalRule = DiagnosticDescriptorHelper.Create( 60internal static readonly DiagnosticDescriptor UICultureStringRule = DiagnosticDescriptorHelper.Create( 70internal static readonly DiagnosticDescriptor UICultureRule = DiagnosticDescriptorHelper.Create( 82public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(IFormatProviderAlternateStringRule, IFormatProviderAlternateRule, IFormatProviderOptionalRule, UICultureStringRule, UICultureRule); 216var iformatProviderAlternateRule = targetMethod.ReturnType.Equals(stringType) ? 267var uiCultureRule = targetMethod.ReturnType.Equals(stringType) ?
Microsoft.NetCore.Analyzers\Runtime\SpecifyStringComparison.cs (4)
30internal static readonly DiagnosticDescriptor Rule_CA1307 = DiagnosticDescriptorHelper.Create( 40internal static readonly DiagnosticDescriptor Rule_CA1310 = DiagnosticDescriptorHelper.Create( 50public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule_CA1307, Rule_CA1310); 196DiagnosticDescriptor rule,
Microsoft.NetCore.Analyzers\Runtime\TestForEmptyStringsUsingStringLength.cs (2)
33private static readonly DiagnosticDescriptor s_rule = DiagnosticDescriptorHelper.Create( 43public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(s_rule);
Microsoft.NetCore.Analyzers\Runtime\TestForNaNCorrectly.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\UseAsyncMethodInAsyncContext.cs (3)
35internal static readonly DiagnosticDescriptor Descriptor = DiagnosticDescriptorHelper.Create(RuleId, 44internal static readonly DiagnosticDescriptor DescriptorNoAlternativeMethod = DiagnosticDescriptorHelper.Create(RuleId, 53public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Descriptor, DescriptorNoAlternativeMethod);
Microsoft.NetCore.Analyzers\Runtime\UseCancellationTokenThrowIfCancellationRequested.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\UseEnvironmentMembers.cs (4)
29internal static readonly DiagnosticDescriptor UseEnvironmentProcessIdRule = DiagnosticDescriptorHelper.Create(EnvironmentProcessIdRuleId, 39internal static readonly DiagnosticDescriptor UseEnvironmentProcessPathRule = DiagnosticDescriptorHelper.Create(EnvironmentProcessPathRuleId, 49internal static readonly DiagnosticDescriptor UseEnvironmentCurrentManagedThreadIdRule = DiagnosticDescriptorHelper.Create(EnvironmentCurrentManagedThreadIdRuleId, 58public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(UseEnvironmentProcessIdRule, UseEnvironmentProcessPathRule, UseEnvironmentCurrentManagedThreadIdRule);
Microsoft.NetCore.Analyzers\Runtime\UseExceptionThrowHelpers.cs (5)
32internal static readonly DiagnosticDescriptor UseArgumentNullExceptionThrowIfNullRule = DiagnosticDescriptorHelper.Create(UseArgumentNullExceptionThrowIfNullRuleId, 44internal static readonly DiagnosticDescriptor UseArgumentExceptionThrowIfNullOrEmptyRule = DiagnosticDescriptorHelper.Create(UseArgumentExceptionThrowIfNullOrEmptyRuleId, 63internal static readonly DiagnosticDescriptor UseArgumentOutOfRangeExceptionThrowIfRule = DiagnosticDescriptorHelper.Create(UseArgumentOutOfRangeExceptionThrowIfRuleId, 73internal static readonly DiagnosticDescriptor UseObjectDisposedExceptionThrowIfRule = DiagnosticDescriptorHelper.Create(UseObjectDisposedExceptionThrowIfRuleId, 82public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
Microsoft.NetCore.Analyzers\Runtime\UseOrdinalStringComparison.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 43public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\UseRegexMembers.cs (3)
27internal static readonly DiagnosticDescriptor UseRegexIsMatchRuleId = DiagnosticDescriptorHelper.Create(RegexIsMatchRuleId, 37internal static readonly DiagnosticDescriptor UseRegexCountRuleId = DiagnosticDescriptorHelper.Create(RegexCountRuleId, 46public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
Microsoft.NetCore.Analyzers\Runtime\UseSpanBasedStringConcat.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 46public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\UseStringEqualsOverStringCompare.cs (2)
33internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 43public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Runtime\UseThreadStaticCorrectly.cs (3)
27internal static readonly DiagnosticDescriptor ThreadStaticOnNonStaticFieldRule = DiagnosticDescriptorHelper.Create(ThreadStaticNonStaticFieldRuleId, 38internal static readonly DiagnosticDescriptor ThreadStaticInitializedInlineRule = DiagnosticDescriptorHelper.Create(ThreadStaticInitializedInlineRuleId, 47public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(ThreadStaticOnNonStaticFieldRule, ThreadStaticInitializedInlineRule);
Microsoft.NetCore.Analyzers\Security\ApprovedCipherModeAnalyzer.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DataSetDataTableInIFormatterSerializableObjectGraphAnalyzer.cs (2)
25internal static readonly DiagnosticDescriptor ObjectGraphContainsDangerousTypeDescriptor = 35public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Microsoft.NetCore.Analyzers\Security\DataSetDataTableInSerializableObjectGraphAnalyzer.cs (2)
35internal static readonly DiagnosticDescriptor ObjectGraphContainsDangerousTypeDescriptor = 45public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Microsoft.NetCore.Analyzers\Security\DataSetDataTableInSerializableTypeAnalyzer.cs (5)
28internal static readonly DiagnosticDescriptor RceSerializableContainsDangerousType = 38internal static readonly DiagnosticDescriptor SerializableContainsDangerousType = 50internal static readonly DiagnosticDescriptor RceAutogeneratedSerializableContainsDangerousType = 60public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = 173DiagnosticDescriptor diagnosticToReport;
Microsoft.NetCore.Analyzers\Security\DataSetDataTableInWebSerializableObjectGraphAnalyzer.cs (2)
25internal static readonly DiagnosticDescriptor ObjectGraphContainsDangerousTypeDescriptor = 35public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Microsoft.NetCore.Analyzers\Security\DoNotAddArchiveItemPathToTheTargetFileSystemPath.cs (2)
18internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 30protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\DoNotAddSchemaByURL.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotAlwaysSkipTokenValidationInDelegates.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotCallDangerousMethodsInDeserialization.cs (2)
38internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 49public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotDisableCertificateValidation.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotDisableHttpClientCRLCheck.cs (4)
31internal static readonly DiagnosticDescriptor DefinitelyDisableHttpClientCRLCheckRule = SecurityHelpers.CreateDiagnosticDescriptor( 41internal static readonly DiagnosticDescriptor MaybeDisableHttpClientCRLCheckRule = SecurityHelpers.CreateDiagnosticDescriptor( 51public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = 220DiagnosticDescriptor descriptor;
Microsoft.NetCore.Analyzers\Security\DoNotDisableHttpHeaderChecking.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotDisableRequestValidation.cs (2)
22internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotDisableTokenValidationChecks.cs (2)
30internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 40public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotHardCodeCertificate.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 28protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\DoNotHardCodeEncryptionKey.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 28protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\DoNotInstallRootCert.cs (4)
32internal static readonly DiagnosticDescriptor DefinitelyInstallRootCertRule = SecurityHelpers.CreateDiagnosticDescriptor( 42internal static readonly DiagnosticDescriptor MaybeInstallRootCertRule = SecurityHelpers.CreateDiagnosticDescriptor( 52public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 209DiagnosticDescriptor descriptor;
Microsoft.NetCore.Analyzers\Security\DoNotSerializeTypeWithPointerFields.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotSetSwitch.cs (6)
30internal static readonly DiagnosticDescriptor DoNotDisableSchUseStrongCryptoRule = SecurityHelpers.CreateDiagnosticDescriptor( 40internal static readonly DiagnosticDescriptor DoNotDisableSpmSecurityProtocolsRule = SecurityHelpers.CreateDiagnosticDescriptor( 49internal static ImmutableDictionary<string, (bool BadValue, DiagnosticDescriptor Rule)> BadSwitches = 58(o) => new KeyValuePair<string, (bool, DiagnosticDescriptor)>(o.Item1, o.Item2))); 60public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 173private static bool IsConfiguredToSkipAnalysis(DiagnosticDescriptor rule, OperationAnalysisContext context)
Microsoft.NetCore.Analyzers\Security\DoNotUseAccountSAS.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotUseCreateEncryptorWithNonDefaultIV.cs (4)
30internal static readonly DiagnosticDescriptor DefinitelyUseCreateEncryptorWithNonDefaultIVRule = SecurityHelpers.CreateDiagnosticDescriptor( 40internal static readonly DiagnosticDescriptor MaybeUseCreateEncryptorWithNonDefaultIVRule = SecurityHelpers.CreateDiagnosticDescriptor( 50public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 185DiagnosticDescriptor descriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseDataSetReadXml.cs (5)
22internal static readonly DiagnosticDescriptor RealMethodUsedDescriptor = 32internal static readonly DiagnosticDescriptor RealMethodUsedInAutogeneratedDescriptor = 42public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = 45protected override DiagnosticDescriptor? ChooseDiagnosticDescriptor(OperationAnalysisContext operationAnalysisContext, WellKnownTypeProvider wellKnownTypeProvider) 58protected override DiagnosticDescriptor MethodUsedDescriptor => RealMethodUsedDescriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseDataTableReadXml.cs (2)
22internal static readonly DiagnosticDescriptor RealMethodUsedDescriptor = 38protected override DiagnosticDescriptor MethodUsedDescriptor => RealMethodUsedDescriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseDeprecatedSecurityProtocols.cs (3)
24internal static readonly DiagnosticDescriptor DeprecatedRule = SecurityHelpers.CreateDiagnosticDescriptor( 34internal static readonly DiagnosticDescriptor HardCodedRule = SecurityHelpers.CreateDiagnosticDescriptor( 53public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DeprecatedRule, HardCodedRule);
Microsoft.NetCore.Analyzers\Security\DoNotUseDSA.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 41public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureCryptographicAlgorithms.cs (4)
27internal static readonly DiagnosticDescriptor DoNotUseBrokenCryptographyRule = 38internal static readonly DiagnosticDescriptor DoNotUseWeakCryptographyRule = 49public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DoNotUseBrokenCryptographyRule, DoNotUseWeakCryptographyRule); 88DiagnosticDescriptor rule;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerBinaryFormatterMethods.cs (2)
22internal static readonly DiagnosticDescriptor RealMethodUsedDescriptor = 39protected override DiagnosticDescriptor MethodUsedDescriptor => RealMethodUsedDescriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerBinaryFormatterWithoutBinder.cs (4)
22internal static readonly DiagnosticDescriptor RealBinderDefinitelyNotSetDescriptor = 32internal static readonly DiagnosticDescriptor RealBinderMaybeNotSetDescriptor = 50protected override DiagnosticDescriptor BinderDefinitelyNotSetDescriptor => RealBinderDefinitelyNotSetDescriptor; 52protected override DiagnosticDescriptor BinderMaybeNotSetDescriptor => RealBinderMaybeNotSetDescriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerJavascriptSerializerWithSimpleTypeResolver.cs (4)
33internal static readonly DiagnosticDescriptor DefinitelyWithSimpleTypeResolver = 43internal static readonly DiagnosticDescriptor MaybeWithSimpleTypeResolver = 53public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = 244DiagnosticDescriptor descriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerJsonNetWithoutBinder.cs (4)
35internal static readonly DiagnosticDescriptor DefinitelyInsecureSerializer = 45internal static readonly DiagnosticDescriptor MaybeInsecureSerializer = 55public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = 224DiagnosticDescriptor descriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerLosFormatter.cs (2)
21internal static readonly DiagnosticDescriptor RealMethodUsedDescriptor = 38protected override DiagnosticDescriptor MethodUsedDescriptor => RealMethodUsedDescriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerMethodsBase.cs (7)
36/// <see cref="DiagnosticDescriptor"/> for when a potentially insecure method is invoked 40protected abstract DiagnosticDescriptor MethodUsedDescriptor { get; } 50protected virtual DiagnosticDescriptor? ChooseDiagnosticDescriptor( 57public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 58ImmutableArray.Create<DiagnosticDescriptor>( 92DiagnosticDescriptor? chosenDiagnostic = 114DiagnosticDescriptor? chosenDiagnostic =
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerNetDataContractSerializerMethods.cs (2)
22internal static readonly DiagnosticDescriptor RealMethodUsedDescriptor = 39protected override DiagnosticDescriptor MethodUsedDescriptor => RealMethodUsedDescriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerNetDataContractSerializerWithoutBinder.cs (4)
22internal static readonly DiagnosticDescriptor RealBinderDefinitelyNotSetDescriptor = 32internal static readonly DiagnosticDescriptor RealBinderMaybeNotSetDescriptor = 50protected override DiagnosticDescriptor BinderDefinitelyNotSetDescriptor => RealBinderDefinitelyNotSetDescriptor; 52protected override DiagnosticDescriptor BinderMaybeNotSetDescriptor => RealBinderMaybeNotSetDescriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerObjectStateFormatter.cs (2)
21internal static readonly DiagnosticDescriptor RealMethodUsedDescriptor = 38protected override DiagnosticDescriptor MethodUsedDescriptor => RealMethodUsedDescriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureDeserializerWithoutBinderBase.cs (7)
47/// <see cref="DiagnosticDescriptor"/> for when a deserialization method is invoked and its Binder property is definitely not set. 50protected abstract DiagnosticDescriptor BinderDefinitelyNotSetDescriptor { get; } 53/// <see cref="DiagnosticDescriptor"/> for when a deserialization method is invoked and its Binder property is possibly not set. 56protected abstract DiagnosticDescriptor BinderMaybeNotSetDescriptor { get; } 58public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 59ImmutableArray.Create<DiagnosticDescriptor>( 208DiagnosticDescriptor descriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureRandomness.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotUseInsecureSettingsForJsonNet.cs (4)
34internal static readonly DiagnosticDescriptor DefinitelyInsecureSettings = 44internal static readonly DiagnosticDescriptor MaybeInsecureSettings = 54public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = 251DiagnosticDescriptor descriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseObsoleteKDFAlgorithm.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotUseWeakKDFAlgorithm.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\DoNotUseWeakKDFInsufficientIterationCount.cs (4)
33internal static readonly DiagnosticDescriptor DefinitelyUseWeakKDFInsufficientIterationCountRule = SecurityHelpers.CreateDiagnosticDescriptor( 43internal static readonly DiagnosticDescriptor MaybeUseWeakKDFInsufficientIterationCountRule = SecurityHelpers.CreateDiagnosticDescriptor( 53public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 205DiagnosticDescriptor descriptor;
Microsoft.NetCore.Analyzers\Security\DoNotUseXslTransform.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\Helpers\SecurityHelpers.cs (1)
31public static DiagnosticDescriptor CreateDiagnosticDescriptor(
Microsoft.NetCore.Analyzers\Security\JsonNetTypeNameHandling.cs (3)
25internal static readonly DiagnosticDescriptor Rule = 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = 37ImmutableArray.Create<DiagnosticDescriptor>(Rule);
Microsoft.NetCore.Analyzers\Security\PotentialReferenceCycleInDeserializedObjectGraph.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\ReviewCodeForCommandExecutionVulnerabilities.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 27protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\ReviewCodeForDllInjectionVulnerabilities.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 27protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\ReviewCodeForFilePathInjectionVulnerabilities.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 27protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\ReviewCodeForInformationDisclosureVulnerabilities.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 27protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\ReviewCodeForLdapInjectionVulnerabilities.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 27protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\ReviewCodeForOpenRedirectVulnerabilities.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 27protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\ReviewCodeForRegexInjectionVulnerabilities.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 27protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\ReviewCodeForSqlInjectionVulnerabilities.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 27protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\ReviewCodeForXamlInjectionVulnerabilities.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 27protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\ReviewCodeForXmlInjectionVulnerabilities.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 27protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\ReviewCodeForXPathInjectionVulnerabilities.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 27protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\ReviewCodeForXssVulnerabilities.cs (2)
16internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 27protected override DiagnosticDescriptor TaintedDataEnteringSinkDescriptor => Rule;
Microsoft.NetCore.Analyzers\Security\SetHttpOnlyForHttpCookie.cs (2)
28internal static readonly DiagnosticDescriptor Rule = SecurityHelpers.CreateDiagnosticDescriptor( 38public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Microsoft.NetCore.Analyzers\Security\SetViewStateUserKey.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\SourceTriggeredTaintedDataAnalyzerBase.cs (3)
30/// <see cref="DiagnosticDescriptor"/> for when tainted data enters a sink. 38protected abstract DiagnosticDescriptor TaintedDataEnteringSinkDescriptor { get; } 45public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(TaintedDataEnteringSinkDescriptor);
Microsoft.NetCore.Analyzers\Security\SslProtocolsAnalyzer.cs (3)
25internal static readonly DiagnosticDescriptor DeprecatedRule = SecurityHelpers.CreateDiagnosticDescriptor( 35internal static readonly DiagnosticDescriptor HardcodedRule = SecurityHelpers.CreateDiagnosticDescriptor( 54public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DeprecatedRule, HardcodedRule);
Microsoft.NetCore.Analyzers\Security\UseAutoValidateAntiforgeryToken.cs (3)
29internal static readonly DiagnosticDescriptor UseAutoValidateAntiforgeryTokenRule = SecurityHelpers.CreateDiagnosticDescriptor( 39internal static readonly DiagnosticDescriptor MissHttpVerbAttributeRule = SecurityHelpers.CreateDiagnosticDescriptor( 62public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
Microsoft.NetCore.Analyzers\Security\UseContainerLevelAccessPolicy.cs (2)
28internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 44public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\UseDefaultDllImportSearchPathsAttribute.cs (4)
25internal static readonly DiagnosticDescriptor UseDefaultDllImportSearchPathsAttributeRule = SecurityHelpers.CreateDiagnosticDescriptor( 35internal static readonly DiagnosticDescriptor DoNotUseUnsafeDllImportSearchPathRule = SecurityHelpers.CreateDiagnosticDescriptor( 51public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 124var rule = UseDefaultDllImportSearchPathsAttributeRule;
Microsoft.NetCore.Analyzers\Security\UseRSAWithSufficientKeySize.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 43public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\UseSecureCookiesASPNetCore.cs (4)
30internal static readonly DiagnosticDescriptor DefinitelyUseSecureCookiesASPNetCoreRule = SecurityHelpers.CreateDiagnosticDescriptor( 40internal static readonly DiagnosticDescriptor MaybeUseSecureCookiesASPNetCoreRule = SecurityHelpers.CreateDiagnosticDescriptor( 50public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create( 203DiagnosticDescriptor descriptor;
Microsoft.NetCore.Analyzers\Security\UseSharedAccessProtocolHttpsOnly.cs (2)
27internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 37public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\UseXmlReaderBase.cs (2)
28protected abstract DiagnosticDescriptor Rule { get; } 30public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Security\UseXmlReaderForDataSetReadXml.cs (2)
17internal static readonly DiagnosticDescriptor RealRule = DiagnosticDescriptorHelper.Create( 31protected override DiagnosticDescriptor Rule => RealRule;
Microsoft.NetCore.Analyzers\Security\UseXmlReaderForDeserialize.cs (2)
17internal static readonly DiagnosticDescriptor RealRule = DiagnosticDescriptorHelper.Create( 31protected override DiagnosticDescriptor Rule => RealRule;
Microsoft.NetCore.Analyzers\Security\UseXmlReaderForSchemaRead.cs (2)
17internal static readonly DiagnosticDescriptor RealRule = DiagnosticDescriptorHelper.Create( 31protected override DiagnosticDescriptor Rule => RealRule;
Microsoft.NetCore.Analyzers\Security\UseXmlReaderForValidatingReader.cs (2)
17internal static readonly DiagnosticDescriptor RealRule = DiagnosticDescriptorHelper.Create( 31protected override DiagnosticDescriptor Rule => RealRule;
Microsoft.NetCore.Analyzers\Security\UseXmlReaderForXPathDocument.cs (2)
17internal static readonly DiagnosticDescriptor RealRule = DiagnosticDescriptorHelper.Create( 31protected override DiagnosticDescriptor Rule => RealRule;
Microsoft.NetCore.Analyzers\Tasks\DoNotConfigureAwaitWithSuppressThrowing.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create(RuleId, 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Tasks\DoNotCreateTaskCompletionSourceWithWrongArguments.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create(RuleId, 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Tasks\DoNotCreateTasksWithoutPassingATaskScheduler.cs (2)
24internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Tasks\DoNotUseNonCancelableTaskDelayWithWhenAny.cs (2)
23internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Tasks\DoNotUseWhenAllOrWaitAllWithSingleArgument.cs (3)
28internal static readonly DiagnosticDescriptor WhenAllRule = DiagnosticDescriptorHelper.Create(WhenAllRuleId, 37internal static readonly DiagnosticDescriptor WaitAllRule = DiagnosticDescriptorHelper.Create(WaitAllRuleId, 46public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(WhenAllRule, WaitAllRule);
Microsoft.NetCore.Analyzers\Tasks\UseValueTasksCorrectly.cs (5)
32internal static readonly DiagnosticDescriptor GeneralRule = DiagnosticDescriptorHelper.Create( 42internal static readonly DiagnosticDescriptor UnconsumedRule = DiagnosticDescriptorHelper.Create( 52internal static readonly DiagnosticDescriptor DoubleConsumptionRule = DiagnosticDescriptorHelper.Create( 62internal static readonly DiagnosticDescriptor AccessingIncompleteResultRule = DiagnosticDescriptorHelper.Create( 72public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(GeneralRule, UnconsumedRule, DoubleConsumptionRule, AccessingIncompleteResultRule);
Microsoft.NetCore.Analyzers\Usage\DoNotCompareSpanToNull.cs (3)
20internal static readonly DiagnosticDescriptor DoNotCompareSpanToNullRule = DiagnosticDescriptorHelper.Create( 30internal static readonly DiagnosticDescriptor DoNotCompareSpanToDefaultRule = DiagnosticDescriptorHelper.Create( 84public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DoNotCompareSpanToNullRule, DoNotCompareSpanToDefaultRule);
Microsoft.NetCore.Analyzers\Usage\DoNotPassNonNullableValueToArgumentNullExceptionThrowIfNull.cs (3)
21internal static readonly DiagnosticDescriptor DoNotPassNonNullableValueDiagnostic = DiagnosticDescriptorHelper.Create( 31internal static readonly DiagnosticDescriptor DoNotPassNullableStructDiagnostic = DiagnosticDescriptorHelper.Create( 79public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DoNotPassNonNullableValueDiagnostic, DoNotPassNullableStructDiagnostic);
Microsoft.NetCore.Analyzers\Usage\ImplementGenericMathInterfacesCorrectly.cs (3)
22internal static readonly DiagnosticDescriptor GMIRule = DiagnosticDescriptorHelper.Create( 38public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(GMIRule); 134private static Diagnostic CreateDiagnostic(DiagnosticDescriptor GMIRule, SyntaxNode? parameter,
Microsoft.NetCore.Analyzers\Usage\MissingShebangInFileBasedProgram.cs (2)
17internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 28public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Usage\PreferGenericOverloads.cs (2)
25internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 35public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetCore.Analyzers\Usage\ProvideCorrectArgumentToEnumHasFlag.cs (2)
23internal static readonly DiagnosticDescriptor DifferentTypeRule = DiagnosticDescriptorHelper.Create( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DifferentTypeRule);
Microsoft.NetCore.Analyzers\Usage\ProvideHttpClientHandlerMaxResponseHeaderLengthValueCorrectly.cs (2)
26internal static readonly DiagnosticDescriptor EnsureMaxResponseHeaderLengthRule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(EnsureMaxResponseHeaderLengthRule);
Microsoft.NetFramework.Analyzers\AvoidDuplicateAccelerators.cs (2)
28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray<DiagnosticDescriptor>.Empty;
Microsoft.NetFramework.Analyzers\CallBaseClassMethodsOnISerializableTypes.cs (2)
28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray<DiagnosticDescriptor>.Empty;
Microsoft.NetFramework.Analyzers\DoNotCatchCorruptedStateExceptions.cs (2)
20internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 30public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Microsoft.NetFramework.Analyzers\DoNotMarkServicedComponentsWithWebMethod.cs (2)
28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray<DiagnosticDescriptor>.Empty;
Microsoft.NetFramework.Analyzers\DoNotUseInsecureDtdProcessing.cs (11)
31internal static readonly DiagnosticDescriptor RuleXmlDocumentWithNoSecureResolver = 42internal static readonly DiagnosticDescriptor RuleXmlTextReaderConstructedWithNoSecureResolution = 45internal static readonly DiagnosticDescriptor RuleDoNotUseDtdProcessingOverloads = 48internal static readonly DiagnosticDescriptor RuleXmlReaderCreateWrongOverload = 51internal static readonly DiagnosticDescriptor RuleXmlReaderCreateInsecureInput = 54internal static readonly DiagnosticDescriptor RuleXmlReaderCreateInsecureConstructed = 57internal static readonly DiagnosticDescriptor RuleXmlTextReaderSetInsecureResolution = 60internal static readonly DiagnosticDescriptor RuleDoNotUseSetInnerXml = 63internal static readonly DiagnosticDescriptor RuleReviewDtdProcessingProperties = 66public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 720private static DiagnosticDescriptor CreateDiagnosticDescriptor(LocalizableResourceString messageFormat)
Microsoft.NetFramework.Analyzers\DoNotUseInsecureDtdProcessingInApiDesign.cs (2)
28internal static readonly DiagnosticDescriptor RuleDoNotUseInsecureDtdProcessingInApiDesign = 39public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Microsoft.NetFramework.Analyzers\DoNotUseInsecureXSLTScriptExecution.cs (2)
26internal static readonly DiagnosticDescriptor RuleDoNotUseInsecureXSLTScriptExecution = 37public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(RuleDoNotUseInsecureXSLTScriptExecution);
Microsoft.NetFramework.Analyzers\MarkVerbHandlersWithValidateAntiforgeryTokenAnalyzer.cs (6)
24internal static readonly DiagnosticDescriptor NoVerbsRule = DiagnosticDescriptorHelper.Create( 34internal static readonly DiagnosticDescriptor NoVerbsNoTokenRule = DiagnosticDescriptorHelper.Create( 44internal static readonly DiagnosticDescriptor GetAndTokenRule = DiagnosticDescriptorHelper.Create( 54internal static readonly DiagnosticDescriptor GetAndOtherAndTokenRule = DiagnosticDescriptorHelper.Create( 64internal static readonly DiagnosticDescriptor VerbsAndNoTokenRule = DiagnosticDescriptorHelper.Create( 74public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(NoVerbsRule, NoVerbsNoTokenRule, GetAndTokenRule, GetAndOtherAndTokenRule, VerbsAndNoTokenRule);
Microsoft.NetFramework.Analyzers\SetLocaleForDataTypes.cs (2)
28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray<DiagnosticDescriptor>.Empty;
Microsoft.NetFramework.Analyzers\TypesShouldNotExtendCertainBaseTypes.cs (2)
26internal static readonly DiagnosticDescriptor Rule = DiagnosticDescriptorHelper.Create( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
src\440320f3f10733a8\ValueContentAnalysis.cs (2)
33DiagnosticDescriptor rule, 47DiagnosticDescriptor rule,
src\47c588c5b8785708\ParameterValidationAnalysis.cs (1)
34DiagnosticDescriptor rule,
src\8ce1f4f68b646e6d\GlobalFlowStateAnalysis.cs (2)
38/// <param name="rule"><see cref="DiagnosticDescriptor"/> for fetching any rule specific analyzer option values from <paramref name="analyzerOptions"/>.</param> 62DiagnosticDescriptor rule,
src\9382845807600969\InterproceduralAnalysisConfiguration.cs (5)
42DiagnosticDescriptor rule, 53DiagnosticDescriptor rule, 82ImmutableArray<DiagnosticDescriptor> rules, 93ImmutableArray<DiagnosticDescriptor> rules, 104foreach (var rule in rules)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\DiagnosticDescriptorHelper.cs (1)
13public static DiagnosticDescriptor Create(
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (17)
19DiagnosticDescriptor rule, 25DiagnosticDescriptor rule, 32DiagnosticDescriptor rule, 46DiagnosticDescriptor rule, 52DiagnosticDescriptor rule, 61DiagnosticDescriptor rule, 71DiagnosticDescriptor rule, 79DiagnosticDescriptor rule, 87DiagnosticDescriptor rule, 96DiagnosticDescriptor rule, 106DiagnosticDescriptor rule, 113DiagnosticDescriptor rule, 133DiagnosticDescriptor rule, 141DiagnosticDescriptor rule, 169DiagnosticDescriptor rule, 175DiagnosticDescriptor rule, 181DiagnosticDescriptor rule,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (4)
30public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 47public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 66public bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, out T value) 92private (bool found, object? value) ComputeOptionValue<T, TArg>(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (3)
83public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 101public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 111private bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, [MaybeNullWhen(false)] out T value)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (37)
46DiagnosticDescriptor rule, 56DiagnosticDescriptor rule, 64DiagnosticDescriptor rule, 74DiagnosticDescriptor rule, 82DiagnosticDescriptor rule, 92DiagnosticDescriptor rule, 100DiagnosticDescriptor rule, 107DiagnosticDescriptor rule, 115DiagnosticDescriptor rule, 125DiagnosticDescriptor rule, 134DiagnosticDescriptor rule, 150DiagnosticDescriptor rule, 177DiagnosticDescriptor rule, 187DiagnosticDescriptor rule, 198DiagnosticDescriptor? rule, 210DiagnosticDescriptor rule, 222DiagnosticDescriptor rule, 238DiagnosticDescriptor rule, 245DiagnosticDescriptor rule, 252DiagnosticDescriptor rule, 259DiagnosticDescriptor rule, 296DiagnosticDescriptor rule, 305DiagnosticDescriptor rule, 315DiagnosticDescriptor rule, 322DiagnosticDescriptor rule, 329DiagnosticDescriptor rule, 336DiagnosticDescriptor rule, 378DiagnosticDescriptor rule, 385DiagnosticDescriptor rule, 424DiagnosticDescriptor rule, 432DiagnosticDescriptor rule, 439DiagnosticDescriptor rule, 446DiagnosticDescriptor rule, 454DiagnosticDescriptor rule, 576DiagnosticDescriptor rule, 591DiagnosticDescriptor rule, 610DiagnosticDescriptor rule,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Options\ICategorizedAnalyzerConfigOptions.cs (2)
50T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality); 52T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.cs (1)
40DiagnosticDescriptor rule,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysisHelper.cs (1)
125DiagnosticDescriptor rule,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataAnalysis.cs (1)
32DiagnosticDescriptor rule,
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
32private static readonly DiagnosticDescriptor s_dummyDataflowAnalysisDescriptor = new(
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\Options\AnalyzerOptionsExtensions_FlowAnalysis.cs (12)
15DiagnosticDescriptor rule, 25DiagnosticDescriptor rule, 33DiagnosticDescriptor rule, 43DiagnosticDescriptor rule, 51DiagnosticDescriptor rule, 61DiagnosticDescriptor rule, 69DiagnosticDescriptor rule, 79DiagnosticDescriptor rule, 87DiagnosticDescriptor rule, 97DiagnosticDescriptor rule, 105DiagnosticDescriptor rule, 115DiagnosticDescriptor rule,
Microsoft.CodeAnalysis.Razor.Compiler (13)
SourceGenerators\Diagnostics\RazorDiagnostics.cs (13)
15public static readonly DiagnosticDescriptor InvalidRazorLangVersionDescriptor = 22public static readonly DiagnosticDescriptor InvalidRazorWarningLevelDescriptor = 29public static readonly DiagnosticDescriptor ReComputingTagHelpersDescriptor = 36public static readonly DiagnosticDescriptor TargetPathNotProvided = 43public static readonly DiagnosticDescriptor GeneratedOutputFullPathNotProvided = 50public static readonly DiagnosticDescriptor CurrentCompilationReferenceNotFoundDescriptor = 57public static readonly DiagnosticDescriptor SkippingGeneratedFileWriteDescriptor = 64public static readonly DiagnosticDescriptor SourceTextNotFoundDescriptor = 71public static readonly DiagnosticDescriptor UnexpectedProjectItemReadCallDescriptor = 78public static readonly DiagnosticDescriptor InvalidRazorContextComputedDescriptor = 85public static readonly DiagnosticDescriptor MetadataReferenceNotProvidedDescriptor = 94var descriptor = new DiagnosticDescriptor( 130private static DiagnosticDescriptor CreateDescriptor(string id, string titleResourceName, string messageResourceName, DiagnosticSeverity defaultSeverity)
Microsoft.CodeAnalysis.ResxSourceGenerator (73)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (16)
20DiagnosticDescriptor rule, 26DiagnosticDescriptor rule, 33DiagnosticDescriptor rule, 47DiagnosticDescriptor rule, 53DiagnosticDescriptor rule, 62DiagnosticDescriptor rule, 72DiagnosticDescriptor rule, 80DiagnosticDescriptor rule, 88DiagnosticDescriptor rule, 97DiagnosticDescriptor rule, 107DiagnosticDescriptor rule, 114DiagnosticDescriptor rule, 134DiagnosticDescriptor rule, 142DiagnosticDescriptor rule, 161DiagnosticDescriptor rule, 167DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (4)
31public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 48public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 67public bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, out T value) 93private (bool found, object? value) ComputeOptionValue<T, TArg>(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (3)
82public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 100public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 110private bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, [MaybeNullWhen(false)] out T value)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (37)
47DiagnosticDescriptor rule, 57DiagnosticDescriptor rule, 65DiagnosticDescriptor rule, 75DiagnosticDescriptor rule, 83DiagnosticDescriptor rule, 93DiagnosticDescriptor rule, 101DiagnosticDescriptor rule, 108DiagnosticDescriptor rule, 116DiagnosticDescriptor rule, 126DiagnosticDescriptor rule, 135DiagnosticDescriptor rule, 151DiagnosticDescriptor rule, 178DiagnosticDescriptor rule, 188DiagnosticDescriptor rule, 199DiagnosticDescriptor? rule, 211DiagnosticDescriptor rule, 223DiagnosticDescriptor rule, 239DiagnosticDescriptor rule, 246DiagnosticDescriptor rule, 253DiagnosticDescriptor rule, 260DiagnosticDescriptor rule, 297DiagnosticDescriptor rule, 306DiagnosticDescriptor rule, 316DiagnosticDescriptor rule, 323DiagnosticDescriptor rule, 330DiagnosticDescriptor rule, 337DiagnosticDescriptor rule, 379DiagnosticDescriptor rule, 386DiagnosticDescriptor rule, 425DiagnosticDescriptor rule, 433DiagnosticDescriptor rule, 440DiagnosticDescriptor rule, 447DiagnosticDescriptor rule, 455DiagnosticDescriptor rule, 577DiagnosticDescriptor rule, 592DiagnosticDescriptor rule, 611DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\ICategorizedAnalyzerConfigOptions.cs (2)
51T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality); 53T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (10)
23public static ImmutableArray<string> ImmutableCustomTags(this DiagnosticDescriptor descriptor) 35this DiagnosticDescriptor descriptor, 64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions) 97public static bool IsDefinedInEditorConfig(this DiagnosticDescriptor descriptor, AnalyzerConfigOptions analyzerConfigOptions) 146this DiagnosticDescriptor descriptor, 215DiagnosticDescriptor descriptor, 251public static bool IsCompilationEnd(this DiagnosticDescriptor descriptor) 255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 259public static DiagnosticDescriptor WithMessageFormat(this DiagnosticDescriptor descriptor, LocalizableString messageFormat)
Microsoft.CodeAnalysis.VisualBasic (1)
Compilation\VisualBasicDiagnosticFilter.vb (1)
163report = DiagnosticDescriptor.MapSeverityToReport(severity)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Diagnostics\Analyzers\VisualBasicUnboundIdentifiersDiagnosticAnalyzer.vb (1)
21Protected Overrides ReadOnly Property DiagnosticDescriptor As DiagnosticDescriptor
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (4)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\BasicOverrideEqualsOnOverloadingOperatorEquals.vb (2)
23Friend Shared Rule As DiagnosticDescriptor = DiagnosticDescriptorHelper.Create( 33Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) = ImmutableArray.Create(Rule)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\BasicOverrideGetHashCodeOnOverridingEquals.vb (2)
23Friend Shared Rule As DiagnosticDescriptor = DiagnosticDescriptorHelper.Create( 33Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) = ImmutableArray.Create(Rule)
Microsoft.CodeAnalysis.Workspaces (40)
Diagnostics\DiagnosticAnalyzerInfoCache.cs (13)
20/// <see cref="DiagnosticAnalyzer"/> instance, <see cref="DiagnosticDescriptor"/>s. 53private readonly ConcurrentDictionary<string, DiagnosticDescriptor?> _idToDescriptorsMap = []; 55private sealed class DiagnosticDescriptorsInfo(ImmutableArray<DiagnosticDescriptor> supportedDescriptors, bool telemetryAllowed) 57public readonly ImmutableArray<DiagnosticDescriptor> SupportedDescriptors = supportedDescriptors; 70public ImmutableArray<DiagnosticDescriptor> GetDiagnosticDescriptors(DiagnosticAnalyzer analyzer) 83public ImmutableArray<DiagnosticDescriptor> GetNonCompilationEndDiagnosticDescriptors(DiagnosticAnalyzer analyzer) 95public ImmutableArray<DiagnosticDescriptor> GetCompilationEndDiagnosticDescriptors(DiagnosticAnalyzer analyzer) 116public bool TryGetDescriptorForDiagnosticId(string diagnosticId, [NotNullWhen(true)] out DiagnosticDescriptor? descriptor) 124ImmutableArray<DiagnosticDescriptor> descriptors; 163private static bool IsTelemetryCollectionAllowed(DiagnosticAnalyzer analyzer, ImmutableArray<DiagnosticDescriptor> descriptors) 168private void PopulateIdToDescriptorMap(ImmutableArray<DiagnosticDescriptor> descriptors) 170foreach (var descriptor in descriptors) 172if (!_idToDescriptorsMap.TryGetValue(descriptor.Id, out var existingDescriptor))
Diagnostics\DiagnosticData.cs (1)
327public static bool TryCreate(DiagnosticDescriptor descriptor, string[] messageArguments, Project project, [NotNullWhen(true)] out DiagnosticData? diagnosticData)
Diagnostics\DiagnosticDescriptorData.cs (2)
43public static DiagnosticDescriptorData Create(DiagnosticDescriptor descriptor) 57public DiagnosticDescriptor ToDiagnosticDescriptor()
Diagnostics\FileContentLoadAnalyzer.cs (1)
23public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Diagnostics\GeneratorDiagnosticsPlaceholderAnalyzer.cs (1)
24public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => [];
Diagnostics\HostDiagnosticAnalyzers.cs (8)
102foreach (var descriptor in descriptors) 112public ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsPerReference( 127private static ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> ConvertReferenceIdentityToName( 128ImmutableDictionary<object, ImmutableArray<DiagnosticDescriptor>> descriptorsPerReference, 131var builder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<DiagnosticDescriptor>>(); 194private static ImmutableDictionary<object, ImmutableArray<DiagnosticDescriptor>> CreateDiagnosticDescriptorsPerReference( 198var builder = ImmutableDictionary.CreateBuilder<object, ImmutableArray<DiagnosticDescriptor>>(); 201var descriptors = ImmutableArray.CreateBuilder<DiagnosticDescriptor>();
Diagnostics\SkippedHostAnalyzersInfo.cs (2)
63foreach (var descriptor in analyzerInfoCache.GetDiagnosticDescriptors(analyzer)) 134foreach (var descriptor in descriptors)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (10)
23public static ImmutableArray<string> ImmutableCustomTags(this DiagnosticDescriptor descriptor) 35this DiagnosticDescriptor descriptor, 64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions) 97public static bool IsDefinedInEditorConfig(this DiagnosticDescriptor descriptor, AnalyzerConfigOptions analyzerConfigOptions) 146this DiagnosticDescriptor descriptor, 215DiagnosticDescriptor descriptor, 251public static bool IsCompilationEnd(this DiagnosticDescriptor descriptor) 255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 259public static DiagnosticDescriptor WithMessageFormat(this DiagnosticDescriptor descriptor, LocalizableString messageFormat)
Workspace\WorkspaceDiagnosticDescriptors.cs (1)
9internal static readonly DiagnosticDescriptor ErrorReadingFileContent;
Microsoft.DotNet.CodeAnalysis (10)
Analyzers\AppContextDefaultsAnalyzer.cs (4)
26private static readonly DiagnosticDescriptor s_appContextDefaultNotInitializedToTrueDiagnostic = 29private static readonly DiagnosticDescriptor s_appContextDefaultUsedUnexpectedIfStatementDiagnostic = 32private static readonly DiagnosticDescriptor s_appContextDefaultValueDefinedOutsideIfConditionDiagnostic = 44public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Analyzers\MembersMustExistAnalyzer.cs (2)
25private static readonly DiagnosticDescriptor s_memberMustExistDiagnostic = 28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(s_memberMustExistDiagnostic); } }
Analyzers\PinvokeAnalyzer.cs (2)
24private static DiagnosticDescriptor InvalidPinvokeCall = new DiagnosticDescriptor(DiagnosticIds.BCL0015.ToString(), Title, MessageFormat, AnalyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description); 26public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(InvalidPinvokeCall); } }
Analyzers\ResourceUsageAnalyzer.cs (2)
19private static DiagnosticDescriptor InvalidSRFormatCall = new DiagnosticDescriptor(DiagnosticIds.BCL0020.ToString(), Title, "", AnalyzerName, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description); 21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(InvalidSRFormatCall); } }
Microsoft.Extensions.Configuration.Binder.SourceGeneration (22)
ConfigurationBindingGenerator.Parser.cs (5)
160private TypeRef EnqueueTransitiveType(TypeParseInfo containingTypeParseInfo, ITypeSymbol memberTypeSymbol, DiagnosticDescriptor diagDescriptor, string? memberName = null) 644DiagnosticDescriptor? initDiagDescriptor = null; 951DiagnosticDescriptor descriptor = DiagnosticDescriptors.GetNotSupportedDescriptor(unsupportedTypeSpec.NotSupportedReason); 961private void RecordTypeDiagnostic(TypeParseInfo typeParseInfo, DiagnosticDescriptor descriptor) 985private void RecordDiagnostic(DiagnosticDescriptor descriptor, Location location, params object?[]? messageArgs)
Parser\DiagnosticDescriptors.cs (14)
16public static DiagnosticDescriptor TypeNotSupported { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.TypeNotSupported)); 17public static DiagnosticDescriptor MissingPublicInstanceConstructor { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.MissingPublicInstanceConstructor)); 18public static DiagnosticDescriptor CollectionNotSupported { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.CollectionNotSupported)); 19public static DiagnosticDescriptor DictionaryKeyNotSupported { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.DictionaryKeyNotSupported)); 20public static DiagnosticDescriptor ElementTypeNotSupported { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.ElementTypeNotSupported)); 21public static DiagnosticDescriptor MultipleParameterizedConstructors { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.MultipleParameterizedConstructors)); 22public static DiagnosticDescriptor MultiDimArraysNotSupported { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.MultiDimArraysNotSupported)); 23public static DiagnosticDescriptor NullableUnderlyingTypeNotSupported { get; } = CreateTypeNotSupportedDescriptor(nameof(SR.NullableUnderlyingTypeNotSupported)); 25public static DiagnosticDescriptor PropertyNotSupported { get; } = DiagnosticDescriptorHelper.Create( 33public static DiagnosticDescriptor LanguageVersionNotSupported { get; } = DiagnosticDescriptorHelper.Create( 41public static DiagnosticDescriptor ValueTypesInvalidForBind { get; } = DiagnosticDescriptorHelper.Create( 49public static DiagnosticDescriptor CouldNotDetermineTypeInfo { get; } = DiagnosticDescriptorHelper.Create( 57private static DiagnosticDescriptor CreateTypeNotSupportedDescriptor(string nameofLocalizableMessageFormat) => 66public static DiagnosticDescriptor GetNotSupportedDescriptor(NotSupportedReason reason) =>
Parser\Extensions.cs (2)
37public TypeParseInfo ToTransitiveTypeParseInfo(ITypeSymbol memberType, DiagnosticDescriptor? diagDescriptor = null, string? memberName = null) 60public required DiagnosticDescriptor Descriptor { get; init; }
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
Microsoft.Extensions.Logging.Generators (30)
DiagnosticDescriptors.cs (28)
12public static DiagnosticDescriptor InvalidLoggingMethodName { get; } = DiagnosticDescriptorHelper.Create( 20public static DiagnosticDescriptor ShouldntMentionLogLevelInMessage { get; } = DiagnosticDescriptorHelper.Create( 28public static DiagnosticDescriptor InvalidLoggingMethodParameterName { get; } = DiagnosticDescriptorHelper.Create( 36public static DiagnosticDescriptor MissingRequiredType { get; } = DiagnosticDescriptorHelper.Create( 44public static DiagnosticDescriptor ShouldntReuseEventIds { get; } = DiagnosticDescriptorHelper.Create( 52public static DiagnosticDescriptor LoggingMethodMustReturnVoid { get; } = DiagnosticDescriptorHelper.Create( 60public static DiagnosticDescriptor MissingLoggerArgument { get; } = DiagnosticDescriptorHelper.Create( 68public static DiagnosticDescriptor LoggingMethodShouldBeStatic { get; } = DiagnosticDescriptorHelper.Create( 76public static DiagnosticDescriptor LoggingMethodMustBePartial { get; } = DiagnosticDescriptorHelper.Create( 84public static DiagnosticDescriptor LoggingMethodHasAllowsRefStructConstraint { get; } = DiagnosticDescriptorHelper.Create( 92public static DiagnosticDescriptor RedundantQualifierInMessage { get; } = DiagnosticDescriptorHelper.Create( 100public static DiagnosticDescriptor ShouldntMentionExceptionInMessage { get; } = DiagnosticDescriptorHelper.Create( 108public static DiagnosticDescriptor TemplateHasNoCorrespondingArgument { get; } = DiagnosticDescriptorHelper.Create( 116public static DiagnosticDescriptor ArgumentHasNoCorrespondingTemplate { get; } = DiagnosticDescriptorHelper.Create( 124public static DiagnosticDescriptor LoggingMethodHasBody { get; } = DiagnosticDescriptorHelper.Create( 132public static DiagnosticDescriptor MissingLogLevel { get; } = DiagnosticDescriptorHelper.Create( 140public static DiagnosticDescriptor ShouldntMentionLoggerInMessage { get; } = DiagnosticDescriptorHelper.Create( 148public static DiagnosticDescriptor MissingLoggerField { get; } = DiagnosticDescriptorHelper.Create( 156public static DiagnosticDescriptor MultipleLoggerFields { get; } = DiagnosticDescriptorHelper.Create( 164public static DiagnosticDescriptor InconsistentTemplateCasing { get; } = DiagnosticDescriptorHelper.Create( 172public static DiagnosticDescriptor MalformedFormatStrings { get; } = DiagnosticDescriptorHelper.Create( 180public static DiagnosticDescriptor GeneratingForMax6Arguments { get; } = DiagnosticDescriptorHelper.Create( 188public static DiagnosticDescriptor InvalidLoggingMethodParameterOut { get; } = DiagnosticDescriptorHelper.Create( 196public static DiagnosticDescriptor ShouldntReuseEventNames { get; } = DiagnosticDescriptorHelper.Create( 204public static DiagnosticDescriptor LoggingUnsupportedLanguageVersion { get; } = DiagnosticDescriptorHelper.Create( 212public static DiagnosticDescriptor PrimaryConstructorParameterLoggerHidden { get; } = DiagnosticDescriptorHelper.Create( 220public static DiagnosticDescriptor InvalidLoggingMethodParameterParams { get; } = DiagnosticDescriptorHelper.Create( 228public static DiagnosticDescriptor InvalidLoggingMethodParameterRefStruct { get; } = DiagnosticDescriptorHelper.Create(
LoggerMessageGenerator.Parser.cs (1)
812private void Diag(DiagnosticDescriptor desc, Location? location, params object?[]? messageArgs)
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
Microsoft.Extensions.Options.SourceGeneration (20)
DiagDescriptors.cs (17)
13public static DiagnosticDescriptor CantUseWithGenericTypes { get; } = Make( 19public static DiagnosticDescriptor NoEligibleMember { get; } = Make( 26public static DiagnosticDescriptor NoEligibleMembersFromValidator { get; } = Make( 33public static DiagnosticDescriptor DoesntImplementIValidateOptions { get; } = Make( 39public static DiagnosticDescriptor AlreadyImplementsValidateMethod { get; } = Make( 45public static DiagnosticDescriptor MemberIsInaccessible { get; } = Make( 51public static DiagnosticDescriptor NotEnumerableType { get; } = Make( 57public static DiagnosticDescriptor ValidatorsNeedSimpleConstructor { get; } = Make( 63public static DiagnosticDescriptor CantBeStaticClass { get; } = Make( 69public static DiagnosticDescriptor NullValidatorType { get; } = Make( 75public static DiagnosticDescriptor CircularTypeReferences { get; } = Make( 81public static DiagnosticDescriptor PotentiallyMissingTransitiveValidation { get; } = Make( 88public static DiagnosticDescriptor PotentiallyMissingEnumerableValidation { get; } = Make( 95public static DiagnosticDescriptor CantValidateStaticOrConstMember { get; } = Make( 102public static DiagnosticDescriptor InaccessibleValidationAttribute { get; } = Make( 109public static DiagnosticDescriptor OptionsUnsupportedLanguageVersion { get; } = Make( 116public static DiagnosticDescriptor IncompatibleWithTypeForValidationAttribute { get; } = Make(
DiagDescriptorsBase.cs (1)
13protected static DiagnosticDescriptor Make(
Parser.cs (2)
865private void Diag(DiagnosticDescriptor desc, Location? location) => 868private void Diag(DiagnosticDescriptor desc, Location? location, params object?[]? messageArgs) =>
Microsoft.Gen.BuildMetadata (1)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
17protected static DiagnosticDescriptor Make(
Microsoft.Gen.BuildMetadata.Unit.Tests (6)
test\Generators\Shared\RoslynTestUtils.cs (6)
134public static void AssertDiagnostic(this string text, int spanNum, DiagnosticDescriptor expected, Diagnostic actual) 151public static void AssertDiagnostics(this string text, DiagnosticDescriptor expected, IEnumerable<Diagnostic> actual) 184public static IReadOnlyList<Diagnostic> FilterDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 189foreach (var f in filter) 202public static IReadOnlyList<Diagnostic> FilterOutDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 208foreach (var f in filter)
Microsoft.Gen.ComplianceReports (1)
ComplianceReportsGenerator.cs (1)
92var diagnostic = new DiagnosticDescriptor(
Microsoft.Gen.ComplianceReports.Unit.Tests (6)
test\Generators\Shared\RoslynTestUtils.cs (6)
134public static void AssertDiagnostic(this string text, int spanNum, DiagnosticDescriptor expected, Diagnostic actual) 151public static void AssertDiagnostics(this string text, DiagnosticDescriptor expected, IEnumerable<Diagnostic> actual) 184public static IReadOnlyList<Diagnostic> FilterDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 189foreach (var f in filter) 202public static IReadOnlyList<Diagnostic> FilterOutDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 208foreach (var f in filter)
Microsoft.Gen.ContextualOptions (5)
DiagDescriptors.cs (4)
14public static DiagnosticDescriptor ContextCannotBeStatic { get; } = Make( 20public static DiagnosticDescriptor ContextMustBePartial { get; } = Make( 26public static DiagnosticDescriptor ContextDoesNotHaveValidProperties { get; } = Make( 33public static DiagnosticDescriptor ContextCannotBeRefLike { get; } = Make(
src\Generators\Shared\DiagDescriptorsBase.cs (1)
17protected static DiagnosticDescriptor Make(
Microsoft.Gen.ContextualOptions.Unit.Tests (7)
DiagDescriptorsTests.cs (1)
26public void ShouldContainValidLinkAndBeEnabled(DiagnosticDescriptor descriptor)
test\Generators\Shared\RoslynTestUtils.cs (6)
134public static void AssertDiagnostic(this string text, int spanNum, DiagnosticDescriptor expected, Diagnostic actual) 151public static void AssertDiagnostics(this string text, DiagnosticDescriptor expected, IEnumerable<Diagnostic> actual) 184public static IReadOnlyList<Diagnostic> FilterDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 189foreach (var f in filter) 202public static IReadOnlyList<Diagnostic> FilterOutDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 208foreach (var f in filter)
Microsoft.Gen.Logging (43)
Parsing\DiagDescriptors.cs (39)
14public static DiagnosticDescriptor ShouldntMentionLogLevelInMessage { get; } = Make( 21public static DiagnosticDescriptor MissingRequiredType { get; } = Make( 27public static DiagnosticDescriptor ShouldntReuseEventIds { get; } = Make( 34public static DiagnosticDescriptor LoggingMethodMustReturnVoid { get; } = Make( 40public static DiagnosticDescriptor MissingLoggerParameter { get; } = Make( 46public static DiagnosticDescriptor LoggingMethodShouldBeStatic { get; } = Make( 53public static DiagnosticDescriptor LoggingMethodMustBePartial { get; } = Make( 59public static DiagnosticDescriptor LoggingMethodIsGeneric { get; } = Make( 65public static DiagnosticDescriptor RedundantQualifierInMessage { get; } = Make( 72public static DiagnosticDescriptor ShouldntMentionExceptionInMessage { get; } = Make( 79public static DiagnosticDescriptor TemplateHasNoCorrespondingParameter { get; } = Make( 85public static DiagnosticDescriptor ParameterHasNoCorrespondingTemplate { get; } = Make( 92public static DiagnosticDescriptor LoggingMethodHasBody { get; } = Make( 98public static DiagnosticDescriptor MissingLogLevel { get; } = Make( 104public static DiagnosticDescriptor ShouldntMentionLoggerInMessage { get; } = Make( 111public static DiagnosticDescriptor MissingLoggerMember { get; } = Make( 117public static DiagnosticDescriptor MultipleLoggerMembers { get; } = Make( 123public static DiagnosticDescriptor CantUseDataClassificationWithLogPropertiesOrTagProvider { get; } = Make( 129public static DiagnosticDescriptor InvalidTypeToLogProperties { get; } = Make( 136public static DiagnosticDescriptor LogPropertiesInvalidUsage { get; } = Make( 142public static DiagnosticDescriptor LogPropertiesParameterSkipped { get; } = Make( 149public static DiagnosticDescriptor LogPropertiesCycleDetected { get; } = Make( 155public static DiagnosticDescriptor TagProviderMethodNotFound { get; } = Make( 161public static DiagnosticDescriptor TagProviderMethodInaccessible { get; } = Make( 167public static DiagnosticDescriptor TagProviderMethodInvalidSignature { get; } = Make( 173public static DiagnosticDescriptor LoggingMethodParameterRefKind { get; } = Make( 179public static DiagnosticDescriptor TagProviderWithRedaction { get; } = Make( 186public static DiagnosticDescriptor ShouldntReuseEventNames { get; } = Make( 193public static DiagnosticDescriptor LogPropertiesHiddenPropertyDetected { get; } = Make( 199public static DiagnosticDescriptor TagNameCollision { get; } = Make( 205public static DiagnosticDescriptor EmptyLoggingMethod { get; } = Make( 211public static DiagnosticDescriptor TemplateStartsWithAtSymbol { get; } = Make( 217public static DiagnosticDescriptor CantMixAttributes { get; } = Make( 223public static DiagnosticDescriptor TagProviderInvalidUsage { get; } = Make( 229public static DiagnosticDescriptor InvalidAttributeUsage { get; } = Make( 235public static DiagnosticDescriptor RecordTypeSensitiveArgumentIsInTemplate { get; } = Make( 242public static DiagnosticDescriptor DefaultToString { get; } = Make( 249public static DiagnosticDescriptor MalformedFormatStrings { get; } = Make( 255public static DiagnosticDescriptor PrimaryConstructorParameterLoggerHidden { get; } = Make(
Parsing\Parser.cs (2)
37Action<DiagnosticDescriptor, Location?, object?[]?> diagReport = Diag; // Keeping one instance of the delegate 744private void Diag(DiagnosticDescriptor desc, Location? location, params object?[]? messageArgs)
Parsing\SymbolLoader.cs (1)
54Action<DiagnosticDescriptor, Location?, object?[]?> diagCallback)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
17protected static DiagnosticDescriptor Make(
Microsoft.Gen.Logging.Unit.Tests (12)
DiagDescriptorsTests.cs (1)
27public void ShouldContainValidLinkAndBeEnabled(DiagnosticDescriptor descriptor)
ParserTests.cs (2)
690DiagnosticDescriptor? expectedDiagnostic = null, 695DiagnosticDescriptor? ignoreDiag = null,
SymbolLoaderTests.cs (2)
46var callbackMock = new Mock<Action<DiagnosticDescriptor, Location?, object?[]?>>(); 52x => x(It.IsAny<DiagnosticDescriptor>(), It.IsAny<Location?>(), It.Is<object?[]?>(p => p != null && p.Length > 0)),
test\Generators\Shared\RoslynTestUtils.cs (6)
134public static void AssertDiagnostic(this string text, int spanNum, DiagnosticDescriptor expected, Diagnostic actual) 151public static void AssertDiagnostics(this string text, DiagnosticDescriptor expected, IEnumerable<Diagnostic> actual) 184public static IReadOnlyList<Diagnostic> FilterDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 189foreach (var f in filter) 202public static IReadOnlyList<Diagnostic> FilterOutDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 208foreach (var f in filter)
TypeSymbolExtensionsTests.cs (1)
14private readonly Action<DiagnosticDescriptor, Location?, object
Microsoft.Gen.MetadataExtractor (25)
MetadataReportsGenerator.cs (1)
81var diagnostic = new DiagnosticDescriptor(
src\Generators\Microsoft.Gen.ComplianceReports\ComplianceReportsGenerator.cs (1)
92var diagnostic = new DiagnosticDescriptor(
src\Generators\Microsoft.Gen.Metrics\DiagDescriptors.cs (19)
14public static DiagnosticDescriptor ErrorInvalidMethodName { get; } = Make( 20public static DiagnosticDescriptor ErrorInvalidParameterName { get; } = Make( 26public static DiagnosticDescriptor ErrorInvalidMetricName { get; } = Make( 32public static DiagnosticDescriptor ErrorMetricNameReuse { get; } = Make( 38public static DiagnosticDescriptor ErrorInvalidMethodReturnType { get; } = Make( 44public static DiagnosticDescriptor ErrorMissingMeter { get; } = Make( 50public static DiagnosticDescriptor ErrorNotPartialMethod { get; } = Make( 56public static DiagnosticDescriptor ErrorMethodIsGeneric { get; } = Make( 62public static DiagnosticDescriptor ErrorMethodHasBody { get; } = Make( 68public static DiagnosticDescriptor ErrorInvalidTagNames { get; } = Make( 74public static DiagnosticDescriptor ErrorNotStaticMethod { get; } = Make( 80public static DiagnosticDescriptor ErrorDuplicateTagName { get; } = Make( 86public static DiagnosticDescriptor ErrorInvalidTagNameType { get; } = Make( 92public static DiagnosticDescriptor ErrorTooManyTagNames { get; } = Make( 98public static DiagnosticDescriptor ErrorInvalidAttributeGenericType { get; } = Make( 104public static DiagnosticDescriptor ErrorInvalidMethodReturnTypeLocation { get; } = Make( 110public static DiagnosticDescriptor ErrorInvalidMethodReturnTypeArity { get; } = Make( 116public static DiagnosticDescriptor ErrorXmlNotLoadedCorrectly { get; } = Make( 122public static DiagnosticDescriptor ErrorTagTypeCycleDetected { get; } = Make(
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
601private void Diag(DiagnosticDescriptor desc, Location? location) 606private void Diag(DiagnosticDescriptor desc, Location? location, params object?[]? messageArgs)
src\Generators\Microsoft.Gen.MetricsReports\MetricsReportsGenerator.cs (1)
56var diagnostic = new DiagnosticDescriptor(
src\Generators\Shared\DiagDescriptorsBase.cs (1)
17protected static DiagnosticDescriptor Make(
Microsoft.Gen.MetadataExtractor.Unit.Tests (6)
test\Generators\Shared\RoslynTestUtils.cs (6)
134public static void AssertDiagnostic(this string text, int spanNum, DiagnosticDescriptor expected, Diagnostic actual) 151public static void AssertDiagnostics(this string text, DiagnosticDescriptor expected, IEnumerable<Diagnostic> actual) 184public static IReadOnlyList<Diagnostic> FilterDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 189foreach (var f in filter) 202public static IReadOnlyList<Diagnostic> FilterOutDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 208foreach (var f in filter)
Microsoft.Gen.Metrics (22)
DiagDescriptors.cs (19)
14public static DiagnosticDescriptor ErrorInvalidMethodName { get; } = Make( 20public static DiagnosticDescriptor ErrorInvalidParameterName { get; } = Make( 26public static DiagnosticDescriptor ErrorInvalidMetricName { get; } = Make( 32public static DiagnosticDescriptor ErrorMetricNameReuse { get; } = Make( 38public static DiagnosticDescriptor ErrorInvalidMethodReturnType { get; } = Make( 44public static DiagnosticDescriptor ErrorMissingMeter { get; } = Make( 50public static DiagnosticDescriptor ErrorNotPartialMethod { get; } = Make( 56public static DiagnosticDescriptor ErrorMethodIsGeneric { get; } = Make( 62public static DiagnosticDescriptor ErrorMethodHasBody { get; } = Make( 68public static DiagnosticDescriptor ErrorInvalidTagNames { get; } = Make( 74public static DiagnosticDescriptor ErrorNotStaticMethod { get; } = Make( 80public static DiagnosticDescriptor ErrorDuplicateTagName { get; } = Make( 86public static DiagnosticDescriptor ErrorInvalidTagNameType { get; } = Make( 92public static DiagnosticDescriptor ErrorTooManyTagNames { get; } = Make( 98public static DiagnosticDescriptor ErrorInvalidAttributeGenericType { get; } = Make( 104public static DiagnosticDescriptor ErrorInvalidMethodReturnTypeLocation { get; } = Make( 110public static DiagnosticDescriptor ErrorInvalidMethodReturnTypeArity { get; } = Make( 116public static DiagnosticDescriptor ErrorXmlNotLoadedCorrectly { get; } = Make( 122public static DiagnosticDescriptor ErrorTagTypeCycleDetected { get; } = Make(
Parser.cs (2)
601private void Diag(DiagnosticDescriptor desc, Location? location) 606private void Diag(DiagnosticDescriptor desc, Location? location, params object?[]? messageArgs)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
17protected static DiagnosticDescriptor Make(
Microsoft.Gen.Metrics.Unit.Tests (7)
DiagDescriptorsTests.cs (1)
26public void ShouldContainValidLinkAndBeEnabled(DiagnosticDescriptor descriptor)
test\Generators\Shared\RoslynTestUtils.cs (6)
134public static void AssertDiagnostic(this string text, int spanNum, DiagnosticDescriptor expected, Diagnostic actual) 151public static void AssertDiagnostics(this string text, DiagnosticDescriptor expected, IEnumerable<Diagnostic> actual) 184public static IReadOnlyList<Diagnostic> FilterDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 189foreach (var f in filter) 202public static IReadOnlyList<Diagnostic> FilterOutDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 208foreach (var f in filter)
Microsoft.Gen.MetricsReports (23)
MetricsReportsGenerator.cs (1)
56var diagnostic = new DiagnosticDescriptor(
src\Generators\Microsoft.Gen.Metrics\DiagDescriptors.cs (19)
14public static DiagnosticDescriptor ErrorInvalidMethodName { get; } = Make( 20public static DiagnosticDescriptor ErrorInvalidParameterName { get; } = Make( 26public static DiagnosticDescriptor ErrorInvalidMetricName { get; } = Make( 32public static DiagnosticDescriptor ErrorMetricNameReuse { get; } = Make( 38public static DiagnosticDescriptor ErrorInvalidMethodReturnType { get; } = Make( 44public static DiagnosticDescriptor ErrorMissingMeter { get; } = Make( 50public static DiagnosticDescriptor ErrorNotPartialMethod { get; } = Make( 56public static DiagnosticDescriptor ErrorMethodIsGeneric { get; } = Make( 62public static DiagnosticDescriptor ErrorMethodHasBody { get; } = Make( 68public static DiagnosticDescriptor ErrorInvalidTagNames { get; } = Make( 74public static DiagnosticDescriptor ErrorNotStaticMethod { get; } = Make( 80public static DiagnosticDescriptor ErrorDuplicateTagName { get; } = Make( 86public static DiagnosticDescriptor ErrorInvalidTagNameType { get; } = Make( 92public static DiagnosticDescriptor ErrorTooManyTagNames { get; } = Make( 98public static DiagnosticDescriptor ErrorInvalidAttributeGenericType { get; } = Make( 104public static DiagnosticDescriptor ErrorInvalidMethodReturnTypeLocation { get; } = Make( 110public static DiagnosticDescriptor ErrorInvalidMethodReturnTypeArity { get; } = Make( 116public static DiagnosticDescriptor ErrorXmlNotLoadedCorrectly { get; } = Make( 122public static DiagnosticDescriptor ErrorTagTypeCycleDetected { get; } = Make(
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
601private void Diag(DiagnosticDescriptor desc, Location? location) 606private void Diag(DiagnosticDescriptor desc, Location? location, params object?[]? messageArgs)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
17protected static DiagnosticDescriptor Make(
Microsoft.Gen.MetricsReports.Unit.Tests (6)
test\Generators\Shared\RoslynTestUtils.cs (6)
134public static void AssertDiagnostic(this string text, int spanNum, DiagnosticDescriptor expected, Diagnostic actual) 151public static void AssertDiagnostics(this string text, DiagnosticDescriptor expected, IEnumerable<Diagnostic> actual) 184public static IReadOnlyList<Diagnostic> FilterDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 189foreach (var f in filter) 202public static IReadOnlyList<Diagnostic> FilterOutDiagnostics(this IEnumerable<Diagnostic> diagnostics, params DiagnosticDescriptor[] filter) 208foreach (var f in filter)
Microsoft.Interop.ComInterfaceGenerator (66)
Analyzers\AddGeneratedComClassAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(AddGeneratedComClassAttribute);
Analyzers\AnalyzerDiagnostics.cs (5)
34public static readonly DiagnosticDescriptor ConvertToGeneratedComInterface = 44public static readonly DiagnosticDescriptor AddGeneratedComClassAttribute = 54public static readonly DiagnosticDescriptor ComHostingDoesNotSupportGeneratedComInterface = 64public static readonly DiagnosticDescriptor RuntimeComApisDoNotSupportSourceGeneratedCom = 74public static readonly DiagnosticDescriptor CastsBetweenRuntimeComAndSourceGeneratedComNotSupported =
Analyzers\ComClassGeneratorDiagnosticsAnalyzer.cs (1)
18public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Analyzers\ComHostingDoesNotSupportGeneratedComInterfaceAnalyzer.cs (1)
17public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ComHostingDoesNotSupportGeneratedComInterface);
Analyzers\ComInterfaceGeneratorDiagnosticsAnalyzer.cs (1)
20public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
20public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ConvertToGeneratedComInterface);
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (1)
20public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (1)
21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(RuntimeComApisDoNotSupportSourceGeneratedCom, CastsBetweenRuntimeComAndSourceGeneratedComNotSupported);
Analyzers\VtableIndexStubDiagnosticsAnalyzer.cs (1)
17public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
DiagnosticDescriptorProvider.cs (4)
13public DiagnosticDescriptor InvalidMarshallingAttributeInfo => GeneratorDiagnostics.MarshallingAttributeConfigurationNotSupported; 15public DiagnosticDescriptor ConfigurationNotSupported => GeneratorDiagnostics.ConfigurationNotSupported; 17public DiagnosticDescriptor ConfigurationValueNotSupported => GeneratorDiagnostics.ConfigurationValueNotSupported; 19public DiagnosticDescriptor? GetDescriptor(GeneratorDiagnostic diagnostic)
GeneratorDiagnostics.cs (48)
36public static readonly DiagnosticDescriptor RequiresAllowUnsafeBlocks = 47public static readonly DiagnosticDescriptor InvalidAttributedMethodSignature = 58public static readonly DiagnosticDescriptor InvalidAttributedMethodContainingTypeMissingModifiers = 69public static readonly DiagnosticDescriptor InvalidAttributedInterfaceMissingPartialModifiers = 80public static readonly DiagnosticDescriptor InvalidAttributedMethodContainingTypeMissingUnmanagedObjectUnwrapperAttribute = 91public static readonly DiagnosticDescriptor InvalidStringMarshallingMismatchBetweenBaseAndDerived = 102public static readonly DiagnosticDescriptor InvalidOptionsOnInterface = 113public static readonly DiagnosticDescriptor InvalidStringMarshallingConfigurationOnMethod = 124public static readonly DiagnosticDescriptor InvalidStringMarshallingConfigurationOnInterface = 135public static readonly DiagnosticDescriptor StringMarshallingCustomTypeNotAccessibleByGeneratedCode = 145public static readonly DiagnosticDescriptor ExceptionToUnmanagedMarshallerNotAccessibleByGeneratedCode = 155public static readonly DiagnosticDescriptor InvalidExceptionMarshallingConfiguration = 166public static readonly DiagnosticDescriptor InvalidExceptionToUnmanagedMarshallerType = 176public static readonly DiagnosticDescriptor ParameterTypeNotSupported = 187public static readonly DiagnosticDescriptor ReturnTypeNotSupported = 198public static readonly DiagnosticDescriptor ParameterTypeNotSupportedWithDetails = 209public static readonly DiagnosticDescriptor ReturnTypeNotSupportedWithDetails = 220public static readonly DiagnosticDescriptor ParameterConfigurationNotSupported = 231public static readonly DiagnosticDescriptor ReturnConfigurationNotSupported = 242public static readonly DiagnosticDescriptor MarshalAsParameterConfigurationNotSupported = 253public static readonly DiagnosticDescriptor MarshalAsReturnConfigurationNotSupported = 264public static readonly DiagnosticDescriptor ConfigurationNotSupported = 275public static readonly DiagnosticDescriptor ConfigurationValueNotSupported = 286public static readonly DiagnosticDescriptor MarshallingAttributeConfigurationNotSupported = 297public static readonly DiagnosticDescriptor MethodNotDeclaredInAttributedInterface = 308public static readonly DiagnosticDescriptor InvalidPropertyDeclarationOnGeneratedComInterface = 319public static readonly DiagnosticDescriptor PropertyAccessorsMustBeAllOrNothing = 330public static readonly DiagnosticDescriptor MarshalAttributeOnDefaultImplementedComInterfaceMember = 341public static readonly DiagnosticDescriptor MarshalUsingOnPropertyAccessorMustSpecifyType = 352public static readonly DiagnosticDescriptor InstanceEventDeclaredInInterface = 363public static readonly DiagnosticDescriptor InvalidAttributedInterfaceNotAccessible = 374public static readonly DiagnosticDescriptor InvalidAttributedInterfaceMissingGuidAttribute = 385public static readonly DiagnosticDescriptor InvalidAttributedInterfaceGenericNotSupported = 396public static readonly DiagnosticDescriptor MultipleComInterfaceBaseTypes = 407public static readonly DiagnosticDescriptor CannotAnalyzeMethodPattern = 418public static readonly DiagnosticDescriptor CannotAnalyzeInterfacePattern = 429public static readonly DiagnosticDescriptor BaseInterfaceIsNotGenerated = 440public static readonly DiagnosticDescriptor InvalidAttributedClassMissingPartialModifier = 451public static readonly DiagnosticDescriptor InterfaceTypeNotSupported = 462public static readonly DiagnosticDescriptor ClassDoesNotImplementAnyGeneratedComInterface = 473public static readonly DiagnosticDescriptor UnnecessaryParameterMarshallingInfo = 488public static readonly DiagnosticDescriptor UnnecessaryReturnMarshallingInfo = 503public static readonly DiagnosticDescriptor SizeOfInCollectionMustBeDefinedAtCallOutParam = 513public static readonly DiagnosticDescriptor SizeOfInCollectionMustBeDefinedAtCallReturnValue = 523public static readonly DiagnosticDescriptor ComMethodManagedReturnWillBeOutVariable = 533public static readonly DiagnosticDescriptor HResultTypeWillBeTreatedAsStruct = 543public static readonly DiagnosticDescriptor GeneratedComInterfaceUsageDoesNotFollowBestPractices = 554public static readonly DiagnosticDescriptor BaseInterfaceDefinedInOtherAssembly =
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
Microsoft.Interop.JavaScript.JSImportGenerator (33)
Analyzers\JSExportDiagnosticsAnalyzer.cs (3)
19protected override DiagnosticDescriptor InvalidSignatureDescriptor => GeneratorDiagnostics.InvalidExportAttributedMethodSignature; 20protected override DiagnosticDescriptor ContainingTypeMissingModifiersDescriptor => GeneratorDiagnostics.InvalidExportAttributedMethodContainingTypeMissingModifiers; 21protected override DiagnosticDescriptor RequiresAllowUnsafeBlocksDescriptor => GeneratorDiagnostics.JSExportRequiresAllowUnsafeBlocks;
Analyzers\JSImportDiagnosticsAnalyzer.cs (3)
19protected override DiagnosticDescriptor InvalidSignatureDescriptor => GeneratorDiagnostics.InvalidImportAttributedMethodSignature; 20protected override DiagnosticDescriptor ContainingTypeMissingModifiersDescriptor => GeneratorDiagnostics.InvalidImportAttributedMethodContainingTypeMissingModifiers; 21protected override DiagnosticDescriptor RequiresAllowUnsafeBlocksDescriptor => GeneratorDiagnostics.JSImportRequiresAllowUnsafeBlocks;
Analyzers\JSImportExportDiagnosticsAnalyzer.cs (7)
20private static readonly ImmutableArray<DiagnosticDescriptor> s_sharedDescriptors = ImmutableArray.Create( 31public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 41protected abstract DiagnosticDescriptor InvalidSignatureDescriptor { get; } 44protected abstract DiagnosticDescriptor ContainingTypeMissingModifiersDescriptor { get; } 47protected abstract DiagnosticDescriptor RequiresAllowUnsafeBlocksDescriptor { get; } 152DiagnosticDescriptor invalidSignatureDescriptor, 153DiagnosticDescriptor containingTypeMissingModifiersDescriptor,
DescriptorProvider.cs (4)
10public DiagnosticDescriptor InvalidMarshallingAttributeInfo => GeneratorDiagnostics.MarshallingAttributeConfigurationNotSupported; 12public DiagnosticDescriptor ConfigurationNotSupported => GeneratorDiagnostics.ConfigurationNotSupported; 14public DiagnosticDescriptor ConfigurationValueNotSupported => GeneratorDiagnostics.ConfigurationValueNotSupported; 16public DiagnosticDescriptor? GetDescriptor(GeneratorDiagnostic diagnostic)
GeneratorDiagnostics.cs (15)
33public static readonly DiagnosticDescriptor ConfigurationNotSupported = 43public static readonly DiagnosticDescriptor ConfigurationValueNotSupported = 53public static readonly DiagnosticDescriptor MarshallingAttributeConfigurationNotSupported = 63public static readonly DiagnosticDescriptor ReturnTypeNotSupportedWithDetails = 73public static readonly DiagnosticDescriptor ParameterTypeNotSupported = 83public static readonly DiagnosticDescriptor ReturnTypeNotSupported = 93public static readonly DiagnosticDescriptor ParameterTypeNotSupportedWithDetails = 103public static readonly DiagnosticDescriptor ParameterConfigurationNotSupported = 113public static readonly DiagnosticDescriptor ReturnConfigurationNotSupported = 123public static readonly DiagnosticDescriptor InvalidImportAttributedMethodSignature = 133public static readonly DiagnosticDescriptor InvalidExportAttributedMethodSignature = 143public static readonly DiagnosticDescriptor InvalidImportAttributedMethodContainingTypeMissingModifiers = 153public static readonly DiagnosticDescriptor InvalidExportAttributedMethodContainingTypeMissingModifiers = 163public static readonly DiagnosticDescriptor JSImportRequiresAllowUnsafeBlocks = 173public static readonly DiagnosticDescriptor JSExportRequiresAllowUnsafeBlocks =
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
Microsoft.Interop.LibraryImportGenerator (84)
Analyzers\ConvertToLibraryImportAnalyzer.cs (2)
23public static readonly DiagnosticDescriptor ConvertToLibraryImport = 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ConvertToLibraryImport);
Analyzers\CustomMarshallerAttributeAnalyzer.cs (47)
43public static readonly DiagnosticDescriptor MarshallerTypeMustSpecifyManagedTypeRule = 54public static readonly DiagnosticDescriptor MarshallerTypeMustBeStaticClassOrStructRule = 65public static readonly DiagnosticDescriptor ElementMarshallerCannotBeStatefulRule = 76public static readonly DiagnosticDescriptor UnmanagedTypeMustBeUnmanagedRule = 87public static readonly DiagnosticDescriptor GetPinnableReferenceReturnTypeBlittableRule = 98public static readonly DiagnosticDescriptor TypeMustHaveExplicitCastFromVoidPointerRule = 109public static readonly DiagnosticDescriptor StatelessValueInRequiresConvertToUnmanagedRule = 120public static readonly DiagnosticDescriptor StatelessLinearCollectionRequiresTwoParameterAllocateContainerForUnmanagedElementsRule = 131public static readonly DiagnosticDescriptor OutRequiresToManagedRule = 142public static readonly DiagnosticDescriptor StatelessRequiresConvertToManagedRule = 153public static readonly DiagnosticDescriptor LinearCollectionInRequiresCollectionMethodsRule = 164public static readonly DiagnosticDescriptor StatelessLinearCollectionInRequiresCollectionMethodsRule = 175public static readonly DiagnosticDescriptor LinearCollectionOutRequiresCollectionMethodsRule = 186public static readonly DiagnosticDescriptor StatelessLinearCollectionOutRequiresCollectionMethodsRule = 197public static readonly DiagnosticDescriptor StatelessLinearCollectionRequiresTwoParameterAllocateContainerForManagedElementsRule = 208public static readonly DiagnosticDescriptor CallerAllocFromManagedMustHaveBufferSizeRule = 219public static readonly DiagnosticDescriptor StatelessLinearCollectionCallerAllocFromManagedMustHaveBufferSizeRule = 230public static readonly DiagnosticDescriptor StatefulMarshallerRequiresFromManagedRule = 241public static readonly DiagnosticDescriptor StatefulMarshallerRequiresToUnmanagedRule = 252public static readonly DiagnosticDescriptor StatefulMarshallerRequiresToManagedRule = 263public static readonly DiagnosticDescriptor StatefulMarshallerRequiresFromUnmanagedRule = 274public static readonly DiagnosticDescriptor StatefulMarshallerRequiresFreeRule = 285public static readonly DiagnosticDescriptor FromUnmanagedOverloadsNotSupportedRule = 296public static readonly DiagnosticDescriptor MarshallerTypeMustBeClosedOrMatchArityRule = 307public static readonly DiagnosticDescriptor MarshallerTypeMustBeNonNullRule = 318public static readonly DiagnosticDescriptor FirstParameterMustMatchReturnTypeRule = 329public static readonly DiagnosticDescriptor ReturnTypesMustMatchRule = 340public static readonly DiagnosticDescriptor FirstParametersMustMatchRule = 351public static readonly DiagnosticDescriptor ElementTypesOfReturnTypesMustMatchRule = 362public static readonly DiagnosticDescriptor ReturnTypeMustBeExpectedTypeRule = 373public static readonly DiagnosticDescriptor ManagedTypeMustBeClosedOrMatchArityRule = 384public static readonly DiagnosticDescriptor ManagedTypeMustBeNonNullRule = 395public static readonly DiagnosticDescriptor MarshalModeMustBeValidValue = 413private static readonly DiagnosticDescriptor StatelessValueInRequiresConvertToUnmanagedRule = 424private static readonly DiagnosticDescriptor StatelessLinearCollectionRequiresTwoParameterAllocateContainerForUnmanagedElementsRule = 435private static readonly DiagnosticDescriptor StatelessRequiresConvertToManagedRule = 446private static readonly DiagnosticDescriptor StatelessLinearCollectionInRequiresCollectionMethodsRule = 457private static readonly DiagnosticDescriptor StatelessLinearCollectionOutRequiresCollectionMethodsRule = 468private static readonly DiagnosticDescriptor StatelessLinearCollectionRequiresTwoParameterAllocateContainerForManagedElementsRule = 479private static readonly DiagnosticDescriptor StatefulMarshallerRequiresFromManagedRule = 490private static readonly DiagnosticDescriptor StatefulMarshallerRequiresToUnmanagedRule = 501private static readonly DiagnosticDescriptor StatefulMarshallerRequiresToManagedRule = 512private static readonly DiagnosticDescriptor StatefulMarshallerRequiresFromUnmanagedRule = 522public static DiagnosticDescriptor GetDefaultMarshalModeDiagnostic(DiagnosticDescriptor errorDescriptor) 569public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 983private static void CheckForBufferSizeMember(DiagnosticReporter diagnosticReporter, DiagnosticDescriptor descriptor, INamedTypeSymbol marshallerType, IMethodSymbol callerAllocatedBufferMethod)
Analyzers\DiagnosticReporter.cs (4)
12private readonly Action<DiagnosticDescriptor, ImmutableDictionary<string, string>, object[]> _diagnosticFactory; 14public DiagnosticReporter(Action<DiagnosticDescriptor, ImmutableDictionary<string, string>, object[]> createAndReportDiagnostic) 21public void CreateAndReportDiagnostic(DiagnosticDescriptor descriptor, params object[] messageArgs) => _diagnosticFactory(descriptor, ImmutableDictionary<string, string>.Empty, messageArgs); 23public void CreateAndReportDiagnostic(DiagnosticDescriptor descriptor, ImmutableDictionary<string, string> properties, params object[] messageArgs) => _diagnosticFactory(descriptor, properties, messageArgs);
Analyzers\LibraryImportDiagnosticsAnalyzer.cs (1)
24public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Analyzers\NativeMarshallingAttributeAnalyzer.cs (4)
24public static readonly DiagnosticDescriptor MarshallerEntryPointTypeMustHaveCustomMarshallerAttributeWithMatchingManagedTypeRule = 34public static readonly DiagnosticDescriptor MarshallerEntryPointTypeMustBeNonNullRule = 44public static readonly DiagnosticDescriptor GenericEntryPointMarshallerTypeMustBeClosedOrMatchArityRule = 54public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
DiagnosticDescriptorProvider.cs (4)
11public DiagnosticDescriptor InvalidMarshallingAttributeInfo => GeneratorDiagnostics.MarshallingAttributeConfigurationNotSupported; 13public DiagnosticDescriptor ConfigurationNotSupported => GeneratorDiagnostics.ConfigurationNotSupported; 15public DiagnosticDescriptor ConfigurationValueNotSupported => GeneratorDiagnostics.ConfigurationValueNotSupported; 17public DiagnosticDescriptor? GetDescriptor(GeneratorDiagnostic diagnostic)
GeneratorDiagnostics.cs (21)
32public static readonly DiagnosticDescriptor InvalidAttributedMethodSignature = 43public static readonly DiagnosticDescriptor InvalidAttributedMethodContainingTypeMissingModifiers = 54public static readonly DiagnosticDescriptor InvalidStringMarshallingConfiguration = 65public static readonly DiagnosticDescriptor ParameterTypeNotSupported = 76public static readonly DiagnosticDescriptor ReturnTypeNotSupported = 87public static readonly DiagnosticDescriptor ParameterTypeNotSupportedWithDetails = 98public static readonly DiagnosticDescriptor ReturnTypeNotSupportedWithDetails = 109public static readonly DiagnosticDescriptor ParameterConfigurationNotSupported = 120public static readonly DiagnosticDescriptor ReturnConfigurationNotSupported = 131public static readonly DiagnosticDescriptor MarshalAsParameterConfigurationNotSupported = 142public static readonly DiagnosticDescriptor MarshalAsReturnConfigurationNotSupported = 153public static readonly DiagnosticDescriptor ConfigurationNotSupported = 164public static readonly DiagnosticDescriptor ConfigurationValueNotSupported = 175public static readonly DiagnosticDescriptor MarshallingAttributeConfigurationNotSupported = 186public static readonly DiagnosticDescriptor CannotForwardToDllImport = 197public static readonly DiagnosticDescriptor RequiresAllowUnsafeBlocks = 208public static readonly DiagnosticDescriptor UnnecessaryParameterMarshallingInfo = 223public static readonly DiagnosticDescriptor UnnecessaryReturnMarshallingInfo = 238public static readonly DiagnosticDescriptor SizeOfInCollectionMustBeDefinedAtCallOutParam = 248public static readonly DiagnosticDescriptor SizeOfInCollectionMustBeDefinedAtCallReturnValue = 258public static readonly DiagnosticDescriptor LibraryImportUsageDoesNotFollowBestPractices =
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
Microsoft.Interop.LibraryImportGenerator.Downlevel (27)
DiagnosticDescriptorProvider.cs (4)
11public DiagnosticDescriptor InvalidMarshallingAttributeInfo => GeneratorDiagnostics.MarshallingAttributeConfigurationNotSupported; 13public DiagnosticDescriptor ConfigurationNotSupported => GeneratorDiagnostics.ConfigurationNotSupported; 15public DiagnosticDescriptor ConfigurationValueNotSupported => GeneratorDiagnostics.ConfigurationValueNotSupported; 17public DiagnosticDescriptor? GetDescriptor(GeneratorDiagnostic diagnostic)
DownlevelLibraryImportDiagnosticsAnalyzer.cs (1)
23public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
GeneratorDiagnostics.cs (21)
32public static readonly DiagnosticDescriptor InvalidAttributedMethodSignature = 43public static readonly DiagnosticDescriptor InvalidAttributedMethodContainingTypeMissingModifiers = 54public static readonly DiagnosticDescriptor InvalidStringMarshallingConfiguration = 65public static readonly DiagnosticDescriptor ParameterTypeNotSupported = 76public static readonly DiagnosticDescriptor ReturnTypeNotSupported = 87public static readonly DiagnosticDescriptor ParameterTypeNotSupportedWithDetails = 98public static readonly DiagnosticDescriptor ReturnTypeNotSupportedWithDetails = 109public static readonly DiagnosticDescriptor ParameterConfigurationNotSupported = 120public static readonly DiagnosticDescriptor ReturnConfigurationNotSupported = 131public static readonly DiagnosticDescriptor MarshalAsParameterConfigurationNotSupported = 142public static readonly DiagnosticDescriptor MarshalAsReturnConfigurationNotSupported = 153public static readonly DiagnosticDescriptor ConfigurationNotSupported = 164public static readonly DiagnosticDescriptor ConfigurationValueNotSupported = 175public static readonly DiagnosticDescriptor MarshallingAttributeConfigurationNotSupported = 186public static readonly DiagnosticDescriptor CannotForwardToDllImport = 197public static readonly DiagnosticDescriptor RequiresAllowUnsafeBlocks = 208public static readonly DiagnosticDescriptor UnnecessaryParameterMarshallingInfo = 223public static readonly DiagnosticDescriptor UnnecessaryReturnMarshallingInfo = 238public static readonly DiagnosticDescriptor SizeOfInCollectionMustBeDefinedAtCallOutParam = 248public static readonly DiagnosticDescriptor SizeOfInCollectionMustBeDefinedAtCallReturnValue = 258public static readonly DiagnosticDescriptor LibraryImportUsageDoesNotFollowBestPractices =
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
Microsoft.Interop.SourceGeneration (34)
DiagnosticExtensions.cs (16)
14DiagnosticDescriptor descriptor, 22DiagnosticDescriptor descriptor, 31DiagnosticDescriptor descriptor, 44DiagnosticDescriptor descriptor, 58DiagnosticDescriptor descriptor, 66DiagnosticDescriptor descriptor, 94DiagnosticDescriptor descriptor, 105DiagnosticDescriptor descriptor, 118DiagnosticDescriptor descriptor, 126DiagnosticDescriptor descriptor, 135DiagnosticDescriptor descriptor, 148DiagnosticDescriptor descriptor, 162DiagnosticDescriptor descriptor, 170DiagnosticDescriptor descriptor, 198DiagnosticDescriptor descriptor, 209DiagnosticDescriptor descriptor,
DiagnosticInfo.cs (4)
13public required DiagnosticDescriptor Descriptor { get; init; } 26public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, Location location, params object?[] messageArgs) 38public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, Location location, ImmutableDictionary<string, string>? properties, params object?[] messageArgs) 50public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, Location location, IEnumerable<Location>? additionalLocations, ImmutableDictionary<string, string>? properties, params object?[] messageArgs)
GeneratorDiagnosticsBag.cs (1)
96DiagnosticDescriptor? descriptor = _descriptorProvider.GetDescriptor(diagnostic);
Marshalling\GeneratorDiagnostic.cs (4)
26public abstract DiagnosticInfo ToDiagnosticInfo(DiagnosticDescriptor descriptor, Location location, string elementName); 35public override DiagnosticInfo ToDiagnosticInfo(DiagnosticDescriptor descriptor, Location location, string elementName) 50public override DiagnosticInfo ToDiagnosticInfo(DiagnosticDescriptor descriptor, Location location, string elementName) 68public override DiagnosticInfo ToDiagnosticInfo(DiagnosticDescriptor descriptor, Location location, string elementName)
Marshalling\MarshallerHelpers.cs (2)
348public static void ValidateCountInfoAvailableAtCall(MarshalDirection stubDirection, TypePositionInfo info, GeneratorDiagnosticsBag generatorDiagnostics, IMethodSymbol symbol, DiagnosticDescriptor outParamDescriptor, DiagnosticDescriptor returnValueDescriptor)
MethodSignatureDiagnosticLocations.cs (7)
20DiagnosticDescriptor InvalidMarshallingAttributeInfo { get; } 24DiagnosticDescriptor ConfigurationNotSupported { get; } 28DiagnosticDescriptor ConfigurationValueNotSupported { get; } 37DiagnosticDescriptor? GetDescriptor(GeneratorDiagnostic diagnostic); 42DiagnosticInfo CreateDiagnosticInfo(DiagnosticDescriptor descriptor, GeneratorDiagnostic diagnostic); 48public DiagnosticInfo CreateDiagnosticInfo(DiagnosticDescriptor descriptor, GeneratorDiagnostic diagnostic) 70public DiagnosticInfo CreateDiagnosticInfo(DiagnosticDescriptor descriptor, GeneratorDiagnostic diagnostic)
Microsoft.Maui.Controls.BindingSourceGen (2)
DiagnosticsFactory.cs (2)
7 public DiagnosticInfo(DiagnosticDescriptor descriptor, Location? location) 13 public DiagnosticDescriptor Descriptor { get; }
Microsoft.Maui.Controls.SourceGen (1)
Descriptors.cs (1)
8 public static DiagnosticDescriptor XamlParserError = new DiagnosticDescriptor(
Microsoft.ML.CodeAnalyzer.Tests (3)
Code\RelaxTestNamingTest.cs (2)
107public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(RelaxTestNamingSuppressor.Rule.SuppressedDiagnosticId, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 109public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
Helpers\CSharpCodeFixVerifier`2.cs (1)
27public static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor)
Microsoft.ML.InternalCodeAnalyzer (23)
BaseTestClassAnalyzer.cs (2)
24private static readonly DiagnosticDescriptor Rule = 28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
BestFriendAnalyzer.cs (2)
29private static readonly DiagnosticDescriptor Rule = 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
BestFriendOnPublicDeclarationsAnalyzer.cs (2)
25private static readonly DiagnosticDescriptor Rule = 31public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
ContractsCheckAnalyzer.cs (5)
32internal static DiagnosticDescriptor Rule = 46internal static DiagnosticDescriptor Rule = 57internal static DiagnosticDescriptor Rule = 69internal static DiagnosticDescriptor Rule = 75public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
InstanceInitializerAnalyzer.cs (2)
23private static readonly DiagnosticDescriptor Rule = 28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
NameAnalyzer.cs (4)
32internal static Diagnostic CreateDiagnostic(DiagnosticDescriptor rule, SyntaxToken identifier, NameType desired, params object[] args) 53internal static DiagnosticDescriptor Rule = 66internal static DiagnosticDescriptor Rule = 71public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
ParameterVariableNameAnalyzer.cs (2)
25private static readonly DiagnosticDescriptor Rule = 29public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
SingleVariableDeclarationAnalyzer.cs (2)
25private static readonly DiagnosticDescriptor Rule = 29public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
TypeParamNameAnalyzer.cs (2)
24private static readonly DiagnosticDescriptor Rule = 28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
Roslyn.Diagnostics.Analyzers (114)
AbstractDoNotCopyValue.cs (10)
31internal static readonly DiagnosticDescriptor Rule = new( 42internal static readonly DiagnosticDescriptor UnsupportedUseRule = new( 53internal static readonly DiagnosticDescriptor AvoidNullableWrapperRule = new( 64internal static readonly DiagnosticDescriptor NoAssignValueFromReferenceRule = new( 75internal static readonly DiagnosticDescriptor NoReturnValueFromReferenceRule = new( 86internal static readonly DiagnosticDescriptor NoBoxingRule = new( 97internal static readonly DiagnosticDescriptor NoUnboxingRule = new( 108internal static readonly DiagnosticDescriptor NoFieldOfCopyableTypeRule = new( 119internal static readonly DiagnosticDescriptor NoAutoPropertyRule = new( 130public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule, UnsupportedUseRule, NoBoxingRule, NoUnboxingRule, NoFieldOfCopyableTypeRule, NoAutoPropertyRule);
DefaultableTypeShouldHaveDefaultableFieldsAnalyzer.cs (2)
26internal static readonly DiagnosticDescriptor Rule = new( 37public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
DiagnosticExtensions.cs (3)
18DiagnosticDescriptor rule, 25DiagnosticDescriptor rule, 33DiagnosticDescriptor rule,
DoNotCallGetTestAccessor.cs (2)
23internal static readonly DiagnosticDescriptor DoNotCallGetTestAccessorRule = new( 33public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(DoNotCallGetTestAccessorRule);
DoNotMixAttributesFromDifferentVersionsOfMEF.cs (2)
26internal static readonly DiagnosticDescriptor Rule = new( 37public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
ExportedPartsShouldHaveImportingConstructor.cs (2)
29internal static readonly DiagnosticDescriptor Rule = new( 40public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
ImmutableArrayBoxingAnalyzer.cs (2)
25internal static readonly DiagnosticDescriptor Rule = new( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
ImportingConstructorShouldBeObsolete.cs (2)
31internal static readonly DiagnosticDescriptor Rule = new( 42public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
IRemoteJsonServiceParameterAnalyzer.cs (2)
24internal static readonly DiagnosticDescriptor Rule = new( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
PartsExportedWithMEFv2MustBeMarkedAsShared.cs (2)
24internal static readonly DiagnosticDescriptor Rule = new( 35public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
PooledArrayBuilderAsRefAnalyzer.cs (2)
25internal static readonly DiagnosticDescriptor Rule = new( 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
SpecializedEnumerableCreationAnalyzer.cs (4)
33internal static readonly DiagnosticDescriptor UseEmptyEnumerableRule = new( 42internal static readonly DiagnosticDescriptor UseSingletonEnumerableRule = new( 51public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(UseEmptyEnumerableRule, UseSingletonEnumerableRule); 130public static ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(UseEmptyEnumerableRule, UseSingletonEnumerableRule);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (16)
20DiagnosticDescriptor rule, 26DiagnosticDescriptor rule, 33DiagnosticDescriptor rule, 47DiagnosticDescriptor rule, 53DiagnosticDescriptor rule, 62DiagnosticDescriptor rule, 72DiagnosticDescriptor rule, 80DiagnosticDescriptor rule, 88DiagnosticDescriptor rule, 97DiagnosticDescriptor rule, 107DiagnosticDescriptor rule, 114DiagnosticDescriptor rule, 134DiagnosticDescriptor rule, 142DiagnosticDescriptor rule, 161DiagnosticDescriptor rule, 167DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AbstractCategorizedAnalyzerConfigOptions.cs (4)
31public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 48public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 67public bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, out T value) 93private (bool found, object? value) ComputeOptionValue<T, TArg>(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AggregateCategorizedAnalyzerConfigOptions.cs (3)
82public T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 100public T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) 110private bool TryGetOptionValue<T, TArg>(string optionName, OptionKind kind, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, [MaybeNullWhen(false)] out T value)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\AnalyzerOptionsExtensions.cs (37)
47DiagnosticDescriptor rule, 57DiagnosticDescriptor rule, 65DiagnosticDescriptor rule, 75DiagnosticDescriptor rule, 83DiagnosticDescriptor rule, 93DiagnosticDescriptor rule, 101DiagnosticDescriptor rule, 108DiagnosticDescriptor rule, 116DiagnosticDescriptor rule, 126DiagnosticDescriptor rule, 135DiagnosticDescriptor rule, 151DiagnosticDescriptor rule, 178DiagnosticDescriptor rule, 188DiagnosticDescriptor rule, 199DiagnosticDescriptor? rule, 211DiagnosticDescriptor rule, 223DiagnosticDescriptor rule, 239DiagnosticDescriptor rule, 246DiagnosticDescriptor rule, 253DiagnosticDescriptor rule, 260DiagnosticDescriptor rule, 297DiagnosticDescriptor rule, 306DiagnosticDescriptor rule, 316DiagnosticDescriptor rule, 323DiagnosticDescriptor rule, 330DiagnosticDescriptor rule, 337DiagnosticDescriptor rule, 379DiagnosticDescriptor rule, 386DiagnosticDescriptor rule, 425DiagnosticDescriptor rule, 433DiagnosticDescriptor rule, 440DiagnosticDescriptor rule, 447DiagnosticDescriptor rule, 455DiagnosticDescriptor rule, 577DiagnosticDescriptor rule, 592DiagnosticDescriptor rule, 611DiagnosticDescriptor rule,
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Options\ICategorizedAnalyzerConfigOptions.cs (2)
51T GetOptionValue<T>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T> tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality); 53T GetOptionValue<T, TArg>(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue<T, TArg> tryParseValue, TArg arg, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (10)
23public static ImmutableArray<string> ImmutableCustomTags(this DiagnosticDescriptor descriptor) 35this DiagnosticDescriptor descriptor, 64public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions compilationOptions, SyntaxTree tree, AnalyzerOptions analyzerOptions) 97public static bool IsDefinedInEditorConfig(this DiagnosticDescriptor descriptor, AnalyzerConfigOptions analyzerConfigOptions) 146this DiagnosticDescriptor descriptor, 215DiagnosticDescriptor descriptor, 251public static bool IsCompilationEnd(this DiagnosticDescriptor descriptor) 255internal static Uri? GetValidHelpLinkUri(this DiagnosticDescriptor descriptor) 259public static DiagnosticDescriptor WithMessageFormat(this DiagnosticDescriptor descriptor, LocalizableString messageFormat)
SymbolDeclaredEventMustBeGeneratedForSourceSymbols.cs (2)
33internal static readonly DiagnosticDescriptor SymbolDeclaredEventRule = new( 43public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(SymbolDeclaredEventRule);
TemporaryArrayAsRefAnalyzer.cs (2)
23internal static readonly DiagnosticDescriptor Rule = new( 34public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
TestExportsShouldNotBeDiscoverable.cs (2)
29internal static readonly DiagnosticDescriptor Rule = new( 40public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Roslyn.Diagnostics.CSharp.Analyzers (8)
CSharpAvoidOptSuffixForNullableEnableCode.cs (2)
30internal static readonly DiagnosticDescriptor Rule = new( 41public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
CSharpDoNotCapturePrimaryContructorParameters.cs (2)
19private static readonly DiagnosticDescriptor Rule = new( 28public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
CSharpDoNotUseDebugAssertForInterpolatedStrings.cs (2)
20internal static readonly DiagnosticDescriptor Rule = new( 31public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
PreferNullLiteral.cs (2)
22internal static readonly DiagnosticDescriptor Rule = new( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(Rule);
Roslyn.Diagnostics.VisualBasic.Analyzers (1)
BasicInvokeTheCorrectPropertyToEnsureCorrectUseSiteDiagnostics.vb (1)
48Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor)
System.Private.CoreLib.Generators (5)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (5)
34private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description); 38private static readonly DiagnosticDescriptor RuleHelper = new DiagnosticDescriptor(DiagnosticIdHelper, Title, MessageHelperFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description); 42private static readonly DiagnosticDescriptor RuleCantParse = new DiagnosticDescriptor(DiagnosticIdConditionParsing, Title, MessageNonParseableConditionFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description); 46private static readonly DiagnosticDescriptor RuleAttributeNotSpecificEnough = new DiagnosticDescriptor(DiagnosticIdAttributeNotSpecificEnough, Title, MessageAttributeNotSpecificEnoughFormat, Category, DiagnosticSeverity.Error, isEnabledByDefault: true, description: Description); 48public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule, RuleHelper, RuleCantParse, RuleAttributeNotSpecificEnough); } }
System.Text.Json.SourceGeneration (22)
JsonSourceGenerator.DiagnosticDescriptors.cs (20)
15public static DiagnosticDescriptor TypeNotSupported { get; } = DiagnosticDescriptorHelper.Create( 23public static DiagnosticDescriptor DuplicateTypeName { get; } = DiagnosticDescriptorHelper.Create( 31public static DiagnosticDescriptor ContextClassesMustBePartial { get; } = DiagnosticDescriptorHelper.Create( 39public static DiagnosticDescriptor MultipleJsonConstructorAttribute { get; } = DiagnosticDescriptorHelper.Create( 47public static DiagnosticDescriptor JsonStringEnumConverterNotSupportedInAot { get; } = DiagnosticDescriptorHelper.Create( 55public static DiagnosticDescriptor MultipleJsonExtensionDataAttribute { get; } = DiagnosticDescriptorHelper.Create( 63public static DiagnosticDescriptor DataExtensionPropertyInvalid { get; } = DiagnosticDescriptorHelper.Create( 71public static DiagnosticDescriptor PolymorphismNotSupported { get; } = DiagnosticDescriptorHelper.Create( 79public static DiagnosticDescriptor JsonConverterAttributeInvalidType { get; } = DiagnosticDescriptorHelper.Create( 87public static DiagnosticDescriptor JsonUnsupportedLanguageVersion { get; } = DiagnosticDescriptorHelper.Create( 95public static DiagnosticDescriptor DerivedJsonConverterAttributesNotSupported { get; } = DiagnosticDescriptorHelper.Create( 103public static DiagnosticDescriptor JsonSerializableAttributeOnNonContextType { get; } = DiagnosticDescriptorHelper.Create( 111public static DiagnosticDescriptor TypeContainsRefLikeMember { get; } = DiagnosticDescriptorHelper.Create( 119public static DiagnosticDescriptor JsonIgnoreConditionAlwaysInvalidOnType { get; } = DiagnosticDescriptorHelper.Create( 127public static DiagnosticDescriptor UnionCaseTypesNotClassifiable { get; } = DiagnosticDescriptorHelper.Create( 135public static DiagnosticDescriptor UnionTypeShapeNotSupported { get; } = DiagnosticDescriptorHelper.Create( 143public static DiagnosticDescriptor OpenGenericDerivedTypeCouldNotBeResolved { get; } = DiagnosticDescriptorHelper.Create( 151public static DiagnosticDescriptor DerivedTypeIsNotSupported { get; } = DiagnosticDescriptorHelper.Create( 159public static DiagnosticDescriptor InferredDerivedTypeIsNotAccessible { get; } = DiagnosticDescriptorHelper.Create( 167public static DiagnosticDescriptor DerivedTypeDiscriminatorCollision { get; } = DiagnosticDescriptorHelper.Create(
JsonSourceGenerator.Parser.cs (1)
65public void ReportDiagnostic(DiagnosticDescriptor descriptor, Location? location, params object?[]? messageArgs)
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
System.Text.RegularExpressions.Generator (8)
DiagnosticDescriptors.cs (6)
13public static DiagnosticDescriptor InvalidGeneratedRegexAttribute { get; } = DiagnosticDescriptorHelper.Create( 22public static DiagnosticDescriptor MultipleGeneratedRegexAttributes { get; } = DiagnosticDescriptorHelper.Create( 31public static DiagnosticDescriptor InvalidRegexArguments { get; } = DiagnosticDescriptorHelper.Create( 40public static DiagnosticDescriptor RegexMemberMustHaveValidSignature { get; } = DiagnosticDescriptorHelper.Create( 49public static DiagnosticDescriptor LimitedSourceGeneration { get; } = DiagnosticDescriptorHelper.Create( 57public static DiagnosticDescriptor UseRegexSourceGeneration { get; } = DiagnosticDescriptorHelper.Create(
src\runtime\src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
UpgradeToGeneratedRegexAnalyzer.cs (1)
53public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.UseRegexSourceGeneration);
System.Windows.Forms.Analyzers (4)
System\Windows\Forms\Analyzers\AppManifestAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
System\Windows\Forms\Analyzers\Diagnostics\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
System\Windows\Forms\Analyzers\Diagnostics\SharedDiagnosticDescriptors.cs (2)
12internal static readonly DiagnosticDescriptor s_cSharpMigrateHighDpiSettings = 21internal static readonly DiagnosticDescriptor s_visualBasicMigrateHighDpiSettings =
System.Windows.Forms.Analyzers.CSharp (9)
System\Windows\Forms\CSharp\Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.cs (1)
20public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
System\Windows\Forms\CSharp\Analyzers\Diagnostics\CSharpDiagnosticDescriptors.cs (6)
13public static readonly DiagnosticDescriptor s_errorUnsupportedProjectType = 22public static readonly DiagnosticDescriptor s_propertyCantBeSetToValue = 31public static readonly DiagnosticDescriptor s_propertyCantBeSetToValueWithReason = 40public static readonly DiagnosticDescriptor s_missingPropertySerializationConfiguration = 51public static readonly DiagnosticDescriptor s_implementITypedDataObjectInAdditionToIDataObject = 62public static readonly DiagnosticDescriptor s_avoidPassingFuncReturningTaskWithoutCancellationToken =
System\Windows\Forms\CSharp\Analyzers\ImplementITypedDataObject\ImplementITypedDataObjectAnalyzer.cs (1)
18public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
15public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
System.Windows.Forms.Analyzers.VisualBasic (6)
Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.vb (1)
20Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor)
Analyzers\ImplementITypedDataObject\ImplementITypedDataObjectInAdditionToIDataObjectAnalyzer.vb (1)
20Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) =
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
15Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor)
Diagnostic\VisualBasicDiagnosticDescriptors.vb (3)
11Public ReadOnly s_missingPropertySerializationConfiguration As DiagnosticDescriptor = DiagnosticDescriptorHelper.Create( 21Public ReadOnly s_implementITypedDataObjectInAdditionToIDataObject As DiagnosticDescriptor = DiagnosticDescriptorHelper.Create( 31Public ReadOnly s_avoidFuncReturningTaskWithoutCancellationToken As DiagnosticDescriptor = DiagnosticDescriptorHelper.Create(