6 overrides of Descriptor
Microsoft.CodeAnalysis (5)
CommandLine\CommonCompiler.SuppressionDiagnostic.cs (1)
47public override DiagnosticDescriptor Descriptor => s_suppressionDiagnosticDescriptor;
Diagnostic\Diagnostic.DiagnosticWithProgrammaticSuppression.cs (1)
33public override DiagnosticDescriptor Descriptor
Diagnostic\Diagnostic_SimpleDiagnostic.cs (1)
80public override DiagnosticDescriptor Descriptor
Diagnostic\DiagnosticWithInfo.cs (1)
51public override DiagnosticDescriptor Descriptor
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
88public override DiagnosticDescriptor Descriptor => _original.Descriptor;
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
EvaluationContextBase.cs (1)
116public override DiagnosticDescriptor Descriptor
207 references to Descriptor
AnalyzerRunner (3)
Program.cs (3)
157description = diagnostic.Descriptor?.Title.ToString(); 160description = diagnostic.Descriptor?.MessageFormat.ToString(); 164diagnosticStatistics[diagnostic.Id] = (description, diagnostic.Descriptor.DefaultSeverity, existing.count + 1);
BuildActionTelemetryTable (1)
src\Workspaces\Core\Portable\Shared\Extensions\TelemetryExtensions.cs (1)
56if (diagnostic.Descriptor.ImmutableCustomTags().Any(static t => t == WellKnownDiagnosticTags.Telemetry))
ILLink.CodeFixProvider (2)
UnconditionalSuppressMessageCodeFixProvider.cs (2)
44 syntaxGenerator.LiteralExpression (diagnostic.Descriptor.Category)); 48 var ruleTitle = diagnostic.Descriptor.Title.ToString (CultureInfo.CurrentUICulture);
Microsoft.Analyzers.Local.Tests (1)
InternalReferencedInPublicDocAnalyzerTests.cs (1)
476private static bool IsInternalReferencedInPublicDocDiagnostic(Diagnostic d) => ReferenceEquals(d.Descriptor, DiagDescriptors.InternalReferencedInPublicDoc);
Microsoft.AspNetCore.App.Analyzers.Test (57)
Components\DisallowNonLiteralSequenceNumbersTest.cs (3)
46Assert.Same(DiagnosticDescriptors.DoNotUseNonLiteralSequenceNumbers, diagnostic.Descriptor); 67Assert.Same(DiagnosticDescriptors.DoNotUseNonLiteralSequenceNumbers, diagnostic.Descriptor); 88Assert.Same(DiagnosticDescriptors.DoNotUseNonLiteralSequenceNumbers, diagnostic.Descriptor);
RouteEmbeddedLanguage\RoutePatternAnalyzerTests.cs (11)
45Assert.Same(DiagnosticDescriptors.RoutePatternIssue, diagnostic.Descriptor); 77Assert.Same(DiagnosticDescriptors.RoutePatternIssue, diagnostic.Descriptor); 110Assert.Same(DiagnosticDescriptors.RoutePatternIssue, diagnostic.Descriptor); 138Assert.Same(DiagnosticDescriptors.RoutePatternIssue, diagnostic.Descriptor); 166Assert.Same(DiagnosticDescriptors.RoutePatternIssue, diagnostic.Descriptor); 195Assert.Same(DiagnosticDescriptors.RoutePatternIssue, diagnostic.Descriptor); 227Assert.Same(DiagnosticDescriptors.RoutePatternIssue, d.Descriptor); 232Assert.Same(DiagnosticDescriptors.RoutePatternIssue, d.Descriptor); 294Assert.Same(DiagnosticDescriptors.RoutePatternIssue, d.Descriptor); 334Assert.Same(DiagnosticDescriptors.RoutePatternUnusedParameter, d.Descriptor); 488Assert.Same(DiagnosticDescriptors.RoutePatternUnusedParameter, d.Descriptor);
RouteHandlers\DetectMisplacedLambdaAttributeTest.cs (7)
48Assert.Same(DiagnosticDescriptors.DetectMisplacedLambdaAttribute, diagnostic.Descriptor); 70Assert.Same(DiagnosticDescriptors.DetectMisplacedLambdaAttribute, diagnostic.Descriptor); 96Assert.Same(DiagnosticDescriptors.DetectMisplacedLambdaAttribute, diagnostic.Descriptor); 102Assert.Same(DiagnosticDescriptors.DetectMisplacedLambdaAttribute, diagnostic.Descriptor); 129Assert.Same(DiagnosticDescriptors.DetectMisplacedLambdaAttribute, diagnostic.Descriptor); 170Assert.Equal("CS0103", diagnostic.Descriptor.Id); 218Assert.Same(DiagnosticDescriptors.DetectMisplacedLambdaAttribute, diagnostic.Descriptor);
RouteHandlers\DisallowMvcBindArgumentsOnParametersTest.cs (2)
61Assert.Same(DiagnosticDescriptors.DoNotUseModelBindingAttributesOnRouteHandlerParameters, diagnostic.Descriptor); 83Assert.Same(DiagnosticDescriptors.DoNotUseModelBindingAttributesOnRouteHandlerParameters, diagnostic.Descriptor);
RouteHandlers\DisallowReturningActionResultsFromMapMethodsTest.cs (6)
130Assert.Same(DiagnosticDescriptors.DoNotReturnActionResultsFromRouteHandlers, diagnostic.Descriptor); 153Assert.Same(DiagnosticDescriptors.DoNotReturnActionResultsFromRouteHandlers, diagnostic.Descriptor); 181Assert.Same(DiagnosticDescriptors.DoNotReturnActionResultsFromRouteHandlers, diagnostic.Descriptor); 213Assert.Same(DiagnosticDescriptors.DoNotReturnActionResultsFromRouteHandlers, diagnostic.Descriptor); 251Assert.Same(DiagnosticDescriptors.DoNotReturnActionResultsFromRouteHandlers, diagnostic.Descriptor); 289Assert.Same(DiagnosticDescriptors.DoNotReturnActionResultsFromRouteHandlers, diagnostic.Descriptor);
WebApplicationBuilder\DisallowConfigureHostBuilderConfigureWebHostTest.cs (7)
45Assert.Same(DiagnosticDescriptors.DoNotUseConfigureWebHostWithConfigureHostBuilder, diagnostic.Descriptor); 66Assert.Same(DiagnosticDescriptors.DoNotUseConfigureWebHostWithConfigureHostBuilder, diagnostic.Descriptor); 88Assert.Same(DiagnosticDescriptors.DoNotUseConfigureWebHostWithConfigureHostBuilder, diagnostic.Descriptor); 128Assert.Same(DiagnosticDescriptors.DoNotUseConfigureWebHostWithConfigureHostBuilder, diagnostic.Descriptor); 156Assert.Same(DiagnosticDescriptors.DoNotUseConfigureWebHostWithConfigureHostBuilder, diagnostic.Descriptor); 185Assert.Same(DiagnosticDescriptors.DoNotUseConfigureWebHostWithConfigureHostBuilder, diagnostic.Descriptor); 219Assert.Same(DiagnosticDescriptors.DoNotUseConfigureWebHostWithConfigureHostBuilder, diagnostic.Descriptor);
WebApplicationBuilder\DisallowConfigureHostLoggingTest.cs (1)
273Assert.Same(DiagnosticDescriptors.DoNotUseHostConfigureLogging, diagnostic.Descriptor);
WebApplicationBuilder\DisallowConfigureServicesTest.cs (1)
284Assert.Same(DiagnosticDescriptors.DoNotUseHostConfigureServices, diagnostic.Descriptor);
WebApplicationBuilder\DisallowConfigureWebHostBuilderConfigureTest.cs (4)
47Assert.Same(DiagnosticDescriptors.DoNotUseConfigureWithConfigureWebHostBuilder, diagnostic.Descriptor); 68Assert.Same(DiagnosticDescriptors.DoNotUseConfigureWithConfigureWebHostBuilder, diagnostic.Descriptor); 95Assert.Same(DiagnosticDescriptors.DoNotUseConfigureWithConfigureWebHostBuilder, diagnostic.Descriptor); 123Assert.Same(DiagnosticDescriptors.DoNotUseConfigureWithConfigureWebHostBuilder, diagnostic.Descriptor);
WebApplicationBuilder\DisallowConfigureWebHostBuilderUseStartupTest.cs (6)
46Assert.Same(DiagnosticDescriptors.DoNotUseUseStartupWithConfigureWebHostBuilder, diagnostic.Descriptor); 67Assert.Same(DiagnosticDescriptors.DoNotUseUseStartupWithConfigureWebHostBuilder, diagnostic.Descriptor); 87Assert.Same(DiagnosticDescriptors.DoNotUseUseStartupWithConfigureWebHostBuilder, diagnostic.Descriptor); 108Assert.Same(DiagnosticDescriptors.DoNotUseUseStartupWithConfigureWebHostBuilder, diagnostic.Descriptor); 135Assert.Same(DiagnosticDescriptors.DoNotUseUseStartupWithConfigureWebHostBuilder, diagnostic.Descriptor); 163Assert.Same(DiagnosticDescriptors.DoNotUseUseStartupWithConfigureWebHostBuilder, diagnostic.Descriptor);
WebApplicationBuilder\UseTopLevelRouteRegistrationInsteadOfUseEndpointsTest.cs (9)
122Assert.Same(DiagnosticDescriptors.UseTopLevelRouteRegistrationsInsteadOfUseEndpoints, diagnostic.Descriptor); 163Assert.Same(DiagnosticDescriptors.UseTopLevelRouteRegistrationsInsteadOfUseEndpoints, diagnostic1.Descriptor); 167Assert.Same(DiagnosticDescriptors.UseTopLevelRouteRegistrationsInsteadOfUseEndpoints, diagnostic2.Descriptor); 171Assert.Same(DiagnosticDescriptors.UseTopLevelRouteRegistrationsInsteadOfUseEndpoints, diagnostic3.Descriptor); 175Assert.Same(DiagnosticDescriptors.UseTopLevelRouteRegistrationsInsteadOfUseEndpoints, diagnostic2.Descriptor); 207Assert.Same(DiagnosticDescriptors.UseTopLevelRouteRegistrationsInsteadOfUseEndpoints, diagnostic.Descriptor); 233Assert.Same(DiagnosticDescriptors.UseTopLevelRouteRegistrationsInsteadOfUseEndpoints, diagnostic.Descriptor); 263Assert.Same(DiagnosticDescriptors.UseTopLevelRouteRegistrationsInsteadOfUseEndpoints, diagnostic1.Descriptor); 267Assert.Same(DiagnosticDescriptors.UseTopLevelRouteRegistrationsInsteadOfUseEndpoints, diagnostic2.Descriptor);
Microsoft.AspNetCore.Components.Analyzers.Tests (11)
ComponentInternalUsageDiagnosticsAnalyzerTest.cs (11)
34Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 39Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 44Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 49Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 54Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 59Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 78Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 83Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 88Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 93Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 98Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (11)
ComponentInternalUsageDiagnosticsAnalyzerTest.cs (11)
34Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 39Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 44Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 49Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 54Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 59Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 78Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 83Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 88Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 93Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor); 98Assert.Same(DiagnosticDescriptors.DoNotUseRenderTreeTypes, diagnostic.Descriptor);
Microsoft.CodeAnalysis (15)
CommandLine\SarifErrorLogger.cs (4)
88Debug.Assert(diagnostic.CustomTags.SequenceEqual(diagnostic.Descriptor.ImmutableCustomTags)); 89Debug.Assert(diagnostic.Category == diagnostic.Descriptor.Category); 90Debug.Assert(diagnostic.DefaultSeverity == diagnostic.Descriptor.DefaultSeverity); 91Debug.Assert(diagnostic.IsEnabledByDefault == diagnostic.Descriptor.IsEnabledByDefault);
CommandLine\SarifV1ErrorLogger.cs (1)
64string ruleKey = _descriptors.Add(diagnostic.Descriptor);
CommandLine\SarifV2ErrorLogger.cs (1)
60int ruleIndex = _descriptors.Add(diagnostic.Descriptor);
Diagnostic\Diagnostic.cs (4)
308internal virtual string Category { get { return this.Descriptor.Category; } } 321public virtual DiagnosticSeverity DefaultSeverity { get { return this.Descriptor.DefaultSeverity; } } 371internal virtual bool IsEnabledByDefault { get { return this.Descriptor.IsEnabledByDefault; } } 403internal virtual ImmutableArray<string> CustomTags { get { return this.Descriptor.ImmutableCustomTags; } }
Diagnostic\Diagnostic.DiagnosticWithProgrammaticSuppression.cs (1)
35get { return _originalUnsuppressedDiagnostic.Descriptor; }
Diagnostic\DiagnosticFormatter.cs (1)
108var uri = diagnostic.Descriptor.HelpLinkUri;
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
2008analyzerOptions.TryGetSeverityFromBulkConfiguration(tree, compilation, diagnostic.Descriptor, cancellationToken, out ReportDiagnostic severity))
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
1326foreach (var tag in diagnostic.Descriptor.ImmutableCustomTags)
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
88public override DiagnosticDescriptor Descriptor => _original.Descriptor;
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
29=> !diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary);
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
30=> !diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary);
src\Analyzers\Core\CodeFixes\UseCollectionExpression\AbstractUseCollectionExpressionCodeFixProvider.cs (1)
30if (diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary))
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (1)
60=> !diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
48=> !diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary);
Microsoft.CodeAnalysis.CSharp (1)
Errors\CSharpDiagnosticFormatter.cs (1)
17return diagnostic.Descriptor.HelpLinkUri == ErrorFacts.GetHelpLink((ErrorCode)diagnostic.Code);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (1)
31=> !diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
src\Analyzers\CSharp\Tests\SimplifyInterpolation\SimplifyInterpolationTests.cs (1)
50diagnostics.Select(d => (d.Descriptor.Id, d.Severity)));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (46)
Attributes\AttributeTests_WellKnownAttributes.cs (15)
8300Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 8331Assert.Equal("https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/CS0612", diag.Descriptor.HelpLinkUri); 8362Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 8393Assert.Equal("https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/CS0612", diag.Descriptor.HelpLinkUri); 8466Assert.Equal("https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/TEST1", diag.Descriptor.HelpLinkUri); 8512Assert.Equal("C", diag.Descriptor.HelpLinkUri); 8709Assert.Equal("https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/TEST1", diag.Descriptor.HelpLinkUri); 8752Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 8854Assert.Equal("https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/TEST1", diag.Descriptor.HelpLinkUri); 8956Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 9139Assert.Equal($"https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 9190Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 9331Assert.Equal("C", diag.Descriptor.HelpLinkUri); 9469Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 9519Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri);
Semantics\ExperimentalAttributeTests.cs (31)
68Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 124Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 189Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 298Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 446Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 516Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1075Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1104Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1135Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1166Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1197Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1816Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1857Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1937Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1978Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 2058Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 2123Assert.Equal("https://example.org/DiagID1", diag.Descriptor.HelpLinkUri); 2149Assert.Equal("https://example.org/DiagID1", diag.Descriptor.HelpLinkUri); 2175Assert.Equal($"https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS{(int)ErrorCode.WRN_ExperimentalWithMessage})", diag.Descriptor.HelpLinkUri); 2201Assert.Equal($"https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS{(int)ErrorCode.WRN_ExperimentalWithMessage})", diag.Descriptor.HelpLinkUri); 2227Assert.Equal("https://example.org/DiagID1", diag.Descriptor.HelpLinkUri); 2253Assert.Equal("https://example.org/DiagID1", diag.Descriptor.HelpLinkUri); 2279Assert.Equal("https://example.org/DiagID1", diag.Descriptor.HelpLinkUri); 2305Assert.Equal("https://example.org/DiagID1", diag.Descriptor.HelpLinkUri); 2331Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 2362Assert.Equal("", diag.Descriptor.HelpLinkUri); 2393Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 2419Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 2445Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 2470Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 2495Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri);
Microsoft.CodeAnalysis.CSharp.Features (4)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (3)
62var title = includeTitle ? diagnostic.Descriptor.Title.ToString(CultureInfo.CurrentUICulture) : null; 180var category = LiteralExpression(SyntaxKind.StringLiteralExpression, Literal(diagnostic.Descriptor.Category)); 183var title = diagnostic.Descriptor.Title.ToString(CultureInfo.CurrentUICulture);
src\Analyzers\CSharp\CodeFixes\UseThrowExpression\UseThrowExpressionCodeFixProvider.cs (1)
31=> !diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
src\Analyzers\CSharp\Tests\SimplifyInterpolation\SimplifyInterpolationTests.cs (1)
50diagnostics.Select(d => (d.Descriptor.Id, d.Severity)));
Microsoft.CodeAnalysis.Features (19)
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
699? $"{_diagnostic.Id}: {_diagnostic.Descriptor.Title}"
CodeFixes\Configuration\ConfigureSeverity\ConfigureSeverityLevelCodeFixProvider.cs (2)
77if (!string.IsNullOrEmpty(diagnostic.Descriptor.Category)) 79var diagnosticsForCategory = analyzerDiagnosticsByCategory.GetOrAdd(diagnostic.Descriptor.Category, _ => ArrayBuilder<Diagnostic>.GetInstance());
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (6)
73category: diagnostic.Descriptor.Category, 77isEnabledByDefault: diagnostic.Descriptor.IsEnabledByDefault, 79title: diagnostic.Descriptor.Title, 80description: diagnostic.Descriptor.Description, 81helpLink: diagnostic.Descriptor.HelpLinkUri, 84customTags: diagnostic.Descriptor.CustomTags,
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
212var dummyDiagnosticWithLocationToCheck = Diagnostic.Create(_diagnostic.Descriptor, locationToCheck);
CodeFixes\Suppression\SuppressionHelpers.cs (3)
71=> HasCustomTag(diagnostic.Descriptor.ImmutableCustomTags(), WellKnownDiagnosticTags.NotConfigurable); 77=> HasCustomTag(diagnostic.Descriptor.ImmutableCustomTags(), WellKnownDiagnosticTags.Compiler); 83=> HasCustomTag(diagnostic.Descriptor.ImmutableCustomTags(), SynthesizedExternalSourceDiagnosticTag);
EditAndContinue\EditSession.cs (1)
861Telemetry.LogProjectAnalysisSummary(ProjectAnalysisSummary.ValidChanges, newProject.State.ProjectInfo.Attributes.TelemetryId, ImmutableArray.Create(mvidReadError.Descriptor.Id));
EditAndContinue\RudeEditDiagnostic.cs (1)
57=> diagnostic.Descriptor.DefaultSeverity == DiagnosticSeverity.Error;
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForNullableTernaryConditionalCheckCodeFixProvider.cs (1)
29=> !diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary);
src\Analyzers\Core\CodeFixes\UseCoalesceExpression\UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
30=> !diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary);
src\Analyzers\Core\CodeFixes\UseCollectionExpression\AbstractUseCollectionExpressionCodeFixProvider.cs (1)
30if (diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary))
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (1)
60=> !diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary);
Microsoft.CodeAnalysis.Test.Utilities (3)
Diagnostics\DiagnosticDescription.cs (3)
131_originalFormatSpecifiers = GetFormatSpecifiers(d.Descriptor.MessageFormat.ToString()); 134if (d.Code == 0 || d.Descriptor.ImmutableCustomTags.Contains(WellKnownDiagnosticTags.CustomObsolete)) 489var isCSharpOrRazor = actual.Any() && actual.First() is CSDiagnostic or { Descriptor.Category: "Razor" };
Microsoft.CodeAnalysis.UnitTests (6)
Diagnostics\DiagnosticLocalizationTests.cs (6)
92Assert.Equal(fixedTitle, localizableDiagnostic.Descriptor.Title.ToString()); 94Assert.Equal(fixedDescription, localizableDiagnostic.Descriptor.Description.ToString()); 97Assert.Equal(fixedTitle, localizableDiagnostic.Descriptor.Title.ToString(CustomResourceManager.DefaultCulture)); 99Assert.Equal(fixedDescription, localizableDiagnostic.Descriptor.Description.ToString(CustomResourceManager.DefaultCulture)); 102Assert.Equal(localizedTitle, localizableDiagnostic.Descriptor.Title.ToString(arCulture)); 104Assert.Equal(localizedDescription, localizableDiagnostic.Descriptor.Description.ToString(arCulture));
Microsoft.CodeAnalysis.VisualBasic (1)
Errors\DiagnosticFormatter.vb (1)
28Return diagnostic.Descriptor.HelpLinkUri = ErrorFactory.GetHelpLink(CType(diagnostic.Code, ERRID))
Microsoft.CodeAnalysis.VisualBasic.Features (3)
CodeFixes\Suppression\VisualBasicSuppressionCodeFixProvider.vb (3)
65Dim title = If(includeTitle, diagnostic.Descriptor.Title.ToString(CultureInfo.CurrentUICulture), Nothing) 179Dim category = SyntaxFactory.LiteralExpression(SyntaxKind.StringLiteralExpression, SyntaxFactory.Literal(diagnostic.Descriptor.Category)) 182Dim title = diagnostic.Descriptor.Title.ToString(CultureInfo.CurrentUICulture)
Microsoft.CodeAnalysis.Workspaces (8)
Diagnostics\DiagnosticData.cs (6)
230diagnostic.Descriptor.Category, 234diagnostic.Descriptor.IsEnabledByDefault, 236diagnostic.Descriptor.ImmutableCustomTags(), 242title: diagnostic.Descriptor.Title.ToString(CultureInfo.CurrentUICulture), 243description: diagnostic.Descriptor.Description.ToString(CultureInfo.CurrentUICulture), 244helpLink: diagnostic.Descriptor.HelpLinkUri,
Shared\Extensions\TelemetryExtensions.cs (1)
56if (diagnostic.Descriptor.ImmutableCustomTags().Any(static t => t == WellKnownDiagnosticTags.Telemetry))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
48=> !diagnostic.Descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary);
Microsoft.Gen.ContextualOptions.Unit.Tests (2)
ParserTests.cs (2)
79Assert.Contains(result!.Single().Diagnostics, diag => diag.Descriptor == DiagDescriptors.ContextCannotBeStatic); 94Assert.Contains(result!.Single().Diagnostics, diag => diag.Descriptor == DiagDescriptors.ContextCannotBeRefLike);
Mvc.Api.Analyzers.Test (2)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest.cs (1)
78Assert.Same(descriptor, diagnostic.Descriptor);
ApiConventionAnalyzerIntegrationTest.cs (1)
294Assert.Same(descriptor, diagnostic.Descriptor);
System.Windows.Forms.Analyzers.CSharp.Tests (3)
Generators\ProjectFileReaderTests.cs (3)
57Assert.Equal(CSharpDiagnosticDescriptors.s_propertyCantBeSetToValue, diagnostic!.Descriptor); 121Assert.Equal(CSharpDiagnosticDescriptors.s_propertyCantBeSetToValueWithReason, diagnostic!.Descriptor); 180Assert.Equal(CSharpDiagnosticDescriptors.s_propertyCantBeSetToValue, diagnostic!.Descriptor);