539 instantiations of DiagnosticDescriptor
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.Diagnostics.cs (1)
14internal static readonly DiagnosticDescriptor s_modelNameMustBeValid = new(
BuildActionTelemetryTable (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
262return new DiagnosticDescriptor(descriptor.Id, descriptor.Title, messageFormat,
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);
ILLink.RoslynAnalyzer (4)
DiagnosticDescriptors.cs (4)
14 return new DiagnosticDescriptor (diagnosticId.AsString (), 24 => new DiagnosticDescriptor (diagnosticId.AsString (), 44 return new DiagnosticDescriptor (diagnosticId.AsString (), 53 return new DiagnosticDescriptor (diagnosticId.AsString (),
Microsoft.Analyzers.Extra (1)
DiagDescriptors.cs (1)
134return new(
Microsoft.Analyzers.Local (1)
DiagDescriptors.cs (1)
116=> 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 (25)
DiagnosticDescriptors.cs (25)
11internal static readonly DiagnosticDescriptor DoNotUseModelBindingAttributesOnRouteHandlerParameters = new( 20internal static readonly DiagnosticDescriptor DoNotReturnActionResultsFromRouteHandlers = new( 29internal static readonly DiagnosticDescriptor DetectMisplacedLambdaAttribute = new( 38internal static readonly DiagnosticDescriptor DoNotUseNonLiteralSequenceNumbers = new( 47internal static readonly DiagnosticDescriptor DetectMismatchedParameterOptionality = new( 56internal static readonly DiagnosticDescriptor DoNotUseConfigureWebHostWithConfigureHostBuilder = new( 65internal static readonly DiagnosticDescriptor DoNotUseConfigureWithConfigureWebHostBuilder = new( 74internal static readonly DiagnosticDescriptor DoNotUseUseStartupWithConfigureWebHostBuilder = new( 83internal static readonly DiagnosticDescriptor DoNotUseHostConfigureLogging = new( 92internal static readonly DiagnosticDescriptor DoNotUseHostConfigureServices = new( 101internal static readonly DiagnosticDescriptor DisallowConfigureAppConfigureHostBuilder = new( 110internal static readonly DiagnosticDescriptor UseTopLevelRouteRegistrationsInsteadOfUseEndpoints = new( 119internal static readonly DiagnosticDescriptor UseHeaderDictionaryPropertiesInsteadOfIndexer = new( 128internal static readonly DiagnosticDescriptor DoNotReturnValueFromRequestDelegate = new( 137internal static readonly DiagnosticDescriptor RoutePatternIssue = new( 146internal static readonly DiagnosticDescriptor RoutePatternUnusedParameter = new( 155internal static readonly DiagnosticDescriptor DoNotUseIHeaderDictionaryAdd = new( 164internal static readonly DiagnosticDescriptor RouteParameterComplexTypeIsNotParsable = new( 173internal static readonly DiagnosticDescriptor BindAsyncSignatureMustReturnValueTaskOfT = new( 182internal static readonly DiagnosticDescriptor AmbiguousRouteHandlerRoute = new( 191internal static readonly DiagnosticDescriptor AmbiguousActionRoute = new( 200internal static readonly DiagnosticDescriptor AtMostOneFromBodyAttribute = new( 209internal static readonly DiagnosticDescriptor UseAddAuthorizationBuilder = new( 218internal static readonly DiagnosticDescriptor OverriddenAuthorizeAttribute = new( 227internal static readonly DiagnosticDescriptor PublicPartialProgramClassNotRequired = new(
Microsoft.AspNetCore.App.Analyzers.Test (1)
Infrastructure\WellKnownTypesTests.cs (1)
88internal static readonly DiagnosticDescriptor SuccessDescriptor = new(
Microsoft.AspNetCore.Components.Analyzers (7)
DiagnosticDescriptors.cs (7)
11public static readonly DiagnosticDescriptor ComponentParameterSettersShouldBePublic = new DiagnosticDescriptor( 20public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesMustBeUnique = new DiagnosticDescriptor( 29public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesHasWrongType = new DiagnosticDescriptor( 38public static readonly DiagnosticDescriptor ComponentParametersShouldBePublic = new DiagnosticDescriptor( 47public static readonly DiagnosticDescriptor ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent = new DiagnosticDescriptor( 56public static readonly DiagnosticDescriptor DoNotUseRenderTreeTypes = new DiagnosticDescriptor( 65public static readonly DiagnosticDescriptor ComponentParametersShouldBeAutoProperties = new(
Microsoft.AspNetCore.Components.SdkAnalyzers (6)
DiagnosticDescriptors.cs (6)
15public static readonly DiagnosticDescriptor ComponentParameterSettersShouldBePublic = new DiagnosticDescriptor( 24public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesMustBeUnique = new DiagnosticDescriptor( 33public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesHasWrongType = new DiagnosticDescriptor( 42public static readonly DiagnosticDescriptor ComponentParametersShouldBePublic = new DiagnosticDescriptor( 51public static readonly DiagnosticDescriptor ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent = new DiagnosticDescriptor( 60public static readonly DiagnosticDescriptor DoNotUseRenderTreeTypes = new DiagnosticDescriptor(
Microsoft.AspNetCore.Http.RequestDelegateGenerator (13)
DiagnosticDescriptors.cs (13)
12public static DiagnosticDescriptor UnableToResolveRoutePattern { get; } = new( 21public static DiagnosticDescriptor UnableToResolveMethod { get; } = new( 30public static DiagnosticDescriptor UnableToResolveParameterDescriptor { get; } = new( 39public static DiagnosticDescriptor UnableToResolveAnonymousReturnType { get; } = new( 48public static DiagnosticDescriptor InvalidAsParametersAbstractType { get; } = new( 57public static DiagnosticDescriptor InvalidAsParametersSignature { get; } = new( 66public static DiagnosticDescriptor InvalidAsParametersNoConstructorFound { get; } = new( 75public static DiagnosticDescriptor InvalidAsParametersSingleConstructorOnly { get; } = new( 84public static DiagnosticDescriptor InvalidAsParametersNested { get; } = new( 93public static DiagnosticDescriptor InvalidAsParametersNullable { get; } = new( 102public static DiagnosticDescriptor TypeParametersNotSupported { get; } = new( 111public static DiagnosticDescriptor InaccessibleTypesNotSupported { get; } = new( 120public static DiagnosticDescriptor KeyedAndNotKeyedServiceAttributesNotSupported { get; } = new(
Microsoft.AspNetCore.Mvc.Analyzers (6)
DiagnosticDescriptors.cs (6)
12new DiagnosticDescriptor( 21new DiagnosticDescriptor( 30new DiagnosticDescriptor( 39new DiagnosticDescriptor( 48new DiagnosticDescriptor( 61new DiagnosticDescriptor(
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
ApiDiagnosticDescriptors.cs (4)
12new DiagnosticDescriptor( 21new DiagnosticDescriptor( 30new DiagnosticDescriptor( 39new DiagnosticDescriptor(
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
CompilerFailedExceptionFactoryTest.cs (1)
324return new DiagnosticDescriptor(
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (20)
DiagnosticDescriptors.cs (20)
14public static DiagnosticDescriptor HubServerProxyNonInterfaceGenericTypeArgument { get; } = new DiagnosticDescriptor( 22public static DiagnosticDescriptor HubServerProxyUnsupportedReturnType { get; } = new DiagnosticDescriptor( 30public static DiagnosticDescriptor TooManyHubServerProxyAttributedMethods { get; } = new DiagnosticDescriptor( 38public static DiagnosticDescriptor HubServerProxyAttributedMethodBadAccessibility { get; } = new DiagnosticDescriptor( 46public static DiagnosticDescriptor HubServerProxyAttributedMethodIsNotPartial { get; } = new DiagnosticDescriptor( 54public static DiagnosticDescriptor HubServerProxyAttributedMethodIsNotExtension { get; } = new DiagnosticDescriptor( 62public static DiagnosticDescriptor HubServerProxyAttributedMethodTypeArgCountIsBad { get; } = new DiagnosticDescriptor( 70public static DiagnosticDescriptor HubServerProxyAttributedMethodTypeArgAndReturnTypeDoesNotMatch { get; } = new DiagnosticDescriptor( 78public static DiagnosticDescriptor HubServerProxyAttributedMethodArgCountIsBad { get; } = new DiagnosticDescriptor( 86public static DiagnosticDescriptor HubServerProxyAttributedMethodArgIsNotHubConnection { get; } = new DiagnosticDescriptor( 96public static DiagnosticDescriptor HubClientProxyUnsupportedReturnType { get; } = new DiagnosticDescriptor( 104public static DiagnosticDescriptor TooManyHubClientProxyAttributedMethods { get; } = new DiagnosticDescriptor( 112public static DiagnosticDescriptor HubClientProxyAttributedMethodBadAccessibility { get; } = new DiagnosticDescriptor( 120public static DiagnosticDescriptor HubClientProxyAttributedMethodIsNotPartial { get; } = new DiagnosticDescriptor( 128public static DiagnosticDescriptor HubClientProxyAttributedMethodIsNotExtension { get; } = new DiagnosticDescriptor( 136public static DiagnosticDescriptor HubClientProxyAttributedMethodTypeArgCountIsBad { get; } = new DiagnosticDescriptor( 144public static DiagnosticDescriptor HubClientProxyAttributedMethodTypeArgAndProviderTypeDoesNotMatch { get; } = new DiagnosticDescriptor( 152public static DiagnosticDescriptor HubClientProxyAttributedMethodArgCountIsBad { get; } = new DiagnosticDescriptor( 160public static DiagnosticDescriptor HubClientProxyAttributedMethodArgIsNotHubConnection { get; } = new DiagnosticDescriptor( 168public 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)
75var 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)
92return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity,
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
1312return new DiagnosticDescriptor(
SourceGeneration\GeneratorDriver.cs (1)
407var descriptor = new DiagnosticDescriptor(
Microsoft.CodeAnalysis.CodeStyle (4)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
59=> new(
src\Analyzers\Core\Analyzers\AbstractCodeQualityDiagnosticAnalyzer.cs (1)
50=> new(
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
34private static readonly DiagnosticDescriptor Rule = new(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
262return new DiagnosticDescriptor(descriptor.Id, descriptor.Title, messageFormat,
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
src\Analyzers\CSharp\Tests\ConvertToRecord\ConvertToRecordCodeFixTests.cs (1)
164=> ImmutableArray.Create(new DiagnosticDescriptor(
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (8)
CommandLineTests.cs (8)
14842private static readonly DiagnosticDescriptor _rule = new DiagnosticDescriptor("Id", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 15746internal static readonly DiagnosticDescriptor Hidden01 = new DiagnosticDescriptor("Hidden01", "", "Throwing a diagnostic for #region", "", DiagnosticSeverity.Hidden, isEnabledByDefault: true); 15747internal static readonly DiagnosticDescriptor Hidden02 = new DiagnosticDescriptor("Hidden02", "", "Throwing a diagnostic for something else", "", DiagnosticSeverity.Hidden, isEnabledByDefault: true); 15771internal static readonly DiagnosticDescriptor Info01 = new DiagnosticDescriptor("Info01", "", "Throwing a diagnostic for #pragma restore", "", DiagnosticSeverity.Info, isEnabledByDefault: true); 15798internal static readonly DiagnosticDescriptor Warning01 = new DiagnosticDescriptor("Warning01", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault: true); 15821internal static readonly DiagnosticDescriptor Warning02 = new DiagnosticDescriptor("Warning02", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault: true, helpLinkUri: "https://example.org/analyzer"); 15839internal static readonly DiagnosticDescriptor Error01 = new DiagnosticDescriptor("Error01", "", "Throwing a diagnostic for #pragma disable", "", DiagnosticSeverity.Error, isEnabledByDefault: true); 15840internal static readonly DiagnosticDescriptor Error02 = new DiagnosticDescriptor("Error02", "", "Throwing a diagnostic for something else", "", DiagnosticSeverity.Error, isEnabledByDefault: true);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (2)
217new DiagnosticDescriptor(ID, title: "Syntax", messageFormat: "Syntax", category: "Test", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true); 869var descriptor = new DiagnosticDescriptor(id, "Title", messageFormat: analyzerName, "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
Diagnostics\MockDiagnosticAnalyzerTests.cs (1)
23private readonly DiagnosticDescriptor _descriptor = new DiagnosticDescriptor(Id, "MockDiagnostic", "MockDiagnostic", "InternalCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true, helpLinkUri: "https://github.com/dotnet/roslyn");
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (2)
133var descriptor = new DiagnosticDescriptor(id: id, title: "", messageFormat: "", category: "Naming", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: false); 332var descriptor = new DiagnosticDescriptor(id: id, title: "", messageFormat: "", category: "Naming", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: false);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (58)
Diagnostics\DiagnosticAnalyzerTests.cs (29)
38new DiagnosticDescriptor(id: "CA9999_UseOfVariableThatStartsWithX", title: "CA9999_UseOfVariableThatStartsWithX", messageFormat: "Use of variable whose name starts with 'x': '{0}'", category: "Test", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true); 234private static readonly DiagnosticDescriptor s_descriptor = new DiagnosticDescriptor("XX0001", "My Syntax/Symbol Diagnostic", "My Syntax/Symbol Diagnostic for '{0}'", "Compiler", DiagnosticSeverity.Warning, isEnabledByDefault: true); 303var noneDiagDescriptor = new DiagnosticDescriptor("XX0001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Hidden, isEnabledByDefault: true); 304var infoDiagDescriptor = new DiagnosticDescriptor("XX0002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Info, isEnabledByDefault: true); 305var warningDiagDescriptor = new DiagnosticDescriptor("XX0003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true); 306var errorDiagDescriptor = new DiagnosticDescriptor("XX0004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Error, isEnabledByDefault: true); 387var noneDiagDescriptor = new DiagnosticDescriptor("XX0001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Hidden, isEnabledByDefault: true); 388var infoDiagDescriptor = new DiagnosticDescriptor("XX0002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Info, isEnabledByDefault: true); 389var warningDiagDescriptor = new DiagnosticDescriptor("XX0003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true); 390var errorDiagDescriptor = new DiagnosticDescriptor("XX0004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Error, isEnabledByDefault: true); 442var disabledDiagDescriptor = new DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false); 443var enabledDiagDescriptor = new DiagnosticDescriptor("XX002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true); 471public static DiagnosticDescriptor desc1 = new DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false); 472public static DiagnosticDescriptor desc2 = new DiagnosticDescriptor("XX002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false); 473public static DiagnosticDescriptor desc3 = new DiagnosticDescriptor("XX003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false, customTags: WellKnownDiagnosticTags.NotConfigurable); 487public static DiagnosticDescriptor desc1 = new DiagnosticDescriptor("XX003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false); 488public static DiagnosticDescriptor desc2 = new DiagnosticDescriptor("XX004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true); 502public static DiagnosticDescriptor desc1 = new DiagnosticDescriptor("DummyId", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false); 656internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true); 829public static DiagnosticDescriptor Descriptor1 = new DiagnosticDescriptor("MethodSymbolDiagnostic", "MethodSymbolDiagnostic", "{0}", "MethodSymbolDiagnostic", DiagnosticSeverity.Warning, isEnabledByDefault: true); 873new DiagnosticDescriptor("ID_1", "DummyTitle", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true); 876new DiagnosticDescriptor("ID_2", "DummyTitle", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true); 1284var descriptor = new DiagnosticDescriptor(id: "Test0001", title: "Test0001", messageFormat: "Test0001", category: "Test0001", defaultSeverity: defaultSeverity, isEnabledByDefault: isEnabledByDefault); 1635public static readonly DiagnosticDescriptor ExpressionDescriptor = new DiagnosticDescriptor( 2283public static readonly DiagnosticDescriptor Warning = new DiagnosticDescriptor( 2291public static readonly DiagnosticDescriptor Summary = new DiagnosticDescriptor( 3841internal static DiagnosticDescriptor Rule = new(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true); 4075internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true); 4114internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true);
Diagnostics\GetDiagnosticsTests.cs (3)
931public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 939public static readonly DiagnosticDescriptor DescriptorForBlockEnd = new DiagnosticDescriptor( 1712public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor("ID0001", "Title", "Message", "Category", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true);
Semantics\OutVarTests.cs (1)
18799new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
Semantics\PrimaryConstructorTests.cs (16)
3747new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 4072new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 4158new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 4307new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 4497new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 4631new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 4811new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 4956new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 5135new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 5248new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 5475new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 5562new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 5675new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 5772new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 5830new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 5923new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
Semantics\RecordTests.cs (9)
26187new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 26510new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 26605new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 26770new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 26960new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 27094new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 27274new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 27419new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 27602new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (18)
ConvertToRecord\ConvertToRecordCodeRefactoringTests.cs (1)
4753=> ImmutableArray.Create(new DiagnosticDescriptor(
Diagnostics\Configuration\ConfigureSeverity\AllAnalyzersSeverityConfigurationTests.cs (1)
25private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
Diagnostics\Configuration\ConfigureSeverity\CategoryBasedSeverityConfigurationTests.cs (1)
25private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.cs (1)
25private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
Diagnostics\Suppression\RemoveSuppressionTests.cs (1)
30new DiagnosticDescriptor("InfoDiagnostic", "InfoDiagnostic Title", "InfoDiagnostic", "InfoDiagnostic", DiagnosticSeverity.Info, isEnabledByDefault: true);
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (3)
57new DiagnosticDescriptor("Analyzer0168", "Variable is declared but never used", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 59new DiagnosticDescriptor("Analyzer0219", "Variable is assigned but its value is never used", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 1298new(DiagnosticId, "NonLocalDiagnosticTitle", "NonLocalDiagnosticMessage", "NonLocalDiagnosticCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true);
Diagnostics\Suppression\SuppressionTest_FixMultipleTests.cs (2)
39new DiagnosticDescriptor("InfoDiagnostic", "InfoDiagnostic Title", "InfoDiagnostic", "InfoDiagnostic", DiagnosticSeverity.Info, isEnabledByDefault: true); 41new DiagnosticDescriptor("InfoDiagnostic2", "InfoDiagnostic2 Title", "InfoDiagnostic2", "InfoDiagnostic2", DiagnosticSeverity.Info, isEnabledByDefault: true);
Diagnostics\Suppression\SuppressionTests.cs (7)
693new DiagnosticDescriptor("InfoDiagnostic", "InfoDiagnostic Title", "InfoDiagnostic", "InfoDiagnostic", DiagnosticSeverity.Info, isEnabledByDefault: true); 803new DiagnosticDescriptor("ErrorDiagnostic", "ErrorDiagnostic", "ErrorDiagnostic", "ErrorDiagnostic", DiagnosticSeverity.Error, isEnabledByDefault: true); 866new DiagnosticDescriptor("@~DiagnosticWithBadId", "DiagnosticWithBadId", "DiagnosticWithBadId", "DiagnosticWithBadId", DiagnosticSeverity.Info, isEnabledByDefault: true); 916new DiagnosticDescriptor("InfoDiagnostic", "InfoDiagnostic Title", "InfoDiagnostic", "InfoDiagnostic", DiagnosticSeverity.Info, isEnabledByDefault: true); 1057new("InfoDiagnostic", "InfoDiagnostic", "InfoDiagnostic", "InfoDiagnostic", DiagnosticSeverity.Info, isEnabledByDefault: true); 2057new("InfoDiagnostic", "InfoDiagnostic", "InfoDiagnostic", "InfoDiagnostic", DiagnosticSeverity.Info, isEnabledByDefault: true); 2452new("NoLocationDiagnostic", "NoLocationDiagnostic", "NoLocationDiagnostic", "NoLocationDiagnostic", DiagnosticSeverity.Info, isEnabledByDefault: true);
src\Analyzers\CSharp\Tests\ConvertToRecord\ConvertToRecordCodeFixTests.cs (1)
164=> ImmutableArray.Create(new DiagnosticDescriptor(
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (30)
Semantics\ColorColorTests.cs (1)
1771new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
Semantics\RecordStructTests.cs (8)
5947new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6176new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6272new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6401new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6498new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6556new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6649new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6810new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
Semantics\TopLevelStatementsTests.cs (13)
6424new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6523new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6598new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6707new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6788new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6846new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6904new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 6972new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 7052new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 7168new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 7262new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 7334new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 7401new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
SourceGeneration\GeneratorDriverTests.cs (8)
178new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 433DiagnosticDescriptor generatorDiagnostic = new DiagnosticDescriptor("TG001", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description); 662DiagnosticDescriptor generatorDiagnostic1 = new DiagnosticDescriptor("TG001", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description); 663DiagnosticDescriptor generatorDiagnostic2 = new DiagnosticDescriptor("TG002", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description); 664DiagnosticDescriptor generatorDiagnostic3 = new DiagnosticDescriptor("TG003", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description); 709DiagnosticDescriptor generatorDiagnostic1 = new DiagnosticDescriptor("TG001", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description); 710DiagnosticDescriptor generatorDiagnostic2 = new DiagnosticDescriptor("TG002", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description); 711DiagnosticDescriptor generatorDiagnostic3 = new DiagnosticDescriptor("TG003", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Symbols\Source\NullablePublicAPITests.cs (4)
1157private static readonly DiagnosticDescriptor s_descriptor1 = new DiagnosticDescriptor(id: "CA9999_NullabilityPrinter", title: "CA9999_NullabilityPrinter", messageFormat: "Nullability of '{0}' is '{1}':'{2}'. Speculative flow state is '{3}'", category: "Test", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true); 1158private static readonly DiagnosticDescriptor s_descriptor2 = new DiagnosticDescriptor(id: "CA9998_NullabilityPrinter", title: "CA9998_NullabilityPrinter", messageFormat: "Declared nullability of '{0}' is '{1}'", category: "Test", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true); 1779new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test"); 4835new DiagnosticDescriptor("XY0000", "Test", "Test", "Test", DiagnosticSeverity.Warning, true, "Test", "Test");
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Workspaces\NoCompilationDocumentDiagnosticAnalyzer.cs (1)
19public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor(
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (14)
CodeFixes\CodeFixServiceTests.cs (4)
524var descriptor = new DiagnosticDescriptor(diagnosticId, "MockDiagnostic", "MockDiagnostic", category, DiagnosticSeverity.Warning, isEnabledByDefault: true); 605private readonly DiagnosticDescriptor s_descriptor = new(MockFixer.Id, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 911private readonly DiagnosticDescriptor _descriptor = new(DiagnosticId, "AdditionalFileAnalyzer", "AdditionalFileAnalyzer", "AdditionalFileAnalyzer", DiagnosticSeverity.Warning, isEnabledByDefault: true); 1171public static readonly DiagnosticDescriptor Descriptor = new("ID0001", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (10)
915internal static readonly DiagnosticDescriptor s_syntaxRule = new DiagnosticDescriptor("syntax", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 916internal static readonly DiagnosticDescriptor s_semanticRule = new DiagnosticDescriptor("semantic", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 917internal static readonly DiagnosticDescriptor s_compilationRule = new DiagnosticDescriptor("compilation", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 931internal static readonly DiagnosticDescriptor s_syntaxRule = new DiagnosticDescriptor("syntax", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: false); 932internal static readonly DiagnosticDescriptor s_semanticRule = new DiagnosticDescriptor("semantic", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: false); 933internal static readonly DiagnosticDescriptor s_compilationRule = new DiagnosticDescriptor("compilation", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: false); 947internal static readonly DiagnosticDescriptor s_syntaxRule = new DiagnosticDescriptor("syntax", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 1009internal static readonly DiagnosticDescriptor s_syntaxRule = new DiagnosticDescriptor("leak", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 1025private static readonly DiagnosticDescriptor s_rule = new DiagnosticDescriptor("project", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 1037=> _supportedDiagnostics = ImmutableArray.Create(new DiagnosticDescriptor(DiagnosticId, "test", "test", "test", defaultSeverity, isEnabledByDefault: true));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (11)
CodeFixes\CodeFixServiceTests.vb (1)
175Public ReadOnly Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("TEST1111",
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
68Public Shared Rule As New DiagnosticDescriptor("OA1001", "Options test", "Serialization support has not been requested", "Test", DiagnosticSeverity.Error, True)
Diagnostics\DiagnosticServiceTests.vb (9)
1248Public Shared Descriptor1 As New DiagnosticDescriptor("MustOverrideMethodDiagnostic", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 1367Public Shared Descriptor1 As New DiagnosticDescriptor("FieldDeclarationDiagnostic", "DummyDescription", "{0}", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 1443Public Shared Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("CompilationAnalyzerWithAnalyzerOptionsDiagnostic", 1472Public Shared ReadOnly Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("XX0000", 1516Descriptor = New DiagnosticDescriptor( 1758Public Shared Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("StatefulCompilationAnalyzerDiagnostic", 1871Public Shared Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("MethodSymbolDiagnostic", 2381Public Property Descriptor As New DiagnosticDescriptor("ID0001", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 2496Public Shared s_descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("ID0001", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (4)
Internal\Diagnostics\FSharpDocumentDiagnosticAnalyzer.cs (1)
62dummyDescriptors.Add(new DiagnosticDescriptor(String.Format("FS{0:D4}", i), String.Empty, String.Empty, String.Empty, DiagnosticSeverity.Error, true, null, null));
Internal\Diagnostics\FSharpSimplifyNameDiagnosticAnalyzer.cs (1)
45new DiagnosticDescriptor(
Internal\Diagnostics\FSharpUnusedDeclarationsAnalyzer.cs (1)
47new DiagnosticDescriptor(
Internal\Diagnostics\FSharpUnusedOpensDiagnosticAnalyzer.cs (1)
42new DiagnosticDescriptor(
Microsoft.CodeAnalysis.Features (5)
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (2)
47builder[index] = new DiagnosticDescriptor( 193s_lazyModuleDiagnosticDescriptors.Add(status, descriptor = new DiagnosticDescriptor(
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
59=> new(
src\Analyzers\Core\Analyzers\AbstractCodeQualityDiagnosticAnalyzer.cs (1)
50=> new(
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (1)
34private static readonly DiagnosticDescriptor Rule = new(
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
63var descriptor = new DiagnosticDescriptor(AnalyzerExceptionDiagnosticId,
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (1)
374public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor(
Diagnostics\AdditionalFileDiagnosticsTests.cs (1)
126private readonly DiagnosticDescriptor _descriptor = new(Id, "MockAdditionalDiagnostic", "MockAdditionalDiagnostic", "InternalCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true, helpLinkUri: "https://github.com/dotnet/roslyn");
Diagnostics\BuildOnlyDiagnosticIdsHandlerTests.cs (1)
104private static readonly DiagnosticDescriptor s_descriptor = new(Id, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
Diagnostics\NonLocalDiagnosticTests.cs (1)
78public static readonly DiagnosticDescriptor NonLocalDescriptor = new("NonLocal0001", "Title1", "NonLocal0001", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
Diagnostics\PullDiagnosticTests.cs (2)
130private readonly DiagnosticDescriptor _descriptor = new(RuleId, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 144private readonly DiagnosticDescriptor _descriptor = new(RuleId, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (1)
75private readonly DiagnosticDescriptor _descriptor = new(Id, "MockProjectDiagnostic", "MockProjectDiagnostic", "InternalCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true, helpLinkUri: "https://github.com/dotnet/roslyn");
Microsoft.CodeAnalysis.Test.Utilities (136)
Diagnostics\BoxingOperationAnalyzer.cs (1)
24public static readonly DiagnosticDescriptor BoxingDescriptor = new DiagnosticDescriptor(
Diagnostics\CommonDiagnosticAnalyzers.cs (59)
31public static readonly DiagnosticDescriptor Descriptor1 = new DiagnosticDescriptor( 42public static readonly DiagnosticDescriptor Descriptor2 = new DiagnosticDescriptor( 533public static readonly DiagnosticDescriptor EnabledRule = new DiagnosticDescriptor( 542public static readonly DiagnosticDescriptor DisabledRule = new DiagnosticDescriptor( 582public static readonly DiagnosticDescriptor CodeBlockTopLevelRule = new DiagnosticDescriptor( 590public static readonly DiagnosticDescriptor CodeBlockPerCompilationRule = new DiagnosticDescriptor( 641public static readonly DiagnosticDescriptor DiagnosticDescriptor = new DiagnosticDescriptor( 675new DiagnosticDescriptor(DiagnosticId, Title, Message, 714new DiagnosticDescriptor(DiagnosticId, Title, Message, 735public static readonly DiagnosticDescriptor DummyRule = new DiagnosticDescriptor( 750public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor( 781new DiagnosticDescriptor(DiagnosticId, Title, Message, 813public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 842public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 863public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 886public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 922public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 990public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor( 1029public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor( 1057Descriptor = new DiagnosticDescriptor( 1091Descriptor = new DiagnosticDescriptor( 1121public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 1190public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 1232public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 1377public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 1403public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 1453public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 1478public static readonly DiagnosticDescriptor Warning = new DiagnosticDescriptor( 1486public static readonly DiagnosticDescriptor Error = new DiagnosticDescriptor( 1494public static readonly DiagnosticDescriptor Summary = new DiagnosticDescriptor( 1502public static readonly DiagnosticDescriptor Summary2 = new DiagnosticDescriptor( 1683public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor( 1723public static readonly DiagnosticDescriptor GeneratedCodeDescriptor = new DiagnosticDescriptor( 1731public static readonly DiagnosticDescriptor NonGeneratedCodeDescriptor = new DiagnosticDescriptor( 1739public static readonly DiagnosticDescriptor UniqueTextFileDescriptor = new DiagnosticDescriptor( 1747public static readonly DiagnosticDescriptor NumberOfUniqueTextFileDescriptor = new DiagnosticDescriptor( 1847public static readonly DiagnosticDescriptor ParameterDescriptor = new DiagnosticDescriptor( 1887public static readonly DiagnosticDescriptor SymbolStartTopLevelRule = new DiagnosticDescriptor( 1895public static readonly DiagnosticDescriptor SymbolStartCompilationLevelRule = new DiagnosticDescriptor( 1903public static readonly DiagnosticDescriptor SymbolStartedEndedDifferRule = new DiagnosticDescriptor( 1911public static readonly DiagnosticDescriptor SymbolStartedOrderingRule = new DiagnosticDescriptor( 1919public static readonly DiagnosticDescriptor SymbolEndedOrderingRule = new DiagnosticDescriptor( 1927public static readonly DiagnosticDescriptor OperationOrderingRule = new DiagnosticDescriptor( 1935public static readonly DiagnosticDescriptor DuplicateStartActionRule = new DiagnosticDescriptor( 1943public static readonly DiagnosticDescriptor DuplicateEndActionRule = new DiagnosticDescriptor( 1951public static readonly DiagnosticDescriptor OperationRule = new DiagnosticDescriptor( 2406_rule = new DiagnosticDescriptor( 2471Descriptor = new DiagnosticDescriptor( 2517Descriptor = new DiagnosticDescriptor( 2552private static readonly DiagnosticDescriptor s_descriptor = new DiagnosticDescriptor( 2581Descriptor = new DiagnosticDescriptor( 2627Descriptor = new DiagnosticDescriptor( 2669private static readonly DiagnosticDescriptor s_descriptor = new DiagnosticDescriptor( 2705private static readonly DiagnosticDescriptor s_descriptor = new("ID0001", "Title", "{0}", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 2864Descriptor = new DiagnosticDescriptor( 2908new DiagnosticDescriptor(DiagnosticId, "test", "test", "test", DiagnosticSeverity.Warning, isEnabledByDefault: true); 2975private static readonly DiagnosticDescriptor s_descriptor = new("ID0001", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 3077private static readonly DiagnosticDescriptor s_descriptor = new DiagnosticDescriptor( 3226public static readonly DiagnosticDescriptor _descriptor = new DiagnosticDescriptor(
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (2)
20public static readonly DiagnosticDescriptor LocalCouldHaveMoreSpecificTypeDescriptor = new DiagnosticDescriptor( 28public static readonly DiagnosticDescriptor FieldCouldHaveMoreSpecificTypeDescriptor = new DiagnosticDescriptor(
Diagnostics\EmptyArrayAnalyzer.cs (1)
29public static readonly DiagnosticDescriptor UseArrayEmptyDescriptor = new DiagnosticDescriptor(
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (1)
20public static readonly DiagnosticDescriptor FieldCouldBeReadOnlyDescriptor = new DiagnosticDescriptor(
Diagnostics\LocalCouldBeConstAnalyzer.cs (1)
20public static readonly DiagnosticDescriptor LocalCouldBeConstDescriptor = new DiagnosticDescriptor(
Diagnostics\OperationTestAnalyzer.cs (68)
22public static readonly DiagnosticDescriptor InvalidExpressionDescriptor = new DiagnosticDescriptor( 30public static readonly DiagnosticDescriptor InvalidStatementDescriptor = new DiagnosticDescriptor( 38public static readonly DiagnosticDescriptor IsInvalidDescriptor = new DiagnosticDescriptor( 84public static readonly DiagnosticDescriptor ExpressionDescriptor = new DiagnosticDescriptor( 125public static readonly DiagnosticDescriptor BigForDescriptor = new DiagnosticDescriptor( 298public static readonly DiagnosticDescriptor SparseSwitchDescriptor = new DiagnosticDescriptor( 306public static readonly DiagnosticDescriptor NoDefaultSwitchDescriptor = new DiagnosticDescriptor( 314public static readonly DiagnosticDescriptor OnlyDefaultSwitchDescriptor = new DiagnosticDescriptor( 494public static readonly DiagnosticDescriptor BigParamArrayArgumentsDescriptor = new DiagnosticDescriptor( 502public static readonly DiagnosticDescriptor OutOfNumericalOrderArgumentsDescriptor = new DiagnosticDescriptor( 510public static readonly DiagnosticDescriptor UseDefaultArgumentDescriptor = new DiagnosticDescriptor( 518public static readonly DiagnosticDescriptor InvalidArgumentDescriptor = new DiagnosticDescriptor( 611public static readonly DiagnosticDescriptor SeventeenDescriptor = new DiagnosticDescriptor( 648public static readonly DiagnosticDescriptor NullArgumentsDescriptor = new DiagnosticDescriptor( 688public static readonly DiagnosticDescriptor DoNotUseFieldInitializerDescriptor = new DiagnosticDescriptor( 696public static readonly DiagnosticDescriptor DoNotUsePropertyInitializerDescriptor = new DiagnosticDescriptor( 734public static readonly DiagnosticDescriptor DoNotUseMemberAssignmentDescriptor = new DiagnosticDescriptor( 775public static readonly DiagnosticDescriptor DoNotUseLargeListOfArrayInitializersDescriptor = new DiagnosticDescriptor( 815public static readonly DiagnosticDescriptor TooManyLocalVarDeclarationsDescriptor = new DiagnosticDescriptor( 823public static readonly DiagnosticDescriptor LocalVarInitializedDeclarationDescriptor = new DiagnosticDescriptor( 872public static readonly DiagnosticDescriptor HasDefaultCaseDescriptor = new DiagnosticDescriptor( 880public static readonly DiagnosticDescriptor MultipleCaseClausesDescriptor = new DiagnosticDescriptor( 930public static readonly DiagnosticDescriptor ImplicitInstanceDescriptor = new DiagnosticDescriptor( 938public static readonly DiagnosticDescriptor ExplicitInstanceDescriptor = new DiagnosticDescriptor( 964public static readonly DiagnosticDescriptor EventReferenceDescriptor = new DiagnosticDescriptor( 972public static readonly DiagnosticDescriptor InvalidEventDescriptor = new DiagnosticDescriptor( 980public static readonly DiagnosticDescriptor HandlerAddedDescriptor = new DiagnosticDescriptor( 988public static readonly DiagnosticDescriptor HandlerRemovedDescriptor = new DiagnosticDescriptor( 996public static readonly DiagnosticDescriptor PropertyReferenceDescriptor = new DiagnosticDescriptor( 1004public static readonly DiagnosticDescriptor FieldReferenceDescriptor = new DiagnosticDescriptor( 1012public static readonly DiagnosticDescriptor MethodBindingDescriptor = new DiagnosticDescriptor( 1077public static readonly DiagnosticDescriptor LongParamsDescriptor = new DiagnosticDescriptor( 1085public static readonly DiagnosticDescriptor InvalidConstructorDescriptor = new DiagnosticDescriptor( 1166public static readonly DiagnosticDescriptor EqualsValueDescriptor = new DiagnosticDescriptor( 1208public static readonly DiagnosticDescriptor NoneOperationDescriptor = new DiagnosticDescriptor( 1237public static readonly DiagnosticDescriptor AddressOfDescriptor = new DiagnosticDescriptor( 1245public static readonly DiagnosticDescriptor InvalidAddressOfReferenceDescriptor = new DiagnosticDescriptor( 1278public static readonly DiagnosticDescriptor LambdaExpressionDescriptor = new DiagnosticDescriptor( 1286public static readonly DiagnosticDescriptor TooManyStatementsInLambdaExpressionDescriptor = new DiagnosticDescriptor( 1295public static readonly DiagnosticDescriptor NoneOperationInLambdaExpressionDescriptor = new DiagnosticDescriptor( 1347public static readonly DiagnosticDescriptor StaticMemberDescriptor = new DiagnosticDescriptor( 1356public static readonly DiagnosticDescriptor StaticMemberWithInstanceDescriptor = new DiagnosticDescriptor( 1426public static readonly DiagnosticDescriptor LabelDescriptor = new DiagnosticDescriptor( 1434public static readonly DiagnosticDescriptor GotoDescriptor = new DiagnosticDescriptor( 1476public static readonly DiagnosticDescriptor OperatorAddMethodDescriptor = new DiagnosticDescriptor( 1484public static readonly DiagnosticDescriptor OperatorMinusMethodDescriptor = new DiagnosticDescriptor( 1492public static readonly DiagnosticDescriptor DoubleMultiplyDescriptor = new DiagnosticDescriptor( 1500public static readonly DiagnosticDescriptor BooleanNotDescriptor = new DiagnosticDescriptor( 1553public static readonly DiagnosticDescriptor BinaryUserDefinedOperatorDescriptor = new DiagnosticDescriptor( 1584public static readonly DiagnosticDescriptor BinaryOperatorDescriptor = new DiagnosticDescriptor( 1592public static readonly DiagnosticDescriptor UnaryOperatorDescriptor = new DiagnosticDescriptor( 1666public static readonly DiagnosticDescriptor NullOperationSyntaxDescriptor = new DiagnosticDescriptor( 1676public static readonly DiagnosticDescriptor ParamsArrayOperationDescriptor = new DiagnosticDescriptor( 1752public static readonly DiagnosticDescriptor InvalidBinaryDescriptor = new DiagnosticDescriptor( 1760public static readonly DiagnosticDescriptor InvalidUnaryDescriptor = new DiagnosticDescriptor( 1768public static readonly DiagnosticDescriptor InvalidIncrementDescriptor = new DiagnosticDescriptor( 1819public static readonly DiagnosticDescriptor ConditionalAccessOperationDescriptor = new DiagnosticDescriptor( 1827public static readonly DiagnosticDescriptor ConditionalAccessInstanceOperationDescriptor = new DiagnosticDescriptor( 1876public static readonly DiagnosticDescriptor InvalidConversionExpressionDescriptor = new DiagnosticDescriptor( 1908public static readonly DiagnosticDescriptor ForLoopConditionCrashDescriptor = new DiagnosticDescriptor( 1947public static readonly DiagnosticDescriptor UnaryTrueDescriptor = new DiagnosticDescriptor( 1955public static readonly DiagnosticDescriptor UnaryFalseDescriptor = new DiagnosticDescriptor( 1989public static readonly DiagnosticDescriptor AssignmentOperationDescriptor = new DiagnosticDescriptor( 1997public static readonly DiagnosticDescriptor AssignmentSyntaxDescriptor = new DiagnosticDescriptor( 2033public static readonly DiagnosticDescriptor LiteralDescriptor = new DiagnosticDescriptor( 2063public static readonly DiagnosticDescriptor OperationActionDescriptor = new DiagnosticDescriptor( 2091public static readonly DiagnosticDescriptor OperationActionDescriptor = new DiagnosticDescriptor( 2123public static readonly DiagnosticDescriptor GetOperationDescriptor = new DiagnosticDescriptor(
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (1)
314return new DiagnosticDescriptor(
Diagnostics\TestDiagnosticAnalyzer.cs (1)
25new DiagnosticDescriptor("CA7777", "CA7777_AnalyzerTestDiagnostic", "I'm here for test purposes", "Test", DiagnosticSeverity.Warning, isEnabledByDefault: true);
SourceGeneration\TestGenerators.cs (1)
54new DiagnosticDescriptor(nameof(DiagnosticProducingGenerator), "Diagnostic Title", "Diagnostic Format", "Test", DiagnosticSeverity.Error, isEnabledByDefault: true);
Microsoft.CodeAnalysis.UnitTests (19)
Diagnostics\AnalysisContextInfoTests.cs (1)
99return new DiagnosticDescriptor(
Diagnostics\DiagnosticCreationTests.cs (1)
19var descriptor = new DiagnosticDescriptor("ID", "Title", "MessageFormat", "Category", defaultSeverity, isEnabledByDefault: true);
Diagnostics\DiagnosticLocalizationTests.cs (4)
44var descriptor = new DiagnosticDescriptor( 62descriptor = new DiagnosticDescriptor( 338return new DiagnosticDescriptor( 355return new DiagnosticDescriptor(
Diagnostics\SarifErrorLoggerTests.cs (13)
38var descriptor = new DiagnosticDescriptor("TST", "_TST_", "", "", DiagnosticSeverity.Error, false); 55new DiagnosticDescriptor("TST001-001", "_TST001-001_", "", "", DiagnosticSeverity.Warning, true), 56new DiagnosticDescriptor("TST001", "_TST001_", "", "", DiagnosticSeverity.Warning, true), 57new DiagnosticDescriptor("TST001", "_TST001-002_", "", "", DiagnosticSeverity.Warning, true), 58new DiagnosticDescriptor("TST001", "_TST001-003_", "", "", DiagnosticSeverity.Warning, true), 61new DiagnosticDescriptor("TST002", "", "", "", DiagnosticSeverity.Warning, true), 62new DiagnosticDescriptor("TST002", "", "", "", DiagnosticSeverity.Warning, true), 65new DiagnosticDescriptor("TST002", "", "messageFormat", "", DiagnosticSeverity.Warning, true), 68new DiagnosticDescriptor("TST002", "title_001", "", "", DiagnosticSeverity.Warning, true), 69new DiagnosticDescriptor("TST002", "", "", "category_002", DiagnosticSeverity.Warning, true), 70new DiagnosticDescriptor("TST002", "", "", "", DiagnosticSeverity.Error /*003*/, true), 71new DiagnosticDescriptor("TST002", "", "", "", DiagnosticSeverity.Warning, isEnabledByDefault: false /*004*/), 72new DiagnosticDescriptor("TST002", "", "", "", DiagnosticSeverity.Warning, true, "description_005"),
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (9)
CommandLineTests.vb (9)
10900Friend Shared ReadOnly Hidden01 As DiagnosticDescriptor = New DiagnosticDescriptor("Hidden01", "", "Throwing a diagnostic for #ExternalSource", "", DiagnosticSeverity.Hidden, isEnabledByDefault:=True) 10924Friend Shared ReadOnly Info01 As DiagnosticDescriptor = New DiagnosticDescriptor("Info01", "", "Throwing a diagnostic for #Enable", "", DiagnosticSeverity.Info, isEnabledByDefault:=True) 10925Friend Shared ReadOnly Info02 As DiagnosticDescriptor = New DiagnosticDescriptor("Info02", "", "Throwing a diagnostic for something else", "", DiagnosticSeverity.Info, isEnabledByDefault:=True) 10949Friend Shared ReadOnly Warning01 As DiagnosticDescriptor = New DiagnosticDescriptor("Warning01", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 10950Friend Shared ReadOnly Warning02 As DiagnosticDescriptor = New DiagnosticDescriptor("Warning02", "", "Throwing a diagnostic for something else", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 10951Friend Shared ReadOnly Warning03 As DiagnosticDescriptor = New DiagnosticDescriptor("Warning03", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 10975Friend Shared ReadOnly Warning04 As DiagnosticDescriptor = New DiagnosticDescriptor("Warning04", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True, helpLinkUri:="https://example.org/analyzer") 10999Friend Shared ReadOnly Error01 As DiagnosticDescriptor = New DiagnosticDescriptor("Error01", "", "Throwing a diagnostic for #Disable", "", DiagnosticSeverity.Error, isEnabledByDefault:=True) 11022Friend Shared ReadOnly Rule As DiagnosticDescriptor = New DiagnosticDescriptor("AdditionalFileDiagnostic", "", "Additional File Diagnostic: {0}", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (7)
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.vb (1)
19Private Shared ReadOnly Rule As DiagnosticDescriptor = New DiagnosticDescriptor(
Diagnostics\Suppression\SuppressionTests.vb (6)
697Private ReadOnly _descriptor As New DiagnosticDescriptor("InfoDiagnostic", "InfoDiagnostic", "InfoDiagnostic", "InfoDiagnostic", DiagnosticSeverity.Info, isEnabledByDefault:=True) 772Private ReadOnly _descriptor As New DiagnosticDescriptor("#$DiagnosticWithBadId", "DiagnosticWithBadId", "DiagnosticWithBadId", "DiagnosticWithBadId", DiagnosticSeverity.Info, isEnabledByDefault:=True) 816Private ReadOnly _descriptor As New DiagnosticDescriptor("REm", "REm Title", "REm", "REm", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 882Private ReadOnly _descriptor As New DiagnosticDescriptor("ErrorDiagnostic", "ErrorDiagnostic", "ErrorDiagnostic", "ErrorDiagnostic", DiagnosticSeverity.[Error], isEnabledByDefault:=True) 1002Private ReadOnly _descriptor As New DiagnosticDescriptor("InfoDiagnostic", "InfoDiagnostic", "InfoDiagnostic", "InfoDiagnostic", DiagnosticSeverity.Info, isEnabledByDefault:=True) 1718Private ReadOnly _descriptor As New DiagnosticDescriptor("InfoDiagnostic", "InfoDiagnostic", "InfoDiagnostic", "InfoDiagnostic", DiagnosticSeverity.Info, isEnabledByDefault:=True)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (25)
Diagnostics\DiagnosticAnalyzerTests.vb (22)
27Private Shared ReadOnly s_CA9999_UseOfVariableThatStartsWithX As DiagnosticDescriptor = New DiagnosticDescriptor(id:="CA9999_UseOfVariableThatStartsWithX", title:="CA9999_UseOfVariableThatStartsWithX", messageFormat:="Use of variable whose name starts with 'x': '{0}'", category:="Test", defaultSeverity:=DiagnosticSeverity.Warning, isEnabledByDefault:=True) 49Dim noneDiagDescriptor = New DiagnosticDescriptor("XX0001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Hidden, isEnabledByDefault:=True) 50Dim infoDiagDescriptor = New DiagnosticDescriptor("XX0002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Info, isEnabledByDefault:=True) 51Dim warningDiagDescriptor = New DiagnosticDescriptor("XX0003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 52Dim errorDiagDescriptor = New DiagnosticDescriptor("XX0004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Error, isEnabledByDefault:=True) 130Dim noneDiagDescriptor = New DiagnosticDescriptor("XX0001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Hidden, isEnabledByDefault:=True) 131Dim infoDiagDescriptor = New DiagnosticDescriptor("XX0002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Info, isEnabledByDefault:=True) 132Dim warningDiagDescriptor = New DiagnosticDescriptor("XX0003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 133Dim errorDiagDescriptor = New DiagnosticDescriptor("XX0004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.[Error], isEnabledByDefault:=True) 185Dim disabledDiagDescriptor = New DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=False) 186Dim enabledDiagDescriptor = New DiagnosticDescriptor("XX002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 215Public Shared desc1 As New DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=False) 216Public Shared desc2 As New DiagnosticDescriptor("XX002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=False) 231Public Shared desc1 As New DiagnosticDescriptor("XX003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=False) 232Public Shared desc2 As New DiagnosticDescriptor("XX004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 265Public Shared desc1 As New DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 303Public Shared desc1 As New DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 348Public Shared desc1 As New DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 497Public Shared desc1 As New DiagnosticDescriptor("FieldSymbolDiagnostic", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 562Public Shared desc1 As New DiagnosticDescriptor("FieldDeclarationDiagnostic", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 757Dim descriptor = New DiagnosticDescriptor(id:="Test0001", title:="Test0001", messageFormat:="Test0001", category:="Test0001", defaultSeverity:=defaultSeverity, isEnabledByDefault:=isEnabledByDefault) 950Public Shared ReadOnly ExpressionDescriptor As New DiagnosticDescriptor("Expression", "Expression", "Expression found.", "Testing", DiagnosticSeverity.Warning, isEnabledByDefault:=True)
Diagnostics\GetDiagnosticsTests.vb (3)
587Public Shared ReadOnly Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("ID0001", "Title", "{0}", "Category", defaultSeverity:=DiagnosticSeverity.Warning, isEnabledByDefault:=True) 588Public Shared ReadOnly DescriptorForBlockEnd As DiagnosticDescriptor = New DiagnosticDescriptor("ID0002", "Title", "Message", "Category", defaultSeverity:=DiagnosticSeverity.Warning, isEnabledByDefault:=True) 711Public Shared ReadOnly Descriptor As New DiagnosticDescriptor("ID0001", "Title", "Message", "Category", defaultSeverity:=DiagnosticSeverity.Warning, isEnabledByDefault:=True)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (4)
Parser\ParseDirectives.vb (4)
3183New DiagnosticDescriptor("sOMEID", "something1", "something2", "something3", DiagnosticSeverity.Warning, isEnabledByDefault:=True), 3289New DiagnosticDescriptor("__Something_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678902345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678902345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678902345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", 3621New DiagnosticDescriptor("TestId", "something1", "something2", "something3", DiagnosticSeverity.Warning, isEnabledByDefault:=True), 3648New DiagnosticDescriptor("TestId", "something1", "something2", "something3", DiagnosticSeverity.Warning, isEnabledByDefault:=True),
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
262return new DiagnosticDescriptor(descriptor.Id, descriptor.Title, messageFormat,
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
BatchFixAllProviderTests.cs (1)
57new DiagnosticDescriptor("LiteralZero", "title", "message", "category", DiagnosticSeverity.Warning, isEnabledByDefault: true);
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.Logging.Generators (1)
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.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.Metrics (1)
src\Generators\Shared\DiagDescriptorsBase.cs (1)
28return new(
Microsoft.Gen.MetricsReports (2)
MetricsReportsGenerator.cs (1)
71var diagnostic = new DiagnosticDescriptor(
src\Generators\Shared\DiagDescriptorsBase.cs (1)
28return new(
Microsoft.Interop.ComInterfaceGenerator (3)
GeneratorDiagnostics.cs (2)
491new DiagnosticDescriptor( 502new DiagnosticDescriptor(
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\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\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\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
22return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, helpLink, customTags);
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,
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
EditorConfigSettings\DataProvider\DataProviderTests.MockAnalyzerReference.cs (1)
96var descriptor = new DiagnosticDescriptor(diagnosticId, "MockDiagnostic", "MockDiagnostic", category, DiagnosticSeverity.Warning, isEnabledByDefault: true);
Microsoft.VisualStudio.LanguageServices.UnitTests (8)
SolutionExplorer\AnalyzerCommandHandlerTests.vb (1)
16Dim descriptor = New DiagnosticDescriptor(
SolutionExplorer\DiagnosticDescriptorComparerTests.vb (6)
18Dim x = New DiagnosticDescriptor( 26Dim y = New DiagnosticDescriptor( 47Dim x = New DiagnosticDescriptor( 55Dim y = New DiagnosticDescriptor( 76Dim x = New DiagnosticDescriptor( 84Dim y = New DiagnosticDescriptor(
SolutionExplorer\DiagnosticItemTests.vb (1)
41Return New DiagnosticDescriptor(
Roslyn.VisualStudio.Next.UnitTests (2)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (2)
266ImmutableArray.Create(new DiagnosticDescriptor("test", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true)); 286ImmutableArray.Create(new DiagnosticDescriptor("test", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true));
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\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\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
22return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, isEnabledByDefault, description, helpLink, customTags);
System.Windows.Forms.Analyzers (2)
System\Windows\Forms\Analyzers\Diagnostics\SharedDiagnosticDescriptors.cs (2)
12new(id: DiagnosticIDs.MigrateHighDpiSettings, 20new(id: DiagnosticIDs.MigrateHighDpiSettings,
System.Windows.Forms.Analyzers.CSharp (5)
System\Windows\Forms\CSharp\Analyzers\Diagnostics\CSharpDiagnosticDescriptors.cs (5)
13new(id: DiagnosticIDs.UnsupportedProjectType, 21new(id: DiagnosticIDs.PropertyCantBeSetToValue, 29new(id: DiagnosticIDs.PropertyCantBeSetToValue, 37new(id: DiagnosticIDs.MissingPropertySerializationConfiguration, 46new(DiagnosticIDs.AvoidPassingFuncReturningTaskWithoutCancellationToken,
1848 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(
BuildActionTelemetryTable (10)
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)
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) 154(bool isEnabledByDefault, DiagnosticSeverity effectiveSeverity) GetEnabledByDefaultAndSeverity(DiagnosticDescriptor rule, AnalysisMode analysisMode)
ConfigurationSchemaGenerator (23)
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 (1)
37public TypeParseInfo ToTransitiveTypeParseInfo(ITypeSymbol memberType, DiagnosticDescriptor? diagDescriptor = null, string? memberName = null)
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)
GenerateRulesMissingDocumentation (4)
Program.cs (4)
61DiagnosticDescriptor descriptor = ruleById.Value; 140static SortedList<string, DiagnosticDescriptor> getAllRulesById(string binDirectory, string configuration) 142var allRulesById = new SortedList<string, DiagnosticDescriptor>(); 159foreach (var rule in analyzer.SupportedDiagnostics)
ILLink.CodeFixProvider (6)
DynamicallyAccessedMembersCodeFixProvider.cs (3)
25 private static ImmutableArray<DiagnosticDescriptor> GetSupportedDiagnostics () 28 var diagDescriptorsArrayBuilder = ImmutableArray.CreateBuilder<DiagnosticDescriptor> (); 62 public static ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => GetSupportedDiagnostics ();
RequiresAssemblyFilesCodeFixProvider.cs (1)
20 public static ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create (
RequiresDynamicCodeCodeFixProvider.cs (1)
20 public static ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresDynamicCode));
RequiresUnreferencedCodeCodeFixProvider.cs (1)
20 public static ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create (DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresUnreferencedCode));
ILLink.RoslynAnalyzer (38)
COMAnalyzer.cs (2)
22 static readonly DiagnosticDescriptor s_correctnessOfCOMCannotBeGuaranteed = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.CorrectnessOfCOMCannotBeGuaranteed, 25 public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create (s_correctnessOfCOMCannotBeGuaranteed);
DiagnosticDescriptors.cs (3)
11 public static DiagnosticDescriptor GetDiagnosticDescriptor (DiagnosticId diagnosticId) 23 public static DiagnosticDescriptor GetDiagnosticDescriptor (DiagnosticId diagnosticId, DiagnosticString diagnosticString) 32 public static DiagnosticDescriptor GetDiagnosticDescriptor (DiagnosticId diagnosticId,
DynamicallyAccessedMembersAnalyzer.cs (4)
33 public static ImmutableArray<DiagnosticDescriptor> GetSupportedDiagnostics () 35 var diagDescriptorsArrayBuilder = ImmutableArray.CreateBuilder<DiagnosticDescriptor> (26); 64 foreach (var diagnosticDescriptor in requiresAnalyzer.SupportedDiagnostics) 81 public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => GetSupportedDiagnostics ();
RequiresAnalyzerBase.cs (3)
29 private protected abstract DiagnosticDescriptor RequiresDiagnosticRule { get; } 33 private protected abstract DiagnosticDescriptor RequiresAttributeMismatch { get; } 34 private protected abstract DiagnosticDescriptor RequiresOnStaticCtor { get; }
RequiresAssemblyFilesAnalyzer.cs (9)
22 static readonly DiagnosticDescriptor s_locationRule = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.AvoidAssemblyLocationInSingleFile, 25 static readonly DiagnosticDescriptor s_getFilesRule = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.AvoidAssemblyGetFilesInSingleFile, 28 static readonly DiagnosticDescriptor s_requiresAssemblyFilesRule = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresAssemblyFiles, 31 static readonly DiagnosticDescriptor s_requiresAssemblyFilesAttributeMismatch = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresAssemblyFilesAttributeMismatch); 33 static readonly DiagnosticDescriptor s_requiresAssemblyFilesOnStaticCtor = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresAssemblyFilesOnStaticConstructor); 35 public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create (s_locationRule, s_getFilesRule, s_requiresAssemblyFilesRule, s_requiresAssemblyFilesAttributeMismatch, s_requiresAssemblyFilesOnStaticCtor); 43 private protected override DiagnosticDescriptor RequiresDiagnosticRule => s_requiresAssemblyFilesRule; 47 private protected override DiagnosticDescriptor RequiresAttributeMismatch => s_requiresAssemblyFilesAttributeMismatch; 49 private protected override DiagnosticDescriptor RequiresOnStaticCtor => s_requiresAssemblyFilesOnStaticCtor;
RequiresDynamicCodeAnalyzer.cs (7)
22 static readonly DiagnosticDescriptor s_requiresDynamicCodeOnStaticCtor = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresDynamicCodeOnStaticConstructor); 23 static readonly DiagnosticDescriptor s_requiresDynamicCodeRule = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresDynamicCode); 24 static readonly DiagnosticDescriptor s_requiresDynamicCodeAttributeMismatch = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresDynamicCodeAttributeMismatch); 26 public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 35 private protected override DiagnosticDescriptor RequiresDiagnosticRule => s_requiresDynamicCodeRule; 39 private protected override DiagnosticDescriptor RequiresAttributeMismatch => s_requiresDynamicCodeAttributeMismatch; 41 private protected override DiagnosticDescriptor RequiresOnStaticCtor => s_requiresDynamicCodeOnStaticCtor;
RequiresUnreferencedCodeAnalyzer.cs (10)
21 static readonly DiagnosticDescriptor s_requiresUnreferencedCodeRule = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresUnreferencedCode); 22 static readonly DiagnosticDescriptor s_requiresUnreferencedCodeAttributeMismatch = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresUnreferencedCodeAttributeMismatch); 23 static readonly DiagnosticDescriptor s_makeGenericTypeRule = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.MakeGenericType); 24 static readonly DiagnosticDescriptor s_makeGenericMethodRule = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.MakeGenericMethod); 25 static readonly DiagnosticDescriptor s_requiresUnreferencedCodeOnStaticCtor = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresUnreferencedCodeOnStaticConstructor); 27 static readonly DiagnosticDescriptor s_typeDerivesFromRucClassRule = DiagnosticDescriptors.GetDiagnosticDescriptor (DiagnosticId.RequiresUnreferencedCodeOnBaseClass); 47 public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 56 private protected override DiagnosticDescriptor RequiresDiagnosticRule => s_requiresUnreferencedCodeRule; 60 private protected override DiagnosticDescriptor RequiresAttributeMismatch => s_requiresUnreferencedCodeAttributeMismatch; 62 private protected override DiagnosticDescriptor RequiresOnStaticCtor => s_requiresUnreferencedCodeOnStaticCtor;
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)
21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
CallAnalysis\CallAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
DiagDescriptors.cs (10)
43public static DiagnosticDescriptor ThrowsExpression { get; } = Make( 51public static DiagnosticDescriptor ThrowsStatement { get; } = Make( 59public static DiagnosticDescriptor ToInvariantString { get; } = Make( 67public static DiagnosticDescriptor NewSymbolsMustBeMarkedExperimental { get; } = Make( 75public static DiagnosticDescriptor ExperimentalSymbolsCantBeMarkedObsolete { get; } = Make( 83public static DiagnosticDescriptor PublishedSymbolsCantBeMarkedExperimental { get; } = Make( 91public static DiagnosticDescriptor PublishedSymbolsCantBeDeleted { get; } = Make( 99public static DiagnosticDescriptor PublishedSymbolsCantChange { get; } = Make( 107public static DiagnosticDescriptor InternalReferencedInPublicDoc { get; } = Make( 115private 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 (36)
Authorization\AddAuthorizationBuilderAnalyzer.cs (1)
19public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.UseAddAuthorizationBuilder);
DiagnosticDescriptors.cs (25)
11internal static readonly DiagnosticDescriptor DoNotUseModelBindingAttributesOnRouteHandlerParameters = new( 20internal static readonly DiagnosticDescriptor DoNotReturnActionResultsFromRouteHandlers = new( 29internal static readonly DiagnosticDescriptor DetectMisplacedLambdaAttribute = new( 38internal static readonly DiagnosticDescriptor DoNotUseNonLiteralSequenceNumbers = new( 47internal static readonly DiagnosticDescriptor DetectMismatchedParameterOptionality = new( 56internal static readonly DiagnosticDescriptor DoNotUseConfigureWebHostWithConfigureHostBuilder = new( 65internal static readonly DiagnosticDescriptor DoNotUseConfigureWithConfigureWebHostBuilder = new( 74internal static readonly DiagnosticDescriptor DoNotUseUseStartupWithConfigureWebHostBuilder = new( 83internal static readonly DiagnosticDescriptor DoNotUseHostConfigureLogging = new( 92internal static readonly DiagnosticDescriptor DoNotUseHostConfigureServices = new( 101internal static readonly DiagnosticDescriptor DisallowConfigureAppConfigureHostBuilder = new( 110internal static readonly DiagnosticDescriptor UseTopLevelRouteRegistrationsInsteadOfUseEndpoints = new( 119internal static readonly DiagnosticDescriptor UseHeaderDictionaryPropertiesInsteadOfIndexer = new( 128internal static readonly DiagnosticDescriptor DoNotReturnValueFromRequestDelegate = new( 137internal static readonly DiagnosticDescriptor RoutePatternIssue = new( 146internal static readonly DiagnosticDescriptor RoutePatternUnusedParameter = new( 155internal static readonly DiagnosticDescriptor DoNotUseIHeaderDictionaryAdd = new( 164internal static readonly DiagnosticDescriptor RouteParameterComplexTypeIsNotParsable = new( 173internal static readonly DiagnosticDescriptor BindAsyncSignatureMustReturnValueTaskOfT = new( 182internal static readonly DiagnosticDescriptor AmbiguousRouteHandlerRoute = new( 191internal static readonly DiagnosticDescriptor AmbiguousActionRoute = new( 200internal static readonly DiagnosticDescriptor AtMostOneFromBodyAttribute = new( 209internal static readonly DiagnosticDescriptor UseAddAuthorizationBuilder = new( 218internal static readonly DiagnosticDescriptor OverriddenAuthorizeAttribute = new( 227internal static readonly DiagnosticDescriptor PublicPartialProgramClassNotRequired = new(
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);
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.App.Analyzers.Test (6)
Infrastructure\WellKnownTypesTests.cs (2)
88internal static readonly DiagnosticDescriptor SuccessDescriptor = new( 96public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(new[]
Verifiers\CSharpAnalyzerVerifier.cs (2)
28/// <inheritdoc cref="AnalyzerVerifier{TAnalyzer, TTest, TVerifier}.Diagnostic(DiagnosticDescriptor)"/> 29public static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor)
Verifiers\CSharpCodeFixVerifier.cs (2)
25/// <inheritdoc cref="CodeFixVerifier{TAnalyzer, TCodeFix, TTest, TVerifier}.Diagnostic(DiagnosticDescriptor)"/> 26public static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor)
Microsoft.AspNetCore.Components.Analyzers (14)
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 (7)
11public static readonly DiagnosticDescriptor ComponentParameterSettersShouldBePublic = new DiagnosticDescriptor( 20public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesMustBeUnique = new DiagnosticDescriptor( 29public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesHasWrongType = new DiagnosticDescriptor( 38public static readonly DiagnosticDescriptor ComponentParametersShouldBePublic = new DiagnosticDescriptor( 47public static readonly DiagnosticDescriptor ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent = new DiagnosticDescriptor( 56public static readonly DiagnosticDescriptor DoNotUseRenderTreeTypes = new DiagnosticDescriptor( 65public static readonly DiagnosticDescriptor ComponentParametersShouldBeAutoProperties = new(
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.Analyzers.Tests (1)
Verifiers\DiagnosticVerifier.cs (1)
247foreach (var rule in rules)
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)
15public static readonly DiagnosticDescriptor ComponentParameterSettersShouldBePublic = new DiagnosticDescriptor( 24public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesMustBeUnique = new DiagnosticDescriptor( 33public static readonly DiagnosticDescriptor ComponentParameterCaptureUnmatchedValuesHasWrongType = new DiagnosticDescriptor( 42public static readonly DiagnosticDescriptor ComponentParametersShouldBePublic = new DiagnosticDescriptor( 51public static readonly DiagnosticDescriptor ComponentParametersShouldNotBeSetOutsideOfTheirDeclaredComponent = new DiagnosticDescriptor( 60public 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.SdkAnalyzers.Tests (1)
Verifiers\DiagnosticVerifier.cs (1)
247foreach (var rule in rules)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (13)
DiagnosticDescriptors.cs (13)
12public static DiagnosticDescriptor UnableToResolveRoutePattern { get; } = new( 21public static DiagnosticDescriptor UnableToResolveMethod { get; } = new( 30public static DiagnosticDescriptor UnableToResolveParameterDescriptor { get; } = new( 39public static DiagnosticDescriptor UnableToResolveAnonymousReturnType { get; } = new( 48public static DiagnosticDescriptor InvalidAsParametersAbstractType { get; } = new( 57public static DiagnosticDescriptor InvalidAsParametersSignature { get; } = new( 66public static DiagnosticDescriptor InvalidAsParametersNoConstructorFound { get; } = new( 75public static DiagnosticDescriptor InvalidAsParametersSingleConstructorOnly { get; } = new( 84public static DiagnosticDescriptor InvalidAsParametersNested { get; } = new( 93public static DiagnosticDescriptor InvalidAsParametersNullable { get; } = new( 102public static DiagnosticDescriptor TypeParametersNotSupported { get; } = new( 111public static DiagnosticDescriptor InaccessibleTypesNotSupported { get; } = new( 120public static DiagnosticDescriptor KeyedAndNotKeyedServiceAttributesNotSupported { get; } = new(
Microsoft.AspNetCore.Mvc.Analyzers (12)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (1)
13public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create(
DiagnosticDescriptors.cs (6)
11public static readonly DiagnosticDescriptor MVC1000_HtmlHelperPartialShouldBeAvoided = 20public static readonly DiagnosticDescriptor MVC1001_FiltersShouldNotBeAppliedToPageHandlerMethods = 29public static readonly DiagnosticDescriptor MVC1002_RouteAttributesShouldNotBeAppliedToPageHandlerMethods = 38public static readonly DiagnosticDescriptor MVC1003_RouteAttributesShouldNotBeAppliedToPageModels = 47public static readonly DiagnosticDescriptor MVC1004_ParameterNameCollidesWithTopLevelProperty = 60public 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)
11public static readonly DiagnosticDescriptor API1000_ActionReturnsUndocumentedStatusCode = 20public static readonly DiagnosticDescriptor API1001_ActionReturnsUndocumentedSuccessResult = 29public static readonly DiagnosticDescriptor API1002_ActionDoesNotReturnDocumentedStatusCode = 38public static readonly DiagnosticDescriptor API1003_ApiActionsDoNotRequireExplicitModelValidationCheck =
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
CompilerFailedExceptionFactoryTest.cs (1)
322private static DiagnosticDescriptor GetRoslynDiagnostic(string messageFormat)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (20)
DiagnosticDescriptors.cs (20)
14public static DiagnosticDescriptor HubServerProxyNonInterfaceGenericTypeArgument { get; } = new DiagnosticDescriptor( 22public static DiagnosticDescriptor HubServerProxyUnsupportedReturnType { get; } = new DiagnosticDescriptor( 30public static DiagnosticDescriptor TooManyHubServerProxyAttributedMethods { get; } = new DiagnosticDescriptor( 38public static DiagnosticDescriptor HubServerProxyAttributedMethodBadAccessibility { get; } = new DiagnosticDescriptor( 46public static DiagnosticDescriptor HubServerProxyAttributedMethodIsNotPartial { get; } = new DiagnosticDescriptor( 54public static DiagnosticDescriptor HubServerProxyAttributedMethodIsNotExtension { get; } = new DiagnosticDescriptor( 62public static DiagnosticDescriptor HubServerProxyAttributedMethodTypeArgCountIsBad { get; } = new DiagnosticDescriptor( 70public static DiagnosticDescriptor HubServerProxyAttributedMethodTypeArgAndReturnTypeDoesNotMatch { get; } = new DiagnosticDescriptor( 78public static DiagnosticDescriptor HubServerProxyAttributedMethodArgCountIsBad { get; } = new DiagnosticDescriptor( 86public static DiagnosticDescriptor HubServerProxyAttributedMethodArgIsNotHubConnection { get; } = new DiagnosticDescriptor( 96public static DiagnosticDescriptor HubClientProxyUnsupportedReturnType { get; } = new DiagnosticDescriptor( 104public static DiagnosticDescriptor TooManyHubClientProxyAttributedMethods { get; } = new DiagnosticDescriptor( 112public static DiagnosticDescriptor HubClientProxyAttributedMethodBadAccessibility { get; } = new DiagnosticDescriptor( 120public static DiagnosticDescriptor HubClientProxyAttributedMethodIsNotPartial { get; } = new DiagnosticDescriptor( 128public static DiagnosticDescriptor HubClientProxyAttributedMethodIsNotExtension { get; } = new DiagnosticDescriptor( 136public static DiagnosticDescriptor HubClientProxyAttributedMethodTypeArgCountIsBad { get; } = new DiagnosticDescriptor( 144public static DiagnosticDescriptor HubClientProxyAttributedMethodTypeArgAndProviderTypeDoesNotMatch { get; } = new DiagnosticDescriptor( 152public static DiagnosticDescriptor HubClientProxyAttributedMethodArgCountIsBad { get; } = new DiagnosticDescriptor( 160public static DiagnosticDescriptor HubClientProxyAttributedMethodArgIsNotHubConnection { get; } = new DiagnosticDescriptor( 168public 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)
1547protected 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.cs (13)
42/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic</param> 47DiagnosticDescriptor descriptor, 57/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 67DiagnosticDescriptor descriptor, 78/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 88DiagnosticDescriptor descriptor, 99/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 114DiagnosticDescriptor descriptor, 126/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 142DiagnosticDescriptor descriptor, 298public abstract DiagnosticDescriptor Descriptor { get; } 316/// Gets the default <see cref="DiagnosticSeverity"/> of the diagnostic's <see cref="DiagnosticDescriptor"/>. 327/// 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\Diagnostic_SimpleDiagnostic.cs (5)
21private readonly DiagnosticDescriptor _descriptor; 31DiagnosticDescriptor descriptor, 57DiagnosticDescriptor descriptor, 75var descriptor = new DiagnosticDescriptor(id, title, message, 80public 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)
33private static ImmutableDictionary<int, DiagnosticDescriptor> s_errorCodeToDescriptorMap = ImmutableDictionary<int, DiagnosticDescriptor>.Empty; 68internal static DiagnosticDescriptor GetDescriptor(int errorCode, CommonMessageProvider messageProvider) 74private static DiagnosticDescriptor GetOrCreateDescriptor(int errorCode, DiagnosticSeverity defaultSeverity, CommonMessageProvider messageProvider) 83private static DiagnosticDescriptor CreateDescriptor(int errorCode, DiagnosticSeverity defaultSeverity, CommonMessageProvider messageProvider) 187public virtual DiagnosticDescriptor Descriptor
Diagnostic\DiagnosticWithInfo.cs (1)
51public override DiagnosticDescriptor Descriptor
DiagnosticAnalyzer\AnalyzerDriver.cs (9)
537foreach (var descriptor in descriptors) 892/// Returns an array of <see cref="DiagnosticDescriptor"/>s for all <see cref="Analyzers"/> 895public ImmutableArray<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)> GetAllDiagnosticDescriptorsWithInfo(CancellationToken cancellationToken, out double totalAnalyzerExecutionTime) 901var builder = ArrayBuilder<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)>.GetInstance(); 919foreach (var descriptor in descriptors) 941DiagnosticDescriptor descriptor, 947DiagnosticDescriptor.MapSeverityToReport(descriptor.DefaultSeverity) : 1391foreach (var descriptor in descriptors) 2014severityFilter.Contains(DiagnosticDescriptor.MapSeverityToReport(diagnostic.Severity)))
DiagnosticAnalyzer\AnalyzerExecutor.cs (4)
1251var descriptor = GetAnalyzerExceptionDiagnosticDescriptor(AnalyzerExceptionDiagnosticId, title, messageFormat); 1271foreach (var diagnostic in analyzer.SupportedDiagnostics) 1298var descriptor = GetAnalyzerExceptionDiagnosticDescriptor(AnalyzerDriverExceptionDiagnosticId, title, messageFormat); 1302internal 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)
252public ImmutableArray<DiagnosticDescriptor> GetSupportedDiagnosticDescriptors( 284foreach (var descriptor in supportedDescriptors) 307Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnosticDescriptors = 315bool isEnabledWithAnalyzerConfigOptions(DiagnosticDescriptor descriptor) 345Func<DiagnosticDescriptor, bool> isEnabledWithAnalyzerConfigOptions, 346Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnosticDescriptors, 359foreach (var diag in supportedDiagnostics) 396severity = isSuppressed ? ReportDiagnostic.Suppress : DiagnosticDescriptor.MapSeverityToReport(diag.DefaultSeverity);
DiagnosticAnalyzer\AnalyzerOptionsExtensions.cs (1)
33DiagnosticDescriptor descriptor,
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (2)
1235Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnosticDescriptors = analyzer => 1243return 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)
407var descriptor = new DiagnosticDescriptor(
Symbols\Attributes\ObsoleteAttributeData.cs (1)
64/// When specified, the obsolete diagnostic's <see cref="DiagnosticDescriptor.HelpLinkUri"/> will be produced
Microsoft.CodeAnalysis.CodeStyle (79)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs (2)
83protected AbstractBuiltInCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, IOption2 Option)> supportedDiagnosticsWithOptions) 96protected AbstractBuiltInCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, ImmutableHashSet<IOption2> Options)> supportedDiagnosticsWithOptions)
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\Analyzers\Core\Analyzers\AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer.cs (6)
88protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<DiagnosticDescriptor> descriptors, PerLanguageOption2<bool> fadingOption) 91foreach (var descriptor in descriptors) 103protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, IOption2 Option)> supportedDiagnosticsWithOptions, PerLanguageOption2<bool>? fadingOption) 112protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, ImmutableHashSet<IOption2> Options)> supportedDiagnosticsWithOptions, PerLanguageOption2<bool>? fadingOption) 126private static void AddDescriptorsToFadingOptionMapping(IEnumerable<DiagnosticDescriptor> descriptors, PerLanguageOption2<bool>? fadingOption) 130foreach (var descriptor in descriptors)
src\Analyzers\Core\Analyzers\AbstractCodeQualityDiagnosticAnalyzer.cs (3)
17ImmutableArray<DiagnosticDescriptor> descriptors, 25public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 39protected static DiagnosticDescriptor CreateDescriptor(
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (3)
15private static readonly DiagnosticDescriptor s_invalidHeaderDescriptor = CreateDescriptorForFileHeader(s_invalidHeaderTitle, s_invalidHeaderMessage); 19private static readonly DiagnosticDescriptor s_missingHeaderDescriptor = CreateDescriptorForFileHeader(s_missingHeaderTitle, s_missingHeaderMessage); 21private static DiagnosticDescriptor CreateDescriptorForFileHeader(LocalizableString title, LocalizableString message)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (13)
24/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 41DiagnosticDescriptor descriptor, 56private static LocalizableString CreateMessage(DiagnosticDescriptor descriptor, object[] messageArgs) 71/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 89DiagnosticDescriptor descriptor, 108DiagnosticDescriptor descriptor, 135/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 157DiagnosticDescriptor descriptor, 178DiagnosticDescriptor descriptor, 204DiagnosticDescriptor descriptor, 239/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 256DiagnosticDescriptor descriptor, 287static IEnumerable<string> GetEffectiveCustomTags(DiagnosticDescriptor descriptor, NotificationOption2 notificationOption, AnalyzerOptions analyzerOptions)
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), FadingOptions.FadeOutUnusedImports) 56private static ImmutableArray<DiagnosticDescriptor> GetDescriptors(LocalizableString titleAndMessage, out DiagnosticDescriptor classificationIdDescriptor, out DiagnosticDescriptor generatedCodeClassificationIdDescriptor) 102var descriptor = GeneratedCodeUtilities.IsGeneratedCode(tree, IsRegularCommentOrDocComment, cancellationToken) 197DiagnosticDescriptor descriptor, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (3)
27private static readonly DiagnosticDescriptor s_invalidScopeDescriptor = CreateDescriptor( 32private static readonly DiagnosticDescriptor s_invalidOrMissingTargetDescriptor = CreateDescriptor( 42internal static readonly DiagnosticDescriptor LegacyFormatTargetDescriptor = CreateDescriptor(
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\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (4)
43private static readonly DiagnosticDescriptor s_removeUnusedMembersRule = CreateDescriptor( 52internal static readonly DiagnosticDescriptor s_removeUnreadMembersRule = CreateDescriptor( 500var rule = !valueUsageInfo.IsWrittenTo() && !valueUsageInfo.IsNameOnly() && !symbolsReferencedInDocComments.Contains(member) 547DiagnosticDescriptor rule,
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (3)
66private static readonly DiagnosticDescriptor s_expressionValueIsUnusedRule = CreateDescriptorWithId( 75private static readonly DiagnosticDescriptor s_valueAssignedIsUnusedRule = CreateDescriptorWithId( 85private static readonly DiagnosticDescriptor s_unusedParameterRule = CreateDescriptorWithId(
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (4)
41private static readonly DiagnosticDescriptor s_descriptorSimplifyNames = CreateDescriptorWithId(IDEDiagnosticIds.SimplifyNamesDiagnosticId, 49private static readonly DiagnosticDescriptor s_descriptorSimplifyMemberAccess = CreateDescriptorWithId(IDEDiagnosticIds.SimplifyMemberAccessDiagnosticId, 56private static readonly DiagnosticDescriptor s_descriptorPreferBuiltinOrFrameworkType = CreateDescriptorWithId(IDEDiagnosticIds.PreferBuiltInOrFrameworkTypeDiagnosticId, 137DiagnosticDescriptor descriptor;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
54private static readonly DiagnosticDescriptor s_descriptor = CreateDescriptorWithId( 62private static readonly DiagnosticDescriptor s_unnecessaryCodeDescriptor = CreateDescriptorWithId(
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
31private readonly DiagnosticDescriptor _incrementDescriptor; 33private readonly DiagnosticDescriptor _decrementDescriptor;
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
44private static readonly DiagnosticDescriptor s_descriptor = CreateDescriptorWithId(
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (2)
34private static readonly DiagnosticDescriptor Rule = new( 44public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
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.UnitTestUtilities (8)
src\Features\DiagnosticsTestUtilities\CodeActions\CodeFixVerifierHelper.cs (4)
43foreach (var descriptor in analyzer.SupportedDiagnostics) 57foreach (var descriptor in analyzer.SupportedDiagnostics) 70static bool ShouldSkipMessageDescriptionVerification(DiagnosticDescriptor descriptor) 87foreach (var descriptor in analyzer.SupportedDiagnostics)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeFixVerifier`2.cs (2)
26/// <inheritdoc cref="CodeFixVerifier{TAnalyzer, TCodeFix, TTest, TVerifier}.Diagnostic(DiagnosticDescriptor)"/> 27public static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor)
src\Features\DiagnosticsTestUtilities\CodeActions\VisualBasicCodeFixVerifier`2.cs (2)
25/// <inheritdoc cref="CodeFixVerifier{TAnalyzer, TCodeFix, TTest, TVerifier}.Diagnostic(DiagnosticDescriptor)"/> 26public static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor)
Microsoft.CodeAnalysis.Compiler.Test.Resources (2)
Analyzers\DoNothingAnalyzer.cs (2)
14public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray<DiagnosticDescriptor>.Empty;
Microsoft.CodeAnalysis.CSharp (1)
Compilation\CSharpDiagnosticFilter.cs (1)
213report = DiagnosticDescriptor.MapSeverityToReport(severity);
Microsoft.CodeAnalysis.CSharp.CodeStyle (13)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
17private static readonly DiagnosticDescriptor s_diagnosticDescriptor = CreateDescriptor(
src\Analyzers\CSharp\Analyzers\MisplacedUsingDirectives\MisplacedUsingDirectivesDiagnosticAnalyzer.cs (3)
24private static readonly DiagnosticDescriptor s_outsideDiagnosticDescriptor = CreateDescriptorWithId( 33private static readonly DiagnosticDescriptor s_insideDiagnosticDescriptor = CreateDescriptorWithId( 99SyntaxNodeAnalysisContext context, DiagnosticDescriptor descriptor,
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\AbstractCSharpUseCollectionExpressionDiagnosticAnalyzer.cs (2)
24protected readonly DiagnosticDescriptor UnnecessaryCodeDescriptor; 35private static DiagnosticDescriptor CreateDescriptor(string diagnosticId, EnforceOnBuild enforceOnBuild, bool isUnnecessary)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (2)
30private static ImmutableArray<(DiagnosticDescriptor, IOption2)> GetSupportedDescriptorsWithOptions() 32var builder = new FixedSizeArrayBuilder<(DiagnosticDescriptor, IOption2)>(_helpers.Length);
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\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
67private static Diagnostic CreateDiagnostic(DiagnosticDescriptor descriptor, SyntaxNode declaration, TextSpan diagnosticSpan, NotificationOption2 notificationOption, AnalyzerOptions analyzerOptions)
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
29private static readonly DiagnosticDescriptor s_unsafeDescriptor = CreateDescriptorWithId(
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (5)
src\Analyzers\CSharp\Tests\AbstractBuiltInCodeStyleDiagnosticAnalyzer\AbstractBuiltInCodeStyleDiagnosticAnalyzerTests.cs (2)
35private static ImmutableArray<(DiagnosticDescriptor, ImmutableHashSet<IOption2>)> CreateSupportedDiagnosticsWithOptionsFromIds(IEnumerable<string> ids) 37var builder = ImmutableArray.CreateBuilder<(DiagnosticDescriptor, ImmutableHashSet<IOption2>)>();
src\Analyzers\CSharp\Tests\ConvertToRecord\ConvertToRecordCodeFixTests.cs (1)
162public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
47internal override bool ShouldSkipMessageDescriptionVerification(DiagnosticDescriptor descriptor)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryPatternParenthesesTests.cs (1)
45internal override bool ShouldSkipMessageDescriptionVerification(DiagnosticDescriptor descriptor)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (19)
CommandLineTests.cs (19)
13234var defaultReportDiagnostic = DiagnosticDescriptor.MapSeverityToReport(defaultSeverity); 13607private void TestAnalyzerConfigRespectedCore(DiagnosticAnalyzer analyzer, DiagnosticDescriptor descriptor, ReportDiagnostic analyzerConfigSeverity, bool noWarn, bool errorlog, bool customConfigurable) 13623analyzerConfigSeverity = DiagnosticDescriptor.MapSeverityToReport(descriptor.DefaultSeverity); 13842var severityString = DiagnosticDescriptor.MapSeverityToReport(severityInConfigFile.Value).ToAnalyzerConfigString(); 14842private static readonly DiagnosticDescriptor _rule = new DiagnosticDescriptor("Id", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 14844public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_rule); 15734public abstract override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 15746internal static readonly DiagnosticDescriptor Hidden01 = new DiagnosticDescriptor("Hidden01", "", "Throwing a diagnostic for #region", "", DiagnosticSeverity.Hidden, isEnabledByDefault: true); 15747internal static readonly DiagnosticDescriptor Hidden02 = new DiagnosticDescriptor("Hidden02", "", "Throwing a diagnostic for something else", "", DiagnosticSeverity.Hidden, isEnabledByDefault: true); 15749public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 15771internal static readonly DiagnosticDescriptor Info01 = new DiagnosticDescriptor("Info01", "", "Throwing a diagnostic for #pragma restore", "", DiagnosticSeverity.Info, isEnabledByDefault: true); 15773public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 15798internal static readonly DiagnosticDescriptor Warning01 = new DiagnosticDescriptor("Warning01", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault: true); 15800public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 15821internal static readonly DiagnosticDescriptor Warning02 = new DiagnosticDescriptor("Warning02", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault: true, helpLinkUri: "https://example.org/analyzer"); 15823public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Warning02); 15839internal static readonly DiagnosticDescriptor Error01 = new DiagnosticDescriptor("Error01", "", "Throwing a diagnostic for #pragma disable", "", DiagnosticSeverity.Error, isEnabledByDefault: true); 15840internal static readonly DiagnosticDescriptor Error02 = new DiagnosticDescriptor("Error02", "", "Throwing a diagnostic for something else", "", DiagnosticSeverity.Error, isEnabledByDefault: true); 15842public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (17)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (11)
216private static readonly DiagnosticDescriptor s_syntaxDiagnosticDescriptor = 219public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 288public static DiagnosticDescriptor Descriptor = DescriptorFactory.CreateSimpleDescriptor("DummyDiagnostic"); 290public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 346public static DiagnosticDescriptor Descriptor = DescriptorFactory.CreateSimpleDescriptor("DummyDiagnostic"); 348public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 864private static ImmutableArray<DiagnosticDescriptor> CreateSupportedDiagnostics(string analyzerName, string[] reportedIds) 866var builder = ArrayBuilder<DiagnosticDescriptor>.GetInstance(reportedIds.Length); 869var descriptor = new DiagnosticDescriptor(id, "Title", messageFormat: analyzerName, "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 877public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 884foreach (var descriptor in SupportedDiagnostics)
Diagnostics\FixAllProvider\BatchFixerTests.cs (2)
34public static readonly DiagnosticDescriptor Descriptor = DescriptorFactory.CreateSimpleDescriptor("QualifyWithThis"); 36public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Diagnostics\MockDiagnosticAnalyzerTests.cs (2)
23private readonly DiagnosticDescriptor _descriptor = new DiagnosticDescriptor(Id, "MockDiagnostic", "MockDiagnostic", "InternalCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true, helpLinkUri: "https://github.com/dotnet/roslyn"); 25public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (2)
133var descriptor = new DiagnosticDescriptor(id: id, title: "", messageFormat: "", category: "Naming", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: false); 332var descriptor = new DiagnosticDescriptor(id: id, title: "", messageFormat: "", category: "Naming", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: false);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (111)
Diagnostics\DiagnosticAnalyzerTests.cs (53)
37private static readonly DiagnosticDescriptor s_CA9999_UseOfVariableThatStartsWithX = 40public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 234private static readonly DiagnosticDescriptor s_descriptor = new DiagnosticDescriptor("XX0001", "My Syntax/Symbol Diagnostic", "My Syntax/Symbol Diagnostic for '{0}'", "Compiler", DiagnosticSeverity.Warning, isEnabledByDefault: true); 235public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 303var noneDiagDescriptor = new DiagnosticDescriptor("XX0001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Hidden, isEnabledByDefault: true); 304var infoDiagDescriptor = new DiagnosticDescriptor("XX0002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Info, isEnabledByDefault: true); 305var warningDiagDescriptor = new DiagnosticDescriptor("XX0003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true); 306var errorDiagDescriptor = new DiagnosticDescriptor("XX0004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Error, isEnabledByDefault: true); 387var noneDiagDescriptor = new DiagnosticDescriptor("XX0001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Hidden, isEnabledByDefault: true); 388var infoDiagDescriptor = new DiagnosticDescriptor("XX0002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Info, isEnabledByDefault: true); 389var warningDiagDescriptor = new DiagnosticDescriptor("XX0003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true); 390var errorDiagDescriptor = new DiagnosticDescriptor("XX0004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Error, isEnabledByDefault: true); 442var disabledDiagDescriptor = new DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false); 443var enabledDiagDescriptor = new DiagnosticDescriptor("XX002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true); 471public static DiagnosticDescriptor desc1 = new DiagnosticDescriptor("XX001", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false); 472public static DiagnosticDescriptor desc2 = new DiagnosticDescriptor("XX002", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false); 473public static DiagnosticDescriptor desc3 = new DiagnosticDescriptor("XX003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false, customTags: WellKnownDiagnosticTags.NotConfigurable); 475public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 487public static DiagnosticDescriptor desc1 = new DiagnosticDescriptor("XX003", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false); 488public static DiagnosticDescriptor desc2 = new DiagnosticDescriptor("XX004", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true); 490public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 502public static DiagnosticDescriptor desc1 = new DiagnosticDescriptor("DummyId", "DummyDescription", "DummyMessage", "DummyCategory", DiagnosticSeverity.Warning, isEnabledByDefault: false); 504public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 656internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true); 658public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } } 717foreach (var descriptor in analyzer.SupportedDiagnostics) 749public static DiagnosticDescriptor Descriptor1 = DescriptorFactory.CreateSimpleDescriptor("CodeBlockDiagnostic"); 750public static DiagnosticDescriptor Descriptor2 = DescriptorFactory.CreateSimpleDescriptor("EqualsValueDiagnostic"); 751public static DiagnosticDescriptor Descriptor3 = DescriptorFactory.CreateSimpleDescriptor("ConstructorInitializerDiagnostic"); 752public static DiagnosticDescriptor Descriptor4 = DescriptorFactory.CreateSimpleDescriptor("PropertyExpressionBodyDiagnostic"); 753public static DiagnosticDescriptor Descriptor5 = DescriptorFactory.CreateSimpleDescriptor("IndexerExpressionBodyDiagnostic"); 754public static DiagnosticDescriptor Descriptor6 = DescriptorFactory.CreateSimpleDescriptor("MethodExpressionBodyDiagnostic"); 761public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 807var descriptor = (DiagnosticDescriptor)null; 829public static DiagnosticDescriptor Descriptor1 = new DiagnosticDescriptor("MethodSymbolDiagnostic", "MethodSymbolDiagnostic", "{0}", "MethodSymbolDiagnostic", DiagnosticSeverity.Warning, isEnabledByDefault: true); 831public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 872public static readonly DiagnosticDescriptor SupportedDescriptor = 875public static readonly DiagnosticDescriptor UnsupportedDescriptor = 880public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 1284var descriptor = new DiagnosticDescriptor(id: "Test0001", title: "Test0001", messageFormat: "Test0001", category: "Test0001", defaultSeverity: defaultSeverity, isEnabledByDefault: isEnabledByDefault); 1635public static readonly DiagnosticDescriptor ExpressionDescriptor = new DiagnosticDescriptor( 1643public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 1868private static void AddExpectedNonLocalDiagnostic(ArrayBuilder<DiagnosticDescription> builder, DiagnosticDescriptor descriptor, params string[] arguments) 2283public static readonly DiagnosticDescriptor Warning = new DiagnosticDescriptor( 2291public static readonly DiagnosticDescriptor Summary = new DiagnosticDescriptor( 2306public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Warning, Summary); 3841internal static DiagnosticDescriptor Rule = new(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true); 3843public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } } 4075internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true); 4077public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } } 4114internal static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true); 4122public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } }
Diagnostics\DiagnosticSuppressorTests.cs (1)
361value: DiagnosticDescriptor.MapSeverityToReport(effectiveSeverity));
Diagnostics\GetDiagnosticsTests.cs (5)
931public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 939public static readonly DiagnosticDescriptor DescriptorForBlockEnd = new DiagnosticDescriptor( 952public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor, DescriptorForBlockEnd); 1712public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor("ID0001", "Title", "Message", "Category", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true); 1714public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor);
Semantics\OutVarTests.cs (2)
18798private static readonly DiagnosticDescriptor Descriptor = 18801public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Semantics\PrimaryConstructorTests.cs (32)
3746private static readonly DiagnosticDescriptor Descriptor = 3749public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 4071private static readonly DiagnosticDescriptor Descriptor = 4074public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 4157private static readonly DiagnosticDescriptor Descriptor = 4160public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 4306private static readonly DiagnosticDescriptor Descriptor = 4309public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 4496private static readonly DiagnosticDescriptor Descriptor = 4499public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 4630private static readonly DiagnosticDescriptor Descriptor = 4633public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 4810private static readonly DiagnosticDescriptor Descriptor = 4813public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 4955private static readonly DiagnosticDescriptor Descriptor = 4958public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 5134private static readonly DiagnosticDescriptor Descriptor = 5137public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 5247private static readonly DiagnosticDescriptor Descriptor = 5250public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 5474private static readonly DiagnosticDescriptor Descriptor = 5477public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 5561private static readonly DiagnosticDescriptor Descriptor = 5564public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 5674private static readonly DiagnosticDescriptor Descriptor = 5677public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 5771private static readonly DiagnosticDescriptor Descriptor = 5774public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 5829private static readonly DiagnosticDescriptor Descriptor = 5832public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 5922private static readonly DiagnosticDescriptor Descriptor = 5925public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Semantics\RecordTests.cs (18)
26186private static readonly DiagnosticDescriptor Descriptor = 26189public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 26509private static readonly DiagnosticDescriptor Descriptor = 26512public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 26604private static readonly DiagnosticDescriptor Descriptor = 26607public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 26769private static readonly DiagnosticDescriptor Descriptor = 26772public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 26959private static readonly DiagnosticDescriptor Descriptor = 26962public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 27093private static readonly DiagnosticDescriptor Descriptor = 27096public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 27273private static readonly DiagnosticDescriptor Descriptor = 27276public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 27418private static readonly DiagnosticDescriptor Descriptor = 27421public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 27601private static readonly DiagnosticDescriptor Descriptor = 27604public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Microsoft.CodeAnalysis.CSharp.Features (15)
Diagnostics\Analyzers\CSharpUnboundIdentifiersDiagnosticAnalyzer.cs (1)
25protected override DiagnosticDescriptor DiagnosticDescriptor
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (1)
146private static QuickInfoItem CreateQuickInfo(TextSpan location, DiagnosticDescriptor descriptor,
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
17private static readonly DiagnosticDescriptor s_diagnosticDescriptor = CreateDescriptor(
src\Analyzers\CSharp\Analyzers\MisplacedUsingDirectives\MisplacedUsingDirectivesDiagnosticAnalyzer.cs (3)
24private static readonly DiagnosticDescriptor s_outsideDiagnosticDescriptor = CreateDescriptorWithId( 33private static readonly DiagnosticDescriptor s_insideDiagnosticDescriptor = CreateDescriptorWithId( 99SyntaxNodeAnalysisContext context, DiagnosticDescriptor descriptor,
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\AbstractCSharpUseCollectionExpressionDiagnosticAnalyzer.cs (2)
24protected readonly DiagnosticDescriptor UnnecessaryCodeDescriptor; 35private static DiagnosticDescriptor CreateDescriptor(string diagnosticId, EnforceOnBuild enforceOnBuild, bool isUnnecessary)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\UseExpressionBodyDiagnosticAnalyzer.cs (2)
30private static ImmutableArray<(DiagnosticDescriptor, IOption2)> GetSupportedDescriptorsWithOptions() 32var builder = new FixedSizeArrayBuilder<(DiagnosticDescriptor, IOption2)>(_helpers.Length);
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\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
67private static Diagnostic CreateDiagnostic(DiagnosticDescriptor descriptor, SyntaxNode declaration, TextSpan diagnosticSpan, NotificationOption2 notificationOption, AnalyzerOptions analyzerOptions)
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsDiagnosticAnalyzer.cs (1)
29private static readonly DiagnosticDescriptor s_unsafeDescriptor = CreateDescriptorWithId(
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (39)
ConvertToRecord\ConvertToRecordCodeRefactoringTests.cs (1)
4752public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Diagnostics\Configuration\ConfigureSeverity\AllAnalyzersSeverityConfigurationTests.cs (2)
25private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
Diagnostics\Configuration\ConfigureSeverity\CategoryBasedSeverityConfigurationTests.cs (2)
25private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.cs (2)
25private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor( 33public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule);
Diagnostics\Suppression\RemoveSuppressionTests.cs (2)
29public static readonly DiagnosticDescriptor Decsciptor = 32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (8)
56public static readonly DiagnosticDescriptor Descriptor0168 = 58public static readonly DiagnosticDescriptor Descriptor0219 = 61public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor0168, Descriptor0219); 103var rule = !isAssigned ? Descriptor0168 : Descriptor0219; 113public static readonly DiagnosticDescriptor Descriptor = 116public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1297public static readonly DiagnosticDescriptor Descriptor = 1300public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor);
Diagnostics\Suppression\SuppressionTest_FixMultipleTests.cs (3)
38public static readonly DiagnosticDescriptor Decsciptor1 = 40public static readonly DiagnosticDescriptor Decsciptor2 = 43public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Decsciptor1, Decsciptor2);
Diagnostics\Suppression\SuppressionTests.cs (14)
692public static readonly DiagnosticDescriptor Decsciptor = 695public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 802private readonly DiagnosticDescriptor _descriptor = 805public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 865private readonly DiagnosticDescriptor _descriptor = 868public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 915public static readonly DiagnosticDescriptor Decsciptor = 918public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 1056public static readonly DiagnosticDescriptor Descriptor = 1059public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 2056private readonly DiagnosticDescriptor _descriptor = 2059public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor); 2451public static readonly DiagnosticDescriptor Descriptor = 2454public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
src\Analyzers\CSharp\Tests\AbstractBuiltInCodeStyleDiagnosticAnalyzer\AbstractBuiltInCodeStyleDiagnosticAnalyzerTests.cs (2)
35private static ImmutableArray<(DiagnosticDescriptor, ImmutableHashSet<IOption2>)> CreateSupportedDiagnosticsWithOptionsFromIds(IEnumerable<string> ids) 37var builder = ImmutableArray.CreateBuilder<(DiagnosticDescriptor, ImmutableHashSet<IOption2>)>();
src\Analyzers\CSharp\Tests\ConvertToRecord\ConvertToRecordCodeFixTests.cs (1)
162public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
47internal override bool ShouldSkipMessageDescriptionVerification(DiagnosticDescriptor descriptor)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryPatternParenthesesTests.cs (1)
45internal override bool ShouldSkipMessageDescriptionVerification(DiagnosticDescriptor descriptor)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (53)
Semantics\ColorColorTests.cs (2)
1770private static readonly DiagnosticDescriptor Descriptor = 1773public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Semantics\RecordStructTests.cs (16)
5946private static readonly DiagnosticDescriptor Descriptor = 5949public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6175private static readonly DiagnosticDescriptor Descriptor = 6178public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6271private static readonly DiagnosticDescriptor Descriptor = 6274public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6400private static readonly DiagnosticDescriptor Descriptor = 6403public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6497private static readonly DiagnosticDescriptor Descriptor = 6500public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6555private static readonly DiagnosticDescriptor Descriptor = 6558public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6648private static readonly DiagnosticDescriptor Descriptor = 6651public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6809private static readonly DiagnosticDescriptor Descriptor = 6812public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Semantics\TopLevelStatementsTests.cs (26)
6423private static readonly DiagnosticDescriptor Descriptor = 6426public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6522private static readonly DiagnosticDescriptor Descriptor = 6525public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6597private static readonly DiagnosticDescriptor Descriptor = 6600public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6706private static readonly DiagnosticDescriptor Descriptor = 6709public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6787private static readonly DiagnosticDescriptor Descriptor = 6790public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6845private static readonly DiagnosticDescriptor Descriptor = 6848public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6903private static readonly DiagnosticDescriptor Descriptor = 6906public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 6971private static readonly DiagnosticDescriptor Descriptor = 6974public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 7051private static readonly DiagnosticDescriptor Descriptor = 7054public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 7167private static readonly DiagnosticDescriptor Descriptor = 7170public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 7261private static readonly DiagnosticDescriptor Descriptor = 7264public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 7333private static readonly DiagnosticDescriptor Descriptor = 7336public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 7400private static readonly DiagnosticDescriptor Descriptor = 7403public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
SourceGeneration\GeneratorDriverTests.cs (9)
177private static readonly DiagnosticDescriptor Descriptor = 180public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 433DiagnosticDescriptor generatorDiagnostic = new DiagnosticDescriptor("TG001", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description); 662DiagnosticDescriptor generatorDiagnostic1 = new DiagnosticDescriptor("TG001", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description); 663DiagnosticDescriptor generatorDiagnostic2 = new DiagnosticDescriptor("TG002", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description); 664DiagnosticDescriptor generatorDiagnostic3 = new DiagnosticDescriptor("TG003", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description); 709DiagnosticDescriptor generatorDiagnostic1 = new DiagnosticDescriptor("TG001", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description); 710DiagnosticDescriptor generatorDiagnostic2 = new DiagnosticDescriptor("TG002", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description); 711DiagnosticDescriptor generatorDiagnostic3 = new DiagnosticDescriptor("TG003", "Test Diagnostic", description, "Generators", DiagnosticSeverity.Warning, isEnabledByDefault: true, description: description);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (7)
Symbols\Source\NullablePublicAPITests.cs (7)
1155public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor1, s_descriptor2); 1157private static readonly DiagnosticDescriptor s_descriptor1 = new DiagnosticDescriptor(id: "CA9999_NullabilityPrinter", title: "CA9999_NullabilityPrinter", messageFormat: "Nullability of '{0}' is '{1}':'{2}'. Speculative flow state is '{3}'", category: "Test", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true); 1158private static readonly DiagnosticDescriptor s_descriptor2 = new DiagnosticDescriptor(id: "CA9998_NullabilityPrinter", title: "CA9998_NullabilityPrinter", messageFormat: "Declared nullability of '{0}' is '{1}'", category: "Test", defaultSeverity: DiagnosticSeverity.Warning, isEnabledByDefault: true); 1778private static readonly DiagnosticDescriptor Descriptor = 1781public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 4834private static readonly DiagnosticDescriptor Descriptor = 4837public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
MockCSharpCompiler.cs (2)
24internal ImmutableArray<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)> DescriptorsWithInfo; 102protected override void AddAnalyzerDescriptorsAndExecutionTime(ErrorLogger errorLogger, ImmutableArray<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)> descriptorsWithInfo, double totalAnalyzerExecutionTime)
Microsoft.CodeAnalysis.EditorFeatures (2)
EditorConfigSettings\Data\AnalyzerSetting.cs (2)
16private readonly DiagnosticDescriptor _descriptor; 19public AnalyzerSetting(DiagnosticDescriptor descriptor,
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Workspaces\NoCompilationDocumentDiagnosticAnalyzer.cs (2)
19public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 22public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (33)
CodeFixes\CodeFixServiceTests.cs (11)
519private static ImmutableArray<DiagnosticDescriptor> CreateSupportedDiagnostics(ImmutableArray<(string id, string category)> reportedDiagnosticIdsWithCategories) 521var builder = ArrayBuilder<DiagnosticDescriptor>.GetInstance(); 524var descriptor = new DiagnosticDescriptor(diagnosticId, "MockDiagnostic", "MockDiagnostic", category, DiagnosticSeverity.Warning, isEnabledByDefault: true); 553public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 561foreach (var descriptor in SupportedDiagnostics) 586public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 605private readonly DiagnosticDescriptor s_descriptor = new(MockFixer.Id, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 911private readonly DiagnosticDescriptor _descriptor = new(DiagnosticId, "AdditionalFileAnalyzer", "AdditionalFileAnalyzer", "AdditionalFileAnalyzer", DiagnosticSeverity.Warning, isEnabledByDefault: true); 913public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor); 1171public static readonly DiagnosticDescriptor Descriptor = new("ID0001", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 1179public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (20)
915internal static readonly DiagnosticDescriptor s_syntaxRule = new DiagnosticDescriptor("syntax", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 916internal static readonly DiagnosticDescriptor s_semanticRule = new DiagnosticDescriptor("semantic", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 917internal static readonly DiagnosticDescriptor s_compilationRule = new DiagnosticDescriptor("compilation", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 919public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_syntaxRule, s_semanticRule, s_compilationRule); 931internal static readonly DiagnosticDescriptor s_syntaxRule = new DiagnosticDescriptor("syntax", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: false); 932internal static readonly DiagnosticDescriptor s_semanticRule = new DiagnosticDescriptor("semantic", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: false); 933internal static readonly DiagnosticDescriptor s_compilationRule = new DiagnosticDescriptor("compilation", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: false); 935public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_syntaxRule, s_semanticRule, s_compilationRule); 947internal static readonly DiagnosticDescriptor s_syntaxRule = new DiagnosticDescriptor("syntax", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 949public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_syntaxRule); 989public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray<DiagnosticDescriptor>.Empty; 1002public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray<DiagnosticDescriptor>.Empty; 1009internal static readonly DiagnosticDescriptor s_syntaxRule = new DiagnosticDescriptor("leak", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 1011public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_syntaxRule); 1025private static readonly DiagnosticDescriptor s_rule = new DiagnosticDescriptor("project", "test", "test", "test", DiagnosticSeverity.Error, isEnabledByDefault: true); 1026public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_rule); 1034private readonly ImmutableArray<DiagnosticDescriptor> _supportedDiagnostics; 1039public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => _supportedDiagnostics;
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (1)
35foreach (var descriptor in analyzer.SupportedDiagnostics)
EditAndContinue\EditAndContinueLanguageServiceTests.cs (1)
157var diagnosticDescriptor1 = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.ErrorReadingFile);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Suggestions\SuggestedActionPriorityProvider.cs (1)
34foreach (var supportedDiagnostic in analyzer.SupportedDiagnostics)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (45)
CodeFixes\CodeFixServiceTests.vb (4)
175Public ReadOnly Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("TEST1111", 182Public Overrides ReadOnly Property DiagDescriptor As DiagnosticDescriptor 192Public MustOverride ReadOnly Property DiagDescriptor As DiagnosticDescriptor 194Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor)
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
70Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor)
Diagnostics\DiagnosticServiceTests.vb (40)
1250Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1369Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1443Public Shared Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("CompilationAnalyzerWithAnalyzerOptionsDiagnostic", 1449Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1472Public Shared ReadOnly Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("XX0000", 1479Public Overrides ReadOnly Property DiagDescriptor As DiagnosticDescriptor 1513Public ReadOnly Descriptor As DiagnosticDescriptor 1525Public Overrides ReadOnly Property DiagDescriptor As DiagnosticDescriptor 1535Public MustOverride ReadOnly Property DiagDescriptor As DiagnosticDescriptor 1537Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1560Public Shared ReadOnly DiagDescriptor As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("DummyDiagnostic") 1562Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1588Public Shared ReadOnly DiagDescriptor As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("DummyDiagnostic") 1589Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1612Public Shared ReadOnly DiagDescriptor As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("DummyDiagnostic") 1614Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1631Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1655Public Shared Descriptor As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("DummyDiagnostic") 1657Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1683Public Shared Descriptor As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("DummyDiagnostic") 1685Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1709Public Shared Descriptor As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("DummyDiagnostic") 1711Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1735Public Shared Descriptor As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("CompilationEndedAnalyzerDiagnostic") 1737Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1758Public Shared Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("StatefulCompilationAnalyzerDiagnostic", 1765Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1799Public Shared Descriptor1 As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("CodeBlockDiagnostic") 1800Public Shared Descriptor2 As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("EqualsValueDiagnostic") 1801Public Shared Descriptor3 As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("ConstructorInitializerDiagnostic") 1802Public Shared Descriptor4 As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("PropertyExpressionBodyDiagnostic") 1803Public Shared Descriptor5 As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("IndexerExpressionBodyDiagnostic") 1804Public Shared Descriptor6 As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("MethodExpressionBodyDiagnostic") 1810Public Overrides ReadOnly Property SupportedDiagnostics() As ImmutableArray(Of DiagnosticDescriptor) 1846Dim descriptor As DiagnosticDescriptor 1871Public Shared Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("MethodSymbolDiagnostic", 1878Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 2394Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 2496Public Shared s_descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("ID0001", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 2510Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
EvaluationContextBase.cs (1)
116public override DiagnosticDescriptor Descriptor
Microsoft.CodeAnalysis.ExternalAccess.FSharp (16)
Diagnostics\IFSharpSimplifyNameDiagnosticAnalyzer.cs (1)
15Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(DiagnosticDescriptor descriptor, Document document, CancellationToken cancellationToken);
Diagnostics\IFSharpUnusedDeclarationsDiagnosticAnalyzer.cs (1)
15Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(DiagnosticDescriptor descriptor, Document document, CancellationToken cancellationToken);
Diagnostics\IFSharpUnusedOpensDiagnosticAnalyzer.cs (1)
15Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(DiagnosticDescriptor descriptor, Document document, CancellationToken cancellationToken);
Internal\Diagnostics\FSharpDocumentDiagnosticAnalyzer.cs (4)
49private readonly ImmutableArray<DiagnosticDescriptor> _supportedDiagnostics; 56public static ImmutableArray<DiagnosticDescriptor> CreateSupportedDiagnostics() 59var dummyDescriptors = ImmutableArray.CreateBuilder<DiagnosticDescriptor>(); 71public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => _supportedDiagnostics;
Internal\Diagnostics\FSharpSimplifyNameDiagnosticAnalyzer.cs (3)
35public Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(DiagnosticDescriptor descriptor, Document document, CancellationToken cancellationToken) 44private readonly DiagnosticDescriptor _descriptor = 51public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor);
Internal\Diagnostics\FSharpUnusedDeclarationsAnalyzer.cs (3)
35public Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(DiagnosticDescriptor descriptor, Document document, CancellationToken cancellationToken) 46private readonly DiagnosticDescriptor _descriptor = 53public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor);
Internal\Diagnostics\FSharpUnusedOpensDiagnosticAnalyzer.cs (3)
32public Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(DiagnosticDescriptor descriptor, Document document, CancellationToken cancellationToken) 41private readonly DiagnosticDescriptor _descriptor = 48public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor);
Microsoft.CodeAnalysis.Features (90)
CodeFixesAndRefactorings\CodeActionRequestPriorityProvider.cs (1)
130foreach (var supportedDiagnostic in analyzer.SupportedDiagnostics)
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (3)
29protected abstract DiagnosticDescriptor DiagnosticDescriptor { get; } 37public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 48protected static DiagnosticDescriptor GetDiagnosticDescriptor(string id, LocalizableString messageFormat)
Diagnostics\DiagnosticAnalyzerExtensions.cs (1)
27public static ReportDiagnostic GetEffectiveSeverity(this DiagnosticDescriptor descriptor, CompilationOptions options)
EditAndContinue\DebuggingSession.cs (2)
278var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.ErrorReadingFile); 420var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.ErrorReadingFile);
EditAndContinue\EditAndContinueDiagnosticDescriptors.cs (8)
24private static readonly ImmutableArray<DiagnosticDescriptor> s_descriptors; 27private static Dictionary<ManagedHotReloadAvailabilityStatus, DiagnosticDescriptor> s_lazyModuleDiagnosticDescriptors; 38var builder = ImmutableArray.CreateBuilder<DiagnosticDescriptor>(); 176internal static ImmutableArray<DiagnosticDescriptor> GetDescriptors() 179internal static DiagnosticDescriptor GetDescriptor(RudeEditKind kind) 182internal static DiagnosticDescriptor GetDescriptor(EditAndContinueErrorCode errorCode) 185internal static DiagnosticDescriptor GetModuleDiagnosticDescriptor(ManagedHotReloadAvailabilityStatus status) 191if (!s_lazyModuleDiagnosticDescriptors.TryGetValue(status, out var descriptor))
EditAndContinue\EditSession.cs (3)
139var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.AddingTypeRuntimeCapabilityRequired); 166var descriptor = EditAndContinueDiagnosticDescriptors.GetModuleDiagnosticDescriptor(availability.Status); 544var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor((oldDocumentState == CommittedSolution.DocumentState.Indeterminate) ?
EditAndContinue\Remote\RemoteDebuggingSessionProxy.cs (1)
97var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(RudeEditKind.InternalError);
EditAndContinue\RudeEditDiagnostic.cs (1)
43var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(Kind);
ExternalAccess\VSTypeScript\VSTypeScriptDocumentDiagnosticAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => [];
ExternalAccess\VSTypeScript\VSTypeScriptProjectDiagnosticAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => [];
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer.cs (2)
83protected AbstractBuiltInCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, IOption2 Option)> supportedDiagnosticsWithOptions) 96protected AbstractBuiltInCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, ImmutableHashSet<IOption2> Options)> supportedDiagnosticsWithOptions)
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\Analyzers\Core\Analyzers\AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer.cs (6)
88protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<DiagnosticDescriptor> descriptors, PerLanguageOption2<bool> fadingOption) 91foreach (var descriptor in descriptors) 103protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, IOption2 Option)> supportedDiagnosticsWithOptions, PerLanguageOption2<bool>? fadingOption) 112protected AbstractBuiltInUnnecessaryCodeStyleDiagnosticAnalyzer(ImmutableArray<(DiagnosticDescriptor Descriptor, ImmutableHashSet<IOption2> Options)> supportedDiagnosticsWithOptions, PerLanguageOption2<bool>? fadingOption) 126private static void AddDescriptorsToFadingOptionMapping(IEnumerable<DiagnosticDescriptor> descriptors, PerLanguageOption2<bool>? fadingOption) 130foreach (var descriptor in descriptors)
src\Analyzers\Core\Analyzers\AbstractCodeQualityDiagnosticAnalyzer.cs (3)
17ImmutableArray<DiagnosticDescriptor> descriptors, 25public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 39protected static DiagnosticDescriptor CreateDescriptor(
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (3)
15private static readonly DiagnosticDescriptor s_invalidHeaderDescriptor = CreateDescriptorForFileHeader(s_invalidHeaderTitle, s_invalidHeaderMessage); 19private static readonly DiagnosticDescriptor s_missingHeaderDescriptor = CreateDescriptorForFileHeader(s_missingHeaderTitle, s_missingHeaderMessage); 21private static DiagnosticDescriptor CreateDescriptorForFileHeader(LocalizableString title, LocalizableString message)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (13)
24/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 41DiagnosticDescriptor descriptor, 56private static LocalizableString CreateMessage(DiagnosticDescriptor descriptor, object[] messageArgs) 71/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 89DiagnosticDescriptor descriptor, 108DiagnosticDescriptor descriptor, 135/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 157DiagnosticDescriptor descriptor, 178DiagnosticDescriptor descriptor, 204DiagnosticDescriptor descriptor, 239/// <param name="descriptor">A <see cref="DiagnosticDescriptor"/> describing the diagnostic.</param> 256DiagnosticDescriptor descriptor, 287static IEnumerable<string> GetEffectiveCustomTags(DiagnosticDescriptor descriptor, NotificationOption2 notificationOption, AnalyzerOptions analyzerOptions)
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), FadingOptions.FadeOutUnusedImports) 56private static ImmutableArray<DiagnosticDescriptor> GetDescriptors(LocalizableString titleAndMessage, out DiagnosticDescriptor classificationIdDescriptor, out DiagnosticDescriptor generatedCodeClassificationIdDescriptor) 102var descriptor = GeneratedCodeUtilities.IsGeneratedCode(tree, IsRegularCommentOrDocComment, cancellationToken) 197DiagnosticDescriptor descriptor, CancellationToken cancellationToken)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (3)
27private static readonly DiagnosticDescriptor s_invalidScopeDescriptor = CreateDescriptor( 32private static readonly DiagnosticDescriptor s_invalidOrMissingTargetDescriptor = CreateDescriptor( 42internal static readonly DiagnosticDescriptor LegacyFormatTargetDescriptor = CreateDescriptor(
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\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (4)
43private static readonly DiagnosticDescriptor s_removeUnusedMembersRule = CreateDescriptor( 52internal static readonly DiagnosticDescriptor s_removeUnreadMembersRule = CreateDescriptor( 500var rule = !valueUsageInfo.IsWrittenTo() && !valueUsageInfo.IsNameOnly() && !symbolsReferencedInDocComments.Contains(member) 547DiagnosticDescriptor rule,
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (3)
66private static readonly DiagnosticDescriptor s_expressionValueIsUnusedRule = CreateDescriptorWithId( 75private static readonly DiagnosticDescriptor s_valueAssignedIsUnusedRule = CreateDescriptorWithId( 85private static readonly DiagnosticDescriptor s_unusedParameterRule = CreateDescriptorWithId(
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (4)
41private static readonly DiagnosticDescriptor s_descriptorSimplifyNames = CreateDescriptorWithId(IDEDiagnosticIds.SimplifyNamesDiagnosticId, 49private static readonly DiagnosticDescriptor s_descriptorSimplifyMemberAccess = CreateDescriptorWithId(IDEDiagnosticIds.SimplifyMemberAccessDiagnosticId, 56private static readonly DiagnosticDescriptor s_descriptorPreferBuiltinOrFrameworkType = CreateDescriptorWithId(IDEDiagnosticIds.PreferBuiltInOrFrameworkTypeDiagnosticId, 137DiagnosticDescriptor descriptor;
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (2)
54private static readonly DiagnosticDescriptor s_descriptor = CreateDescriptorWithId( 62private static readonly DiagnosticDescriptor s_unnecessaryCodeDescriptor = CreateDescriptorWithId(
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
31private readonly DiagnosticDescriptor _incrementDescriptor; 33private readonly DiagnosticDescriptor _decrementDescriptor;
src\Analyzers\Core\Analyzers\UseObjectInitializer\AbstractUseObjectInitializerDiagnosticAnalyzer.cs (1)
44private static readonly DiagnosticDescriptor s_descriptor = CreateDescriptorWithId(
src\Analyzers\Core\Analyzers\ValidateFormatString\AbstractValidateFormatStringDiagnosticAnalyzer.cs (2)
34private static readonly DiagnosticDescriptor Rule = new( 44public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\RudeEditDiagnosticDescription.cs (1)
68var descriptior = EditAndContinueDiagnosticDescriptors.GetDescriptor(RudeEditKind);
Microsoft.CodeAnalysis.Features.UnitTests (3)
EditAndContinue\EditAndContinueDiagnosticDescriptorsTests.cs (1)
20var d = EditAndContinueDiagnosticDescriptors.GetDescriptor(RudeEditKind.ActiveStatementUpdate);
EditAndContinue\RemoteEditAndContinueServiceTests.cs (2)
120var diagnosticDescriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.AddingTypeRuntimeCapabilityRequired); 174var diagnosticDescriptor1 = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.ErrorReadingFile);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
63var descriptor = new DiagnosticDescriptor(AnalyzerExceptionDiagnosticId,
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (17)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (2)
374public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 377public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor);
Diagnostics\AdditionalFileDiagnosticsTests.cs (2)
126private readonly DiagnosticDescriptor _descriptor = new(Id, "MockAdditionalDiagnostic", "MockAdditionalDiagnostic", "InternalCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true, helpLinkUri: "https://github.com/dotnet/roslyn"); 128public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Diagnostics\BuildOnlyDiagnosticIdsHandlerTests.cs (4)
92private static readonly DiagnosticDescriptor s_descriptor = new(Id, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true, customTags: [WellKnownDiagnosticTags.CompilationEnd]); 93public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 104private static readonly DiagnosticDescriptor s_descriptor = new(Id, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 105public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor);
Diagnostics\NonLocalDiagnosticTests.cs (3)
78public static readonly DiagnosticDescriptor NonLocalDescriptor = new("NonLocal0001", "Title1", "NonLocal0001", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 79public static readonly DiagnosticDescriptor CompilationEndDescriptor = new("NonLocal0002", "Title2", "NonLocal0002", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true, customTags: [WellKnownDiagnosticTags.CompilationEnd]); 80public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(NonLocalDescriptor, CompilationEndDescriptor);
Diagnostics\PullDiagnosticTests.cs (4)
130private readonly DiagnosticDescriptor _descriptor = new(RuleId, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 132public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor); 144private readonly DiagnosticDescriptor _descriptor = new(RuleId, "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 146public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor);
Diagnostics\WorkspaceProjectDiagnosticsTests.cs (2)
75private readonly DiagnosticDescriptor _descriptor = new(Id, "MockProjectDiagnostic", "MockProjectDiagnostic", "InternalCategory", DiagnosticSeverity.Warning, isEnabledByDefault: true, helpLinkUri: "https://github.com/dotnet/roslyn"); 77public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
DeterministicKeyBuilderTests.Helpers.cs (2)
32public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => throw new NotImplementedException(); 39public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => throw new NotImplementedException();
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\EditAndContinue\RemoteEditAndContinueService.cs (1)
169var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(EditAndContinueErrorCode.CannotApplyChangesUnexpectedError);
Microsoft.CodeAnalysis.Remote.Workspaces (1)
EditAndContinue\ManagedHotReloadLanguageService.cs (1)
261var descriptor = EditAndContinueDiagnosticDescriptors.GetDescriptor(RudeEditKind.InternalError);
Microsoft.CodeAnalysis.Test.Utilities (271)
Compilation\DiagnosticBagErrorLogger.cs (1)
24public override void AddAnalyzerDescriptorsAndExecutionTime(ImmutableArray<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)> descriptors, double totalAnalyzerExecutionTime)
Compilation\NullErrorLogger.cs (1)
18public override void AddAnalyzerDescriptorsAndExecutionTime(ImmutableArray<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)> descriptors, double totalAnalyzerExecutionTime)
Diagnostics\BoxingOperationAnalyzer.cs (2)
24public static readonly DiagnosticDescriptor BoxingDescriptor = new DiagnosticDescriptor( 33public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Diagnostics\CommonDiagnosticAnalyzers.cs (110)
31public static readonly DiagnosticDescriptor Descriptor1 = new DiagnosticDescriptor( 42public static readonly DiagnosticDescriptor Descriptor2 = new DiagnosticDescriptor( 56public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 445ImmutableArray<(DiagnosticDescriptor Descriptor, DiagnosticDescriptorErrorLoggerInfo Info)> descriptorsWithInfo, 533public static readonly DiagnosticDescriptor EnabledRule = new DiagnosticDescriptor( 542public static readonly DiagnosticDescriptor DisabledRule = new DiagnosticDescriptor( 551public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 582public static readonly DiagnosticDescriptor CodeBlockTopLevelRule = new DiagnosticDescriptor( 590public static readonly DiagnosticDescriptor CodeBlockPerCompilationRule = new DiagnosticDescriptor( 598public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 641public static readonly DiagnosticDescriptor DiagnosticDescriptor = new DiagnosticDescriptor( 649public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptor); 674internal static DiagnosticDescriptor Rule = 678public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 713internal static DiagnosticDescriptor Rule = 717public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 735public static readonly DiagnosticDescriptor DummyRule = new DiagnosticDescriptor( 743public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DummyRule); 750public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor( 760public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule); 780internal static DiagnosticDescriptor Rule = 784public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 806public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 813public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 821public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 832public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create((DiagnosticDescriptor)null); 842public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 852public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 863public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 873public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 886public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 896public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 922public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 959public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 983public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => throw new NotImplementedException(); 990public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor( 998public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule); 1029public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor( 1037public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule); 1067public DiagnosticDescriptor Descriptor { get; } 1069public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1100public DiagnosticDescriptor Descriptor { get; } 1102public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1121public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 1136public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1190public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 1199public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1232public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 1327public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1377public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 1385public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1403public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 1416public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1453public static readonly DiagnosticDescriptor Descriptor = new DiagnosticDescriptor( 1461public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 1478public static readonly DiagnosticDescriptor Warning = new DiagnosticDescriptor( 1486public static readonly DiagnosticDescriptor Error = new DiagnosticDescriptor( 1494public static readonly DiagnosticDescriptor Summary = new DiagnosticDescriptor( 1502public static readonly DiagnosticDescriptor Summary2 = new DiagnosticDescriptor( 1518public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Warning, Error, Summary, Summary2); 1633var rule = Summary; 1683public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor( 1691public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Rule); 1723public static readonly DiagnosticDescriptor GeneratedCodeDescriptor = new DiagnosticDescriptor( 1731public static readonly DiagnosticDescriptor NonGeneratedCodeDescriptor = new DiagnosticDescriptor( 1739public static readonly DiagnosticDescriptor UniqueTextFileDescriptor = new DiagnosticDescriptor( 1747public static readonly DiagnosticDescriptor NumberOfUniqueTextFileDescriptor = new DiagnosticDescriptor( 1792public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(GeneratedCodeDescriptor, NonGeneratedCodeDescriptor, UniqueTextFileDescriptor, NumberOfUniqueTextFileDescriptor); 1803var descriptor = GeneratedCodeDescriptor; 1821var descriptor = isGeneratedCode ? GeneratedCodeDescriptor : NonGeneratedCodeDescriptor; 1847public static readonly DiagnosticDescriptor ParameterDescriptor = new DiagnosticDescriptor( 1855public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ParameterDescriptor); 1887public static readonly DiagnosticDescriptor SymbolStartTopLevelRule = new DiagnosticDescriptor( 1895public static readonly DiagnosticDescriptor SymbolStartCompilationLevelRule = new DiagnosticDescriptor( 1903public static readonly DiagnosticDescriptor SymbolStartedEndedDifferRule = new DiagnosticDescriptor( 1911public static readonly DiagnosticDescriptor SymbolStartedOrderingRule = new DiagnosticDescriptor( 1919public static readonly DiagnosticDescriptor SymbolEndedOrderingRule = new DiagnosticDescriptor( 1927public static readonly DiagnosticDescriptor OperationOrderingRule = new DiagnosticDescriptor( 1935public static readonly DiagnosticDescriptor DuplicateStartActionRule = new DiagnosticDescriptor( 1943public static readonly DiagnosticDescriptor DuplicateEndActionRule = new DiagnosticDescriptor( 1951public static readonly DiagnosticDescriptor OperationRule = new DiagnosticDescriptor( 1959public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 2063var rule = _topLevelAction ? SymbolStartTopLevelRule : SymbolStartCompilationLevelRule; 2394private readonly DiagnosticDescriptor _rule; 2416public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_rule); 2480public DiagnosticDescriptor Descriptor { get; } 2482public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 2530public DiagnosticDescriptor Descriptor { get; } 2532public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 2552private static readonly DiagnosticDescriptor s_descriptor = new DiagnosticDescriptor( 2560public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 2590public DiagnosticDescriptor Descriptor { get; } 2592public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 2636public DiagnosticDescriptor Descriptor { get; } 2638public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 2669private static readonly DiagnosticDescriptor s_descriptor = new DiagnosticDescriptor( 2679public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 2705private static readonly DiagnosticDescriptor s_descriptor = new("ID0001", "Title", "{0}", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 2727public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 2873public DiagnosticDescriptor Descriptor { get; } 2875public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor); 2907private readonly DiagnosticDescriptor s_descriptor = 2922public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 2975private static readonly DiagnosticDescriptor s_descriptor = new("ID0001", "Title", "Message", "Category", DiagnosticSeverity.Warning, isEnabledByDefault: true); 3006public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 3077private static readonly DiagnosticDescriptor s_descriptor = new DiagnosticDescriptor( 3096public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_descriptor); 3226public static readonly DiagnosticDescriptor _descriptor = new DiagnosticDescriptor( 3237public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_descriptor);
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (5)
20public static readonly DiagnosticDescriptor LocalCouldHaveMoreSpecificTypeDescriptor = new DiagnosticDescriptor( 28public static readonly DiagnosticDescriptor FieldCouldHaveMoreSpecificTypeDescriptor = new DiagnosticDescriptor( 37public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 293private void Report(OperationBlockAnalysisContext context, ILocalSymbol local, ITypeSymbol moreSpecificType, DiagnosticDescriptor descriptor) 298private void Report(CompilationAnalysisContext context, IFieldSymbol field, ITypeSymbol moreSpecificType, DiagnosticDescriptor descriptor)
Diagnostics\DescriptorFactory.cs (13)
13/// Factory for creating different kinds of <see cref="DiagnosticDescriptor"/>s for use in tests. 18/// Creates a <see cref="DiagnosticDescriptor"/> with specified <see cref="DiagnosticDescriptor.Id"/>. 21/// Returned <see cref="DiagnosticDescriptor"/> has 22/// - empty <see cref="DiagnosticDescriptor.Title"/> and <see cref="DiagnosticDescriptor.Category"/> 23/// - <see cref="DiagnosticDescriptor.MessageFormat"/> set to <paramref name="id"/> 24/// - <see cref="DiagnosticDescriptor.DefaultSeverity"/> set to <see cref="DiagnosticSeverity.Hidden"/> 25/// - <see cref="WellKnownDiagnosticTags.NotConfigurable"/> custom tag added in <see cref="DiagnosticDescriptor.CustomTags"/>. 27/// <param name="id">The value for <see cref="DiagnosticDescriptor.Id"/>.</param> 29/// <returns>A <see cref="DiagnosticDescriptor"/> with specified <see cref="DiagnosticDescriptor.Id"/>.</returns> 30public static DiagnosticDescriptor CreateSimpleDescriptor(string id, params string[] additionalCustomTags)
Diagnostics\EmptyArrayAnalyzer.cs (2)
29public static readonly DiagnosticDescriptor UseArrayEmptyDescriptor = new DiagnosticDescriptor( 38public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (3)
20public static readonly DiagnosticDescriptor FieldCouldBeReadOnlyDescriptor = new DiagnosticDescriptor( 29public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 142private void Report(CompilationAnalysisContext context, IFieldSymbol field, DiagnosticDescriptor descriptor)
Diagnostics\LocalCouldBeConstAnalyzer.cs (3)
20public static readonly DiagnosticDescriptor LocalCouldBeConstDescriptor = new DiagnosticDescriptor( 29public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 133private void Report(OperationBlockAnalysisContext context, ILocalSymbol local, DiagnosticDescriptor descriptor)
Diagnostics\OperationTestAnalyzer.cs (112)
22public static readonly DiagnosticDescriptor InvalidExpressionDescriptor = new DiagnosticDescriptor( 30public static readonly DiagnosticDescriptor InvalidStatementDescriptor = new DiagnosticDescriptor( 38public static readonly DiagnosticDescriptor IsInvalidDescriptor = new DiagnosticDescriptor( 46public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 84public static readonly DiagnosticDescriptor ExpressionDescriptor = new DiagnosticDescriptor( 92public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 125public static readonly DiagnosticDescriptor BigForDescriptor = new DiagnosticDescriptor( 134public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 286private void Report(OperationAnalysisContext context, SyntaxNode syntax, DiagnosticDescriptor descriptor) 298public static readonly DiagnosticDescriptor SparseSwitchDescriptor = new DiagnosticDescriptor( 306public static readonly DiagnosticDescriptor NoDefaultSwitchDescriptor = new DiagnosticDescriptor( 314public static readonly DiagnosticDescriptor OnlyDefaultSwitchDescriptor = new DiagnosticDescriptor( 323public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 482private void Report(OperationAnalysisContext context, SyntaxNode syntax, DiagnosticDescriptor descriptor) 494public static readonly DiagnosticDescriptor BigParamArrayArgumentsDescriptor = new DiagnosticDescriptor( 502public static readonly DiagnosticDescriptor OutOfNumericalOrderArgumentsDescriptor = new DiagnosticDescriptor( 510public static readonly DiagnosticDescriptor UseDefaultArgumentDescriptor = new DiagnosticDescriptor( 518public static readonly DiagnosticDescriptor InvalidArgumentDescriptor = new DiagnosticDescriptor( 527public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 599private static void Report(OperationAnalysisContext context, SyntaxNode syntax, DiagnosticDescriptor descriptor) 611public static readonly DiagnosticDescriptor SeventeenDescriptor = new DiagnosticDescriptor( 620public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 648public static readonly DiagnosticDescriptor NullArgumentsDescriptor = new DiagnosticDescriptor( 657public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 676private static void Report(OperationAnalysisContext context, SyntaxNode syntax, DiagnosticDescriptor descriptor) 688public static readonly DiagnosticDescriptor DoNotUseFieldInitializerDescriptor = new DiagnosticDescriptor( 696public static readonly DiagnosticDescriptor DoNotUsePropertyInitializerDescriptor = new DiagnosticDescriptor( 705public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 722private static void Report(OperationAnalysisContext context, SyntaxNode syntax, DiagnosticDescriptor descriptor) 734public static readonly DiagnosticDescriptor DoNotUseMemberAssignmentDescriptor = new DiagnosticDescriptor( 742public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 763private static void Report(OperationAnalysisContext context, SyntaxNode syntax, DiagnosticDescriptor descriptor) 775public static readonly DiagnosticDescriptor DoNotUseLargeListOfArrayInitializersDescriptor = new DiagnosticDescriptor( 784public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 803private static void Report(OperationAnalysisContext context, SyntaxNode syntax, DiagnosticDescriptor descriptor) 815public static readonly DiagnosticDescriptor TooManyLocalVarDeclarationsDescriptor = new DiagnosticDescriptor( 823public static readonly DiagnosticDescriptor LocalVarInitializedDeclarationDescriptor = new DiagnosticDescriptor( 832public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 860private static void Report(OperationAnalysisContext context, SyntaxNode syntax, DiagnosticDescriptor descriptor) 872public static readonly DiagnosticDescriptor HasDefaultCaseDescriptor = new DiagnosticDescriptor( 880public static readonly DiagnosticDescriptor MultipleCaseClausesDescriptor = new DiagnosticDescriptor( 889public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 921private static void Report(OperationAnalysisContext context, SyntaxNode syntax, DiagnosticDescriptor descriptor) 930public static readonly DiagnosticDescriptor ImplicitInstanceDescriptor = new DiagnosticDescriptor( 938public static readonly DiagnosticDescriptor ExplicitInstanceDescriptor = new DiagnosticDescriptor( 946public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ImplicitInstanceDescriptor, ExplicitInstanceDescriptor); 964public static readonly DiagnosticDescriptor EventReferenceDescriptor = new DiagnosticDescriptor( 972public static readonly DiagnosticDescriptor InvalidEventDescriptor = new DiagnosticDescriptor( 980public static readonly DiagnosticDescriptor HandlerAddedDescriptor = new DiagnosticDescriptor( 988public static readonly DiagnosticDescriptor HandlerRemovedDescriptor = new DiagnosticDescriptor( 996public static readonly DiagnosticDescriptor PropertyReferenceDescriptor = new DiagnosticDescriptor( 1004public static readonly DiagnosticDescriptor FieldReferenceDescriptor = new DiagnosticDescriptor( 1012public static readonly DiagnosticDescriptor MethodBindingDescriptor = new DiagnosticDescriptor( 1020public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 1077public static readonly DiagnosticDescriptor LongParamsDescriptor = new DiagnosticDescriptor( 1085public static readonly DiagnosticDescriptor InvalidConstructorDescriptor = new DiagnosticDescriptor( 1093public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(LongParamsDescriptor, InvalidConstructorDescriptor); 1166public static readonly DiagnosticDescriptor EqualsValueDescriptor = new DiagnosticDescriptor( 1174public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(EqualsValueDescriptor); 1208public static readonly DiagnosticDescriptor NoneOperationDescriptor = new DiagnosticDescriptor( 1216public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 1237public static readonly DiagnosticDescriptor AddressOfDescriptor = new DiagnosticDescriptor( 1245public static readonly DiagnosticDescriptor InvalidAddressOfReferenceDescriptor = new DiagnosticDescriptor( 1253public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 1278public static readonly DiagnosticDescriptor LambdaExpressionDescriptor = new DiagnosticDescriptor( 1286public static readonly DiagnosticDescriptor TooManyStatementsInLambdaExpressionDescriptor = new DiagnosticDescriptor( 1295public static readonly DiagnosticDescriptor NoneOperationInLambdaExpressionDescriptor = new DiagnosticDescriptor( 1303public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => 1347public static readonly DiagnosticDescriptor StaticMemberDescriptor = new DiagnosticDescriptor( 1356public static readonly DiagnosticDescriptor StaticMemberWithInstanceDescriptor = new DiagnosticDescriptor( 1364public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 1426public static readonly DiagnosticDescriptor LabelDescriptor = new DiagnosticDescriptor( 1434public static readonly DiagnosticDescriptor GotoDescriptor = new DiagnosticDescriptor( 1442public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(LabelDescriptor, GotoDescriptor); 1476public static readonly DiagnosticDescriptor OperatorAddMethodDescriptor = new DiagnosticDescriptor( 1484public static readonly DiagnosticDescriptor OperatorMinusMethodDescriptor = new DiagnosticDescriptor( 1492public static readonly DiagnosticDescriptor DoubleMultiplyDescriptor = new DiagnosticDescriptor( 1500public static readonly DiagnosticDescriptor BooleanNotDescriptor = new DiagnosticDescriptor( 1508public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(OperatorAddMethodDescriptor, OperatorMinusMethodDescriptor, DoubleMultiplyDescriptor, BooleanNotDescriptor); 1553public static readonly DiagnosticDescriptor BinaryUserDefinedOperatorDescriptor = new DiagnosticDescriptor( 1561public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 1584public static readonly DiagnosticDescriptor BinaryOperatorDescriptor = new DiagnosticDescriptor( 1592public static readonly DiagnosticDescriptor UnaryOperatorDescriptor = new DiagnosticDescriptor( 1600public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 1666public static readonly DiagnosticDescriptor NullOperationSyntaxDescriptor = new DiagnosticDescriptor( 1676public static readonly DiagnosticDescriptor ParamsArrayOperationDescriptor = new DiagnosticDescriptor( 1684public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 1752public static readonly DiagnosticDescriptor InvalidBinaryDescriptor = new DiagnosticDescriptor( 1760public static readonly DiagnosticDescriptor InvalidUnaryDescriptor = new DiagnosticDescriptor( 1768public static readonly DiagnosticDescriptor InvalidIncrementDescriptor = new DiagnosticDescriptor( 1776public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(InvalidBinaryDescriptor, 1819public static readonly DiagnosticDescriptor ConditionalAccessOperationDescriptor = new DiagnosticDescriptor( 1827public static readonly DiagnosticDescriptor ConditionalAccessInstanceOperationDescriptor = new DiagnosticDescriptor( 1835public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 1876public static readonly DiagnosticDescriptor InvalidConversionExpressionDescriptor = new DiagnosticDescriptor( 1884public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 1908public static readonly DiagnosticDescriptor ForLoopConditionCrashDescriptor = new DiagnosticDescriptor( 1916public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 1947public static readonly DiagnosticDescriptor UnaryTrueDescriptor = new DiagnosticDescriptor( 1955public static readonly DiagnosticDescriptor UnaryFalseDescriptor = new DiagnosticDescriptor( 1963public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 1989public static readonly DiagnosticDescriptor AssignmentOperationDescriptor = new DiagnosticDescriptor( 1997public static readonly DiagnosticDescriptor AssignmentSyntaxDescriptor = new DiagnosticDescriptor( 2005public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 2033public static readonly DiagnosticDescriptor LiteralDescriptor = new DiagnosticDescriptor( 2041public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 2063public static readonly DiagnosticDescriptor OperationActionDescriptor = new DiagnosticDescriptor( 2071public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 2091public static readonly DiagnosticDescriptor OperationActionDescriptor = new DiagnosticDescriptor( 2099public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 2123public static readonly DiagnosticDescriptor GetOperationDescriptor = new DiagnosticDescriptor( 2131public sealed override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Diagnostics\SuppressMessageAttributeTests.DiagnosticAnalyzers.cs (16)
28private static readonly DiagnosticDescriptor s_rule = GetRule(Id); 30public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 53private static readonly DiagnosticDescriptor s_rule = GetRule(Id); 80public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 93private static readonly DiagnosticDescriptor s_rule = GetRule(TypeId); 105public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 118private static readonly DiagnosticDescriptor s_rule = GetRule(Id); 127public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 190private static readonly DiagnosticDescriptor s_rule = GetRule(Id); 192public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 223private static readonly DiagnosticDescriptor s_rule = GetRule(Id); 231public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 259private static readonly DiagnosticDescriptor s_rule = GetRule(Id); 267public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 299public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 312protected static DiagnosticDescriptor GetRule(string id)
Diagnostics\TestDiagnosticAnalyzer.cs (2)
23protected static readonly DiagnosticDescriptor DefaultDiagnostic = 71public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
SourceGeneration\TestGenerators.cs (1)
53public static readonly DiagnosticDescriptor Descriptor =
Microsoft.CodeAnalysis.UnitTests (22)
Analyzers\AnalyzerFileReferenceTests.cs (7)
598public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { throw new NotImplementedException(); } } 605public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { throw new NotImplementedException(); } } 612public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { throw new NotImplementedException(); } } 628public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { throw new NotImplementedException(); } } 661public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { throw new NotImplementedException(); } } 671public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { throw new NotImplementedException(); } } 678public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { throw new NotImplementedException(); } }
Diagnostics\AnalysisContextInfoTests.cs (3)
56private static readonly DiagnosticDescriptor s_rule = GetRule(Id); 68public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(s_rule); 97private static DiagnosticDescriptor GetRule(string id)
Diagnostics\DiagnosticCreationTests.cs (1)
19var descriptor = new DiagnosticDescriptor("ID", "Title", "MessageFormat", "Category", defaultSeverity, isEnabledByDefault: true);
Diagnostics\DiagnosticLocalizationTests.cs (9)
44var descriptor = new DiagnosticDescriptor( 263var descriptor1 = GetDescriptorWithLocalizableResourceStringsThatThrow(); 267var descriptor2 = GetDescriptorWithCustomLocalizableStringsThatThrow(); 275private static void TestDescriptorIsExceptionSafeCore(DiagnosticDescriptor descriptor) 329private static DiagnosticDescriptor GetDescriptorWithLocalizableResourceStringsThatThrow() 348private static DiagnosticDescriptor GetDescriptorWithCustomLocalizableStringsThatThrow() 367private readonly DiagnosticDescriptor _descriptor; 369public MyAnalyzer(DiagnosticDescriptor descriptor) 374public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Diagnostics\SarifErrorLoggerTests.cs (2)
38var descriptor = new DiagnosticDescriptor("TST", "_TST_", "", "", DiagnosticSeverity.Error, false); 80foreach (var descriptor in descriptors)
Microsoft.CodeAnalysis.VisualBasic (1)
Compilation\VisualBasicDiagnosticFilter.vb (1)
163report = DiagnosticDescriptor.MapSeverityToReport(severity)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (1)
src\Analyzers\VisualBasic\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryParenthesesTests.vb (1)
33Friend Overrides Function ShouldSkipMessageDescriptionVerification(descriptor As DiagnosticDescriptor) As Boolean
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (16)
CommandLineTests.vb (16)
10263Dim severityString = DiagnosticDescriptor.MapSeverityToReport(severityInConfigFile.Value).ToAnalyzerConfigString() 10900Friend Shared ReadOnly Hidden01 As DiagnosticDescriptor = New DiagnosticDescriptor("Hidden01", "", "Throwing a diagnostic for #ExternalSource", "", DiagnosticSeverity.Hidden, isEnabledByDefault:=True) 10909Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 10924Friend Shared ReadOnly Info01 As DiagnosticDescriptor = New DiagnosticDescriptor("Info01", "", "Throwing a diagnostic for #Enable", "", DiagnosticSeverity.Info, isEnabledByDefault:=True) 10925Friend Shared ReadOnly Info02 As DiagnosticDescriptor = New DiagnosticDescriptor("Info02", "", "Throwing a diagnostic for something else", "", DiagnosticSeverity.Info, isEnabledByDefault:=True) 10934Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 10949Friend Shared ReadOnly Warning01 As DiagnosticDescriptor = New DiagnosticDescriptor("Warning01", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 10950Friend Shared ReadOnly Warning02 As DiagnosticDescriptor = New DiagnosticDescriptor("Warning02", "", "Throwing a diagnostic for something else", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 10951Friend Shared ReadOnly Warning03 As DiagnosticDescriptor = New DiagnosticDescriptor("Warning03", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 10960Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 10975Friend Shared ReadOnly Warning04 As DiagnosticDescriptor = New DiagnosticDescriptor("Warning04", "", "Throwing a diagnostic for types declared", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True, helpLinkUri:="https://example.org/analyzer") 10984Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 10999Friend Shared ReadOnly Error01 As DiagnosticDescriptor = New DiagnosticDescriptor("Error01", "", "Throwing a diagnostic for #Disable", "", DiagnosticSeverity.Error, isEnabledByDefault:=True) 11008Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 11022Friend Shared ReadOnly Rule As DiagnosticDescriptor = New DiagnosticDescriptor("AdditionalFileDiagnostic", "", "Additional File Diagnostic: {0}", "", DiagnosticSeverity.Warning, isEnabledByDefault:=True) 11029Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor)
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Diagnostics\Analyzers\VisualBasicUnboundIdentifiersDiagnosticAnalyzer.vb (1)
21Protected Overrides ReadOnly Property DiagnosticDescriptor As DiagnosticDescriptor
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (8)
Diagnostics\Configuration\ConfigureSeverity\DotNetDiagnosticSeverityBasedSeverityConfigurationTests.vb (2)
19Private Shared ReadOnly Rule As DiagnosticDescriptor = New DiagnosticDescriptor( 27Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor)
Diagnostics\Suppression\SuppressionTests.vb (6)
699Public Overrides ReadOnly Property SupportedDiagnostics() As ImmutableArray(Of DiagnosticDescriptor) 774Public Overrides ReadOnly Property SupportedDiagnostics() As ImmutableArray(Of DiagnosticDescriptor) 818Public Overrides ReadOnly Property SupportedDiagnostics() As ImmutableArray(Of DiagnosticDescriptor) 884Public Overrides ReadOnly Property SupportedDiagnostics() As ImmutableArray(Of DiagnosticDescriptor) 1004Public Overrides ReadOnly Property SupportedDiagnostics() As ImmutableArray(Of DiagnosticDescriptor) 1720Public Overrides ReadOnly Property SupportedDiagnostics() As ImmutableArray(Of DiagnosticDescriptor)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (17)
Diagnostics\DiagnosticAnalyzerTests.vb (13)
27Private Shared ReadOnly s_CA9999_UseOfVariableThatStartsWithX As DiagnosticDescriptor = New DiagnosticDescriptor(id:="CA9999_UseOfVariableThatStartsWithX", title:="CA9999_UseOfVariableThatStartsWithX", messageFormat:="Use of variable whose name starts with 'x': '{0}'", category:="Test", defaultSeverity:=DiagnosticSeverity.Warning, isEnabledByDefault:=True) 29Public Overrides ReadOnly Property SupportedDiagnostics() As ImmutableArray(Of DiagnosticDescriptor) 218Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 234Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 267Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 305Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 350Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 399Private Shared ReadOnly s_descriptor As DiagnosticDescriptor = DescriptorFactory.CreateSimpleDescriptor("CodeBlockDiagnostic") 401Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 499Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 564Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 952Public NotOverridable Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 1325Private Shared Sub AddExpectedNonLocalDiagnostic(builder As ArrayBuilder(Of DiagnosticDescription), descriptor As DiagnosticDescriptor, ParamArray arguments As String())
Diagnostics\GetDiagnosticsTests.vb (4)
587Public Shared ReadOnly Descriptor As DiagnosticDescriptor = New DiagnosticDescriptor("ID0001", "Title", "{0}", "Category", defaultSeverity:=DiagnosticSeverity.Warning, isEnabledByDefault:=True) 588Public Shared ReadOnly DescriptorForBlockEnd As DiagnosticDescriptor = New DiagnosticDescriptor("ID0002", "Title", "Message", "Category", defaultSeverity:=DiagnosticSeverity.Warning, isEnabledByDefault:=True) 595Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor) 713Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (5)
Parser\ParseDirectives.vb (5)
3153Private ReadOnly _descriptor As DiagnosticDescriptor 3155Private ReadOnly _reporter As Func(Of SyntaxNode, DiagnosticDescriptor, Diagnostic) 3157Public Sub New(descriptor As DiagnosticDescriptor, kind As SyntaxKind, reporter As Func(Of SyntaxNode, DiagnosticDescriptor, Diagnostic)) 3167Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
MockVisualBasicCompiler.vb (2)
20Public DescriptorsWithInfo As ImmutableArray(Of (Descriptor As DiagnosticDescriptor, Info As DiagnosticDescriptorErrorLoggerInfo)) 90Protected Overrides Sub AddAnalyzerDescriptorsAndExecutionTime(errorLogger As ErrorLogger, descriptorsWithInfo As ImmutableArray(Of (Descriptor As DiagnosticDescriptor, Info As DiagnosticDescriptorErrorLoggerInfo)), totalAnalyzerExecutionTime As Double)
Microsoft.CodeAnalysis.Workspaces (35)
Diagnostics\DiagnosticAnalyzerInfoCache.cs (12)
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; 89public ImmutableArray<DiagnosticDescriptor> GetDiagnosticDescriptors(DiagnosticAnalyzer analyzer) 102public ImmutableArray<DiagnosticDescriptor> GetNonCompilationEndDiagnosticDescriptors(DiagnosticAnalyzer analyzer) 114public ImmutableArray<DiagnosticDescriptor> GetCompilationEndDiagnosticDescriptors(DiagnosticAnalyzer analyzer) 135public bool TryGetDescriptorForDiagnosticId(string diagnosticId, [NotNullWhen(true)] out DiagnosticDescriptor? descriptor) 143ImmutableArray<DiagnosticDescriptor> descriptors; 182private static bool IsTelemetryCollectionAllowed(DiagnosticAnalyzer analyzer, ImmutableArray<DiagnosticDescriptor> descriptors) 187private void PopulateIdToDescriptorMap(ImmutableArray<DiagnosticDescriptor> descriptors) 189foreach (var descriptor in descriptors)
Diagnostics\DiagnosticData.cs (1)
282public static bool TryCreate(DiagnosticDescriptor descriptor, string[] messageArguments, Project project, [NotNullWhen(true)] out DiagnosticData? diagnosticData)
Diagnostics\FileContentLoadAnalyzer.cs (1)
22public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
Diagnostics\GeneratorDiagnosticsPlaceholderAnalyzer.cs (1)
21public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => [];
Diagnostics\HostDiagnosticAnalyzers.cs (8)
78public ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsPerReference(DiagnosticAnalyzerInfoCache infoCache) 85public ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsPerReference(DiagnosticAnalyzerInfoCache infoCache, Project project) 92private static ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> ConvertReferenceIdentityToName( 93ImmutableDictionary<object, ImmutableArray<DiagnosticDescriptor>> descriptorsPerReference, 96var builder = ImmutableDictionary.CreateBuilder<string, ImmutableArray<DiagnosticDescriptor>>(); 159private static ImmutableDictionary<object, ImmutableArray<DiagnosticDescriptor>> CreateDiagnosticDescriptorsPerReference( 163var builder = ImmutableDictionary.CreateBuilder<object, ImmutableArray<DiagnosticDescriptor>>(); 166var descriptors = ImmutableArray.CreateBuilder<DiagnosticDescriptor>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Diagnostics\IPragmaSuppressionsAnalyzer.cs (1)
26Func<DiagnosticAnalyzer, ImmutableArray<DiagnosticDescriptor>> getSupportedDiagnostics,
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)
11internal static readonly DiagnosticDescriptor ErrorReadingFileContent;
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
BatchFixAllProviderTests.cs (2)
56internal static readonly DiagnosticDescriptor Descriptor = 59public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(Descriptor);
SolutionTests\SolutionTests.cs (1)
2964public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
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.Logging.Generators (28)
DiagnosticDescriptors.cs (26)
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 LoggingMethodIsGeneric { 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(
LoggerMessageGenerator.Parser.cs (1)
721private void Diag(DiagnosticDescriptor desc, Location? location, params object?[]? messageArgs)
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.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 (11)
DiagDescriptorsTests.cs (1)
27public void ShouldContainValidLinkAndBeEnabled(DiagnosticDescriptor descriptor)
ParserTests.cs (2)
691DiagnosticDescriptor? expectedDiagnostic = null, 696DiagnosticDescriptor? 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)
Microsoft.Gen.Metrics (23)
DiagDescriptors.cs (20)
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 ErrorGaugeNotSupported { get; } = Make( 122public static DiagnosticDescriptor ErrorXmlNotLoadedCorrectly { get; } = Make( 128public static DiagnosticDescriptor ErrorTagTypeCycleDetected { get; } = Make(
Parser.cs (2)
596private void Diag(DiagnosticDescriptor desc, Location? location) 601private 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 (24)
MetricsReportsGenerator.cs (1)
71var diagnostic = new DiagnosticDescriptor(
src\Generators\Microsoft.Gen.Metrics\DiagDescriptors.cs (20)
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 ErrorGaugeNotSupported { get; } = Make( 122public static DiagnosticDescriptor ErrorXmlNotLoadedCorrectly { get; } = Make( 128public static DiagnosticDescriptor ErrorTagTypeCycleDetected { get; } = Make(
src\Generators\Microsoft.Gen.Metrics\Parser.cs (2)
596private void Diag(DiagnosticDescriptor desc, Location? location) 601private 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 (58)
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\ComHostingDoesNotSupportGeneratedComInterfaceAnalyzer.cs (1)
17public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(ComHostingDoesNotSupportGeneratedComInterface);
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);
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 (43)
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 InvalidExceptionMarshallingConfiguration = 156public static readonly DiagnosticDescriptor ParameterTypeNotSupported = 167public static readonly DiagnosticDescriptor ReturnTypeNotSupported = 178public static readonly DiagnosticDescriptor ParameterTypeNotSupportedWithDetails = 189public static readonly DiagnosticDescriptor ReturnTypeNotSupportedWithDetails = 200public static readonly DiagnosticDescriptor ParameterConfigurationNotSupported = 211public static readonly DiagnosticDescriptor ReturnConfigurationNotSupported = 222public static readonly DiagnosticDescriptor MarshalAsParameterConfigurationNotSupported = 233public static readonly DiagnosticDescriptor MarshalAsReturnConfigurationNotSupported = 244public static readonly DiagnosticDescriptor ConfigurationNotSupported = 255public static readonly DiagnosticDescriptor ConfigurationValueNotSupported = 266public static readonly DiagnosticDescriptor MarshallingAttributeConfigurationNotSupported = 277public static readonly DiagnosticDescriptor MethodNotDeclaredInAttributedInterface = 288public static readonly DiagnosticDescriptor InstancePropertyDeclaredInInterface = 299public static readonly DiagnosticDescriptor InstanceEventDeclaredInInterface = 310public static readonly DiagnosticDescriptor InvalidAttributedInterfaceNotAccessible = 321public static readonly DiagnosticDescriptor InvalidAttributedInterfaceMissingGuidAttribute = 332public static readonly DiagnosticDescriptor InvalidAttributedInterfaceGenericNotSupported = 343public static readonly DiagnosticDescriptor MultipleComInterfaceBaseTypes = 354public static readonly DiagnosticDescriptor CannotAnalyzeMethodPattern = 365public static readonly DiagnosticDescriptor CannotAnalyzeInterfacePattern = 376public static readonly DiagnosticDescriptor BaseInterfaceIsNotGenerated = 387public static readonly DiagnosticDescriptor InvalidAttributedClassMissingPartialModifier = 398public static readonly DiagnosticDescriptor InterfaceTypeNotSupported = 409public static readonly DiagnosticDescriptor ClassDoesNotImplementAnyGeneratedComInterface = 420public static readonly DiagnosticDescriptor UnnecessaryParameterMarshallingInfo = 435public static readonly DiagnosticDescriptor UnnecessaryReturnMarshallingInfo = 450public static readonly DiagnosticDescriptor SizeOfInCollectionMustBeDefinedAtCallOutParam = 460public static readonly DiagnosticDescriptor SizeOfInCollectionMustBeDefinedAtCallReturnValue = 470public static readonly DiagnosticDescriptor ComMethodManagedReturnWillBeOutVariable = 480public static readonly DiagnosticDescriptor HResultTypeWillBeTreatedAsStruct = 490public static readonly DiagnosticDescriptor GeneratedComInterfaceUsageDoesNotFollowBestPractices = 501public static readonly DiagnosticDescriptor BaseInterfaceDefinedInOtherAssembly =
src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
Microsoft.Interop.JavaScript.JSImportGenerator (20)
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\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
Microsoft.Interop.LibraryImportGenerator (83)
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\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\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
Microsoft.Interop.LibraryImportGenerator.Downlevel (26)
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\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
Microsoft.Interop.SourceGeneration (32)
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 (3)
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)
375public static void ValidateCountInfoAvailableAtCall(MarshalDirection stubDirection, TypePositionInfo info, GeneratorDiagnosticsBag generatorDiagnostics, IMethodSymbol symbol, DiagnosticDescriptor outParamDescriptor, DiagnosticDescriptor returnValueDescriptor)
MethodSignatureDiagnosticLocations.cs (6)
20DiagnosticDescriptor InvalidMarshallingAttributeInfo { get; } 24DiagnosticDescriptor ConfigurationNotSupported { get; } 28DiagnosticDescriptor ConfigurationValueNotSupported { get; } 37DiagnosticDescriptor? GetDescriptor(GeneratorDiagnostic diagnostic); 42DiagnosticInfo CreateDiagnosticInfo(DiagnosticDescriptor descriptor, GeneratorDiagnostic diagnostic); 61public DiagnosticInfo CreateDiagnosticInfo(DiagnosticDescriptor descriptor, GeneratorDiagnostic diagnostic)
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)
26public 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 =>
Microsoft.VisualStudio.LanguageServices (9)
Diagnostics\IVisualStudioDiagnosticAnalyzerService.cs (1)
25IReadOnlyDictionary<string, IEnumerable<DiagnosticDescriptor>> GetAllDiagnosticDescriptors(IVsHierarchy? hierarchy);
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (5)
91public IReadOnlyDictionary<string, IEnumerable<DiagnosticDescriptor>> GetAllDiagnosticDescriptors(IVsHierarchy? hierarchy) 122var descriptorsMap = ImmutableDictionary.CreateBuilder<string, IEnumerable<DiagnosticDescriptor>>(); 143private static IReadOnlyDictionary<string, IEnumerable<DiagnosticDescriptor>> Transform( 144ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>> map) 147return map.ToDictionary(kv => kv.Key, kv => (IEnumerable<DiagnosticDescriptor>)kv.Value);
ExternalAccess\LegacyCodeAnalysis\Api\ILegacyCodeAnalysisVisualStudioDiagnosticAnalyzerServiceAccessor.cs (1)
23IReadOnlyDictionary<string, IEnumerable<DiagnosticDescriptor>> GetAllDiagnosticDescriptors(IVsHierarchy hierarchyOpt);
ExternalAccess\LegacyCodeAnalysis\LegacyCodeAnalysisVisualStudioDiagnosticAnalyzerServiceAccessor.cs (1)
29public IReadOnlyDictionary<string, IEnumerable<DiagnosticDescriptor>> GetAllDiagnosticDescriptors(IVsHierarchy hierarchyOpt)
TaskList\ProjectExternalErrorReporter.cs (1)
278if (analyzerInfoCache != null && analyzerInfoCache.TryGetDescriptorForDiagnosticId(errorId, out var descriptor))
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (5)
EditorConfigSettings\DataProvider\DataProviderTests.MockAnalyzerReference.cs (5)
91private static ImmutableArray<DiagnosticDescriptor> CreateSupportedDiagnostics(ImmutableArray<(string id, string category)> reportedDiagnosticIdsWithCategories) 93var builder = ArrayBuilder<DiagnosticDescriptor>.GetInstance(); 96var descriptor = new DiagnosticDescriptor(diagnosticId, "MockDiagnostic", "MockDiagnostic", category, DiagnosticSeverity.Warning, isEnabledByDefault: true); 103public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } 109foreach (var descriptor in SupportedDiagnostics)
Microsoft.VisualStudio.LanguageServices.UnitTests (2)
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (1)
268Public Overrides ReadOnly Property SupportedDiagnostics As ImmutableArray(Of DiagnosticDescriptor)
SolutionExplorer\DiagnosticItemTests.vb (1)
40Private Shared Function CreateDescriptor() As DiagnosticDescriptor
Microsoft.VisualStudio.LanguageServices.Xaml (3)
Diagnostics\Analyzers\IXamlDocumentAnalyzerService.cs (1)
15ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; }
Diagnostics\Analyzers\XamlDocumentDiagnosticAnalyzer.cs (2)
19public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics 23return XamlProjectService.AnalyzerService?.SupportedDiagnostics ?? ImmutableArray<DiagnosticDescriptor>.Empty;
Mvc.Analyzers.Test (2)
AvoidHtmlPartialAnalyzerTest.cs (1)
16private static readonly DiagnosticDescriptor DiagnosticDescriptor = DiagnosticDescriptors.MVC1000_HtmlHelperPartialShouldBeAvoided;
TagHelpersInCodeBlocksAnalyzerTest.cs (1)
16private readonly DiagnosticDescriptor DiagnosticDescriptor = DiagnosticDescriptors.MVC1006_FunctionsContainingTagHelpersMustBeAsyncAndReturnTask;
Mvc.Api.Analyzers.Test (4)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest.cs (1)
65var descriptor = ApiDiagnosticDescriptors.API1003_ApiActionsDoNotRequireExplicitModelValidationCheck;
ApiConventionAnalyzerIntegrationTest.cs (3)
273private Task RunTest(DiagnosticDescriptor descriptor, [CallerMemberName] string testMethod = "") 276private Task RunTest(DiagnosticDescriptor descriptor, int statusCode, [CallerMemberName] string testMethod = "") 279private async Task RunTest(DiagnosticDescriptor descriptor, object[] args, [CallerMemberName] string testMethod = "")
Roslyn.VisualStudio.Next.UnitTests (4)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (4)
265private readonly ImmutableArray<DiagnosticDescriptor> _supportedDiagnostics = 268public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => _supportedDiagnostics; 285private readonly ImmutableArray<DiagnosticDescriptor> _supportedDiagnostics = 288public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => _supportedDiagnostics;
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 (19)
JsonSourceGenerator.DiagnosticDescriptors.cs (15)
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 InaccessibleJsonIncludePropertiesNotSupported { get; } = DiagnosticDescriptorHelper.Create( 79public static DiagnosticDescriptor PolymorphismNotSupported { get; } = DiagnosticDescriptorHelper.Create( 87public static DiagnosticDescriptor JsonConverterAttributeInvalidType { get; } = DiagnosticDescriptorHelper.Create( 95public static DiagnosticDescriptor JsonUnsupportedLanguageVersion { get; } = DiagnosticDescriptorHelper.Create( 103public static DiagnosticDescriptor JsonConstructorInaccessible { get; } = DiagnosticDescriptorHelper.Create( 111public static DiagnosticDescriptor DerivedJsonConverterAttributesNotSupported { get; } = DiagnosticDescriptorHelper.Create( 119public static DiagnosticDescriptor JsonSerializableAttributeOnNonContextType { get; } = DiagnosticDescriptorHelper.Create( 127public static DiagnosticDescriptor TypeContainsRefLikeMember { get; } = DiagnosticDescriptorHelper.Create(
JsonSourceGenerator.Parser.cs (1)
53public void ReportDiagnostic(DiagnosticDescriptor descriptor, Location? location, params object?[]? messageArgs)
src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
src\libraries\Common\src\SourceGenerators\DiagnosticInfo.cs (2)
17public DiagnosticDescriptor Descriptor { get; private init; } 21public static DiagnosticInfo Create(DiagnosticDescriptor descriptor, Location? location, object?[]? messageArgs)
System.Text.RegularExpressions.Generator (9)
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(
RegexGenerator.cs (1)
355private sealed record class DiagnosticData(DiagnosticDescriptor descriptor, Location location, object? arg = null)
src\libraries\Common\src\Roslyn\DiagnosticDescriptorHelper.cs (1)
10public static DiagnosticDescriptor Create(
UpgradeToGeneratedRegexAnalyzer.cs (1)
30public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(DiagnosticDescriptors.UseRegexSourceGeneration);
System.Windows.Forms.Analyzers (3)
System\Windows\Forms\Analyzers\AppManifestAnalyzer.cs (1)
16public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
System\Windows\Forms\Analyzers\Diagnostics\SharedDiagnosticDescriptors.cs (2)
11internal static readonly DiagnosticDescriptor s_cSharpMigrateHighDpiSettings = 19internal static readonly DiagnosticDescriptor s_visualBasicMigrateHighDpiSettings =
System.Windows.Forms.Analyzers.CSharp (7)
System\Windows\Forms\CSharp\Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.cs (1)
20public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
System\Windows\Forms\CSharp\Analyzers\Diagnostics\CSharpDiagnosticDescriptors.cs (5)
12public static readonly DiagnosticDescriptor s_errorUnsupportedProjectType = 20public static readonly DiagnosticDescriptor s_propertyCantBeSetToValue = 28public static readonly DiagnosticDescriptor s_propertyCantBeSetToValueWithReason = 36public static readonly DiagnosticDescriptor s_missingPropertySerializationConfiguration = 45public static readonly DiagnosticDescriptor s_avoidPassingFuncReturningTaskWithoutCancellationToken =
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
15public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics
System.Windows.Forms.Analyzers.VisualBasic (2)
Analyzers\AvoidPassingTaskWithoutCancellationToken\AvoidPassingTaskWithoutCancellationTokenAnalyzer.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)