1 write to DefaultSeverity
Microsoft.CodeAnalysis (1)
Diagnostic\DiagnosticDescriptor.cs (1)
188this.DefaultSeverity = defaultSeverity;
76 references to DefaultSeverity
AnalyzerRunner (1)
Program.cs (1)
164diagnosticStatistics[diagnostic.Id] = (description, diagnostic.Descriptor.DefaultSeverity, existing.count + 1);
BuildActionTelemetryTable (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
263descriptor.Category, descriptor.DefaultSeverity, descriptor.IsEnabledByDefault,
CodeStyleConfigFileGenerator (2)
Program.cs (2)
139severity == rule.DefaultSeverity) 191effectiveSeverity: isEnabledInNonDefaultMode ? DiagnosticSeverity.Warning : rule.DefaultSeverity);
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (2)
63DiagnosticDescriptors.RoutePatternIssue.DefaultSeverity, 106DiagnosticDescriptors.RoutePatternUnusedParameter.DefaultSeverity,
Microsoft.CodeAnalysis (15)
CommandLine\SarifDiagnosticComparer.cs (3)
50&& x.DefaultSeverity == y.DefaultSeverity 67Hash.Combine(((int)obj.DefaultSeverity).GetHashCode(),
CommandLine\SarifErrorLogger.cs (1)
90Debug.Assert(diagnostic.DefaultSeverity == diagnostic.Descriptor.DefaultSeverity);
CommandLine\SarifV1ErrorLogger.cs (1)
175_writer.Write("defaultLevel", GetLevel(descriptor.DefaultSeverity));
CommandLine\SarifV2ErrorLogger.cs (2)
333var defaultSeverity = descriptor.IsEnabledByDefault ? DiagnosticDescriptor.MapSeverityToReport(descriptor.DefaultSeverity) : ReportDiagnostic.Suppress; 425string defaultLevel = GetLevel(descriptor.DefaultSeverity);
Diagnostic\CustomObsoleteDiagnosticInfo.cs (1)
99defaultSeverity: baseDescriptor.DefaultSeverity,
Diagnostic\Diagnostic.cs (2)
120return Create(descriptor, location, effectiveSeverity: descriptor.DefaultSeverity, additionalLocations, properties, messageArgs); 321public virtual DiagnosticSeverity DefaultSeverity { get { return this.Descriptor.DefaultSeverity; } }
Diagnostic\DiagnosticDescriptor.cs (3)
205this.DefaultSeverity == other.DefaultSeverity && 222Hash.Combine(((int)this.DefaultSeverity).GetHashCode(),
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
947DiagnosticDescriptor.MapSeverityToReport(descriptor.DefaultSeverity) :
DiagnosticAnalyzer\AnalyzerManager.cs (1)
396severity = isSuppressed ? ReportDiagnostic.Suppress : DiagnosticDescriptor.MapSeverityToReport(diag.DefaultSeverity);
Microsoft.CodeAnalysis.CodeStyle (9)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
238if (descriptor.IsEnabledByDefault && descriptor.DefaultSeverity >= _minimumReportedSeverity.Value)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (3)
274effectiveSeverity.ToDiagnosticSeverity() ?? descriptor.DefaultSeverity, 275descriptor.DefaultSeverity, 277warningLevel: effectiveSeverity.WithDefaultSeverity(descriptor.DefaultSeverity) == ReportDiagnostic.Error ? 0 : 1,
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
536NotificationOption2.ForSeverity(rule.DefaultSeverity),
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (2)
143notificationOption = descriptor.DefaultSeverity.ToNotificationOption(isOverridenSeverity: false); 148notificationOption = descriptor.DefaultSeverity.ToNotificationOption(isOverridenSeverity: false);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
256NotificationOption2.ForSeverity(s_unnecessaryCodeDescriptor.DefaultSeverity),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
263descriptor.Category, descriptor.DefaultSeverity, descriptor.IsEnabledByDefault,
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (1)
src\Features\DiagnosticsTestUtilities\CodeActions\CodeFixVerifierHelper.cs (1)
74if (!descriptor.IsEnabledByDefault || descriptor.DefaultSeverity == DiagnosticSeverity.Hidden)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (2)
77NotificationOption2.ForSeverity(UnnecessaryCodeDescriptor.DefaultSeverity), 117NotificationOption2.ForSeverity(UnnecessaryCodeDescriptor.DefaultSeverity),
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (2)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
48=> descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary) && descriptor.DefaultSeverity == DiagnosticSeverity.Hidden;
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryPatternParenthesesTests.cs (1)
46=> descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary) && descriptor.DefaultSeverity == DiagnosticSeverity.Hidden;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
13623analyzerConfigSeverity = DiagnosticDescriptor.MapSeverityToReport(descriptor.DefaultSeverity);
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (2)
77NotificationOption2.ForSeverity(UnnecessaryCodeDescriptor.DefaultSeverity), 117NotificationOption2.ForSeverity(UnnecessaryCodeDescriptor.DefaultSeverity),
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
48=> descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary) && descriptor.DefaultSeverity == DiagnosticSeverity.Hidden;
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryPatternParenthesesTests.cs (1)
46=> descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary) && descriptor.DefaultSeverity == DiagnosticSeverity.Hidden;
Microsoft.CodeAnalysis.EditorFeatures (1)
EditorConfigSettings\Data\AnalyzerSetting.cs (1)
29effectiveSeverity = descriptor.DefaultSeverity.ToReportDiagnostic();
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
Diagnostics\DiagnosticServiceTests.vb (3)
294Assert.Equal(workspaceDiagnosticAnalyzer.DiagDescriptor.DefaultSeverity, diagnostics(0).Severity) 295Assert.Equal(workspaceDiagnosticAnalyzer.DiagDescriptor.DefaultSeverity, diagnostics(0).DefaultSeverity) 313Assert.Equal(workspaceDiagnosticAnalyzer.DiagDescriptor.DefaultSeverity, diagnostics(0).DefaultSeverity)
Microsoft.CodeAnalysis.Features (11)
Diagnostics\DiagnosticAnalyzerExtensions.cs (1)
30? descriptor.DefaultSeverity.ToReportDiagnostic()
EditAndContinue\RudeEditDiagnostic.cs (2)
51=> EditAndContinueDiagnosticDescriptors.GetDescriptor(kind).DefaultSeverity; 57=> diagnostic.Descriptor.DefaultSeverity == DiagnosticSeverity.Error;
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
238if (descriptor.IsEnabledByDefault && descriptor.DefaultSeverity >= _minimumReportedSeverity.Value)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (3)
274effectiveSeverity.ToDiagnosticSeverity() ?? descriptor.DefaultSeverity, 275descriptor.DefaultSeverity, 277warningLevel: effectiveSeverity.WithDefaultSeverity(descriptor.DefaultSeverity) == ReportDiagnostic.Error ? 0 : 1,
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
536NotificationOption2.ForSeverity(rule.DefaultSeverity),
src\Analyzers\Core\Analyzers\SimplifyTypeNames\SimplifyTypeNamesDiagnosticAnalyzerBase.cs (2)
143notificationOption = descriptor.DefaultSeverity.ToNotificationOption(isOverridenSeverity: false); 148notificationOption = descriptor.DefaultSeverity.ToNotificationOption(isOverridenSeverity: false);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerDiagnosticAnalyzer.cs (1)
256NotificationOption2.ForSeverity(s_unnecessaryCodeDescriptor.DefaultSeverity),
Microsoft.CodeAnalysis.Test.Utilities (14)
Diagnostics\CommonDiagnosticAnalyzers.cs (13)
109var effectiveSeverity1 = warnAsError || Descriptor1.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning"; 110var effectiveSeverity2 = warnAsError || Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning"; 151""defaultLevel"": """ + (Descriptor1.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 165""defaultLevel"": """ + (Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 192""level"": """ + (Descriptor1.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 216""level"": """ + (Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 228""defaultLevel"": """ + (Descriptor1.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 242""defaultLevel"": """ + (Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 264var effectiveSeverity1 = warnAsError || Descriptor1.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning"; 265var effectiveSeverity2 = warnAsError || Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning"; 326""level"": """ + (Descriptor1.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 358""level"": """ + (Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @""", 487""level"": """ + (Descriptor2.DefaultSeverity == DiagnosticSeverity.Error ? "error" : "warning") + @"""
Diagnostics\DescriptorFactory.cs (1)
24/// - <see cref="DiagnosticDescriptor.DefaultSeverity"/> set to <see cref="DiagnosticSeverity.Hidden"/>
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.UnitTests (1)
src\Analyzers\VisualBasic\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryParenthesesTests.vb (1)
34Return descriptor.ImmutableCustomTags().Contains(WellKnownDiagnosticTags.Unnecessary) And descriptor.DefaultSeverity = DiagnosticSeverity.Hidden
Microsoft.CodeAnalysis.Workspaces (3)
Diagnostics\DiagnosticData.cs (2)
298effectiveSeverity = GetEffectiveSeverity(reportDiagnostic, descriptor.DefaultSeverity); 302effectiveSeverity = descriptor.DefaultSeverity;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (1)
263descriptor.Category, descriptor.DefaultSeverity, descriptor.IsEnabledByDefault,
Microsoft.Interop.ComInterfaceGenerator (2)
ComInterfaceGenerator.cs (2)
511.Where(context => context.Diagnostics.All(diag => diag.Descriptor.DefaultSeverity != DiagnosticSeverity.Error)) 613.Where(context => context.UnmanagedToManagedStub.Diagnostics.All(diag => diag.Descriptor.DefaultSeverity != DiagnosticSeverity.Error))
Microsoft.VisualStudio.LanguageServices (1)
TaskList\ProjectExternalErrorReporter.cs (1)
283defaultSeverity = descriptor.DefaultSeverity;