432 references to Error
AnalyzerRunner (2)
DiagnosticAnalyzerRunner.cs (2)
50.SetItem("AD0001", ReportDiagnostic.Error) 51.SetItem("AD0002", ReportDiagnostic.Error);
BuildActionTelemetryTable (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\EditorConfigSeverityStrings.cs (1)
40reportDiagnostic = ReportDiagnostic.Error;
CodeStyleConfigFileGenerator (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\EditorConfigSeverityStrings.cs (1)
40reportDiagnostic = ReportDiagnostic.Error;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (1)
28DiagnosticSeverity.Error => ReportDiagnostic.Error,
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
CSharpCompiler.cs (1)
201ReportDiagnostic.Error :
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
CSharpCompilerTest.cs (1)
225Assert.Equal(ReportDiagnostic.Error, compilationOptions.GeneralDiagnosticOption);
Microsoft.CodeAnalysis (20)
CommandLine\AnalyzerConfigSet.cs (1)
341severity = ReportDiagnostic.Error;
Diagnostic\CommonMessageProvider.cs (1)
138case ReportDiagnostic.Error:
Diagnostic\Diagnostic.cs (1)
534case ReportDiagnostic.Error:
Diagnostic\DiagnosticDescriptor.cs (2)
260return ReportDiagnostic.Error; 270case ReportDiagnostic.Error:
DiagnosticAnalyzer\AnalyzerDriver.cs (4)
964compilation.Options.GeneralDiagnosticOption == ReportDiagnostic.Error) 966defaultSeverity = ReportDiagnostic.Error; 987compilation.Options.GeneralDiagnosticOption == ReportDiagnostic.Error) 989severity = ReportDiagnostic.Error;
DiagnosticAnalyzer\AnalyzerOptionsExtensions.cs (4)
70if (severity == ReportDiagnostic.Warn && compilation.Options.GeneralDiagnosticOption == ReportDiagnostic.Error) 71severity = ReportDiagnostic.Error; 82if (severity == ReportDiagnostic.Warn && compilation.Options.GeneralDiagnosticOption == ReportDiagnostic.Error) 83severity = ReportDiagnostic.Error;
RuleSet\RuleSet.cs (6)
83case ReportDiagnostic.Error: 232return action1 == ReportDiagnostic.Warn || action1 == ReportDiagnostic.Error || action1 == ReportDiagnostic.Info || action1 == ReportDiagnostic.Hidden; 234return action1 == ReportDiagnostic.Warn || action1 == ReportDiagnostic.Error || action1 == ReportDiagnostic.Info; 236return action1 == ReportDiagnostic.Warn || action1 == ReportDiagnostic.Error; 238return action1 == ReportDiagnostic.Error; 239case ReportDiagnostic.Error:
RuleSet\RuleSetProcessor.cs (1)
215return ReportDiagnostic.Error;
Microsoft.CodeAnalysis.CodeStyle (11)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (1)
277warningLevel: effectiveSeverity.WithDefaultSeverity(descriptor.DefaultSeverity) == ReportDiagnostic.Error ? 0 : 1,
src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
137if (effectiveSeverity is ReportDiagnostic.Warn or ReportDiagnostic.Error)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\EditorConfigSeverityStrings.cs (1)
40reportDiagnostic = ReportDiagnostic.Error;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (3)
40/// Notification option for an error option with <see cref="ReportDiagnostic.Error"/>. 42public static NotificationOption2 Error => new(ReportDiagnostic.Error, false); 50ReportDiagnostic.Error => Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (1)
28DiagnosticSeverity.Error => ReportDiagnostic.Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ReportDiagnosticExtensions.cs (3)
29case ReportDiagnostic.Error: 79ReportDiagnostic.Error => EditorConfigSeverityStrings.Error, 89ReportDiagnostic.Error => NotificationOption2.Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingRule.cs (1)
90case EditorConfigSeverityStrings.Error: return ReportDiagnostic.Error;
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (24)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpVerifierHelper.cs (3)
19/// related to nullability mapped to <see cref="ReportDiagnostic.Error"/>, which is then used to enable all 32.SetItem("CS8632", ReportDiagnostic.Error) 33.SetItem("CS8669", ReportDiagnostic.Error);
src\Features\DiagnosticsTestUtilities\NamingStyles\NamingStylesTestOptionSets.cs (21)
148EnforcementLevel = ReportDiagnostic.Error 179EnforcementLevel = ReportDiagnostic.Error 211EnforcementLevel = ReportDiagnostic.Error 243EnforcementLevel = ReportDiagnostic.Error 275EnforcementLevel = ReportDiagnostic.Error 313EnforcementLevel = ReportDiagnostic.Error 344EnforcementLevel = ReportDiagnostic.Error 375EnforcementLevel = ReportDiagnostic.Error 406EnforcementLevel = ReportDiagnostic.Error 437EnforcementLevel = ReportDiagnostic.Error 469EnforcementLevel = ReportDiagnostic.Error 501EnforcementLevel = ReportDiagnostic.Error 533EnforcementLevel = ReportDiagnostic.Error 565EnforcementLevel = ReportDiagnostic.Error 597EnforcementLevel = ReportDiagnostic.Error 629EnforcementLevel = ReportDiagnostic.Error 661EnforcementLevel = ReportDiagnostic.Error 695EnforcementLevel = ReportDiagnostic.Error 742EnforcementLevel = ReportDiagnostic.Error 749EnforcementLevel = ReportDiagnostic.Error 783EnforcementLevel = ReportDiagnostic.Error
Microsoft.CodeAnalysis.CSharp (15)
CommandLine\CSharpCommandLineParser.cs (3)
884generalDiagnosticOption = ReportDiagnostic.Error; 893warnAsErrors[key] = ReportDiagnostic.Error; 906AddWarnings(warnAsErrors, ReportDiagnostic.Error, valueMemory.Value);
Compilation\CSharpDiagnosticFilter.cs (12)
216if (report == ReportDiagnostic.Warn && generalDiagnosticOption == ReportDiagnostic.Error && !specifiedWarnAsErrorMinus) 218report = ReportDiagnostic.Error; 233!(specifiedWarnAsErrorMinus && severity == DiagnosticSeverity.Warning && reportFromSyntaxTreeOptions == ReportDiagnostic.Error)) 239if (!specifiedWarnAsErrorMinus && report == ReportDiagnostic.Warn && generalDiagnosticOption == ReportDiagnostic.Error) 241report = ReportDiagnostic.Error; 268case ReportDiagnostic.Error: 280if (generalDiagnosticOption == ReportDiagnostic.Error && promoteToAnError()) 282return ReportDiagnostic.Error; 303case ReportDiagnostic.Error: 306return ReportDiagnostic.Error; 327report = ReportDiagnostic.Error; 335Debug.Assert(generalDiagnosticOption == ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
48case ReportDiagnostic.Error:
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (45)
CommandLineTests.cs (44)
2841Assert.True(parsedArgs.CompilationOptions.SpecificDiagnosticOptions["CA1012"] == ReportDiagnostic.Error); 3045Assert.Equal(actual: arguments.CompilationOptions.GeneralDiagnosticOption, expected: ReportDiagnostic.Error); 3077Assert.Equal(actual: arguments.CompilationOptions.GeneralDiagnosticOption, expected: ReportDiagnostic.Error); 3078Assert.Equal(actual: arguments.CompilationOptions.SpecificDiagnosticOptions["Test001"], expected: ReportDiagnostic.Error); 3110Assert.Equal(actual: arguments.CompilationOptions.GeneralDiagnosticOption, expected: ReportDiagnostic.Error); 3144Assert.Equal(actual: arguments.CompilationOptions.SpecificDiagnosticOptions["Test001"], expected: ReportDiagnostic.Error); 3211Assert.Equal(actual: arguments.CompilationOptions.GeneralDiagnosticOption, expected: ReportDiagnostic.Error); 3314Assert.Equal(expected: ReportDiagnostic.Error, actual: arguments.CompilationOptions.GeneralDiagnosticOption); 3478Assert.Equal(expected: ReportDiagnostic.Error, actual: arguments.CompilationOptions.SpecificDiagnosticOptions[warning]); 3481Assert.Equal(expected: ReportDiagnostic.Error, 3483Assert.Equal(expected: ReportDiagnostic.Error, 5432Assert.Equal(ReportDiagnostic.Error, parsedArgs.CompilationOptions.GeneralDiagnosticOption); 5440AssertSpecificDiagnostics(new[] { 1062, 1066, 1734 }, new[] { ReportDiagnostic.Error, ReportDiagnostic.Error, ReportDiagnostic.Error }, parsedArgs); 5446AssertSpecificDiagnostics(new[] { 1062, 1066, 1734 }, new[] { ReportDiagnostic.Error, ReportDiagnostic.Error, ReportDiagnostic.Error }, parsedArgs); 5450Assert.Equal(ReportDiagnostic.Error, parsedArgs.CompilationOptions.GeneralDiagnosticOption); 5458AssertSpecificDiagnostics(new[] { 1062, 1066, 1734 }, new[] { ReportDiagnostic.Error, ReportDiagnostic.Error, ReportDiagnostic.Error }, parsedArgs); 5478new[] { ReportDiagnostic.Error, ReportDiagnostic.Error, ReportDiagnostic.Error, ReportDiagnostic.Default, ReportDiagnostic.Default }, 5486AssertSpecificDiagnostics(new[] { 1062, 1066, 1734, 1974 }, new[] { ReportDiagnostic.Default, ReportDiagnostic.Error, ReportDiagnostic.Error, ReportDiagnostic.Default }, parsedArgs); 5492AssertSpecificDiagnostics(new[] { 1062, 1066, 1734, 1974 }, new[] { ReportDiagnostic.Error, ReportDiagnostic.Default, ReportDiagnostic.Default, ReportDiagnostic.Error }, parsedArgs); 5510AssertSpecificDiagnostics(new[] { 1062, 1974 }, new[] { ReportDiagnostic.Error, ReportDiagnostic.Error }, parsedArgs); 5528AssertSpecificDiagnostics(new[] { 1062, 1066, 1734, 1762 }, new[] { ReportDiagnostic.Suppress, ReportDiagnostic.Suppress, ReportDiagnostic.Suppress, ReportDiagnostic.Error }, parsedArgs); 5534AssertSpecificDiagnostics(new[] { 1062, 1066, 1734, 1762 }, new[] { ReportDiagnostic.Suppress, ReportDiagnostic.Suppress, ReportDiagnostic.Suppress, ReportDiagnostic.Error }, parsedArgs); 13133TestBulkAnalyzerConfigurationCore(analyzer, analyzerConfigText, errorlog, expectedDiagnosticSeverity: ReportDiagnostic.Error); 13179TestBulkAnalyzerConfigurationCore(analyzer, analyzerConfigText, errorlog, warnAsError: true, expectedDiagnosticSeverity: ReportDiagnostic.Error); 13235var expectedDiagnosticSeverity = customConfigurable ? defaultReportDiagnostic : ReportDiagnostic.Error; 13272expectedDiagnosticSeverity = customConfigurable && defaultReportDiagnostic != ReportDiagnostic.Warn ? defaultReportDiagnostic : ReportDiagnostic.Error; 13324TestBulkAnalyzerConfigurationCore(analyzer, analyzerConfigText, errorlog, expectedDiagnosticSeverity: ReportDiagnostic.Error); 13331TestBulkAnalyzerConfigurationCore(analyzer, analyzerConfigText, errorlog, expectedDiagnosticSeverity: ReportDiagnostic.Error); 13404var expectedErrorCode = expectedDiagnosticSeverity == ReportDiagnostic.Error ? 1 : 0; 13409ReportDiagnostic.Error => "error", 13649var expectedErrorCode = !noWarn && analyzerConfigSeverity == ReportDiagnostic.Error ? 1 : 0; 13654(analyzerConfigSeverity == ReportDiagnostic.Error || 13658var prefix = analyzerConfigSeverity == ReportDiagnostic.Error ? "error" : analyzerConfigSeverity == ReportDiagnostic.Warn ? "warning" : "info";
SarifV2ErrorLoggerTests.cs (1)
377(AnalyzerForErrorLogTest.Descriptor1.Id, 0, ImmutableHashSet.Create(ReportDiagnostic.Error))));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (11)
Completion\CompletionProviders\DeclarationNameCompletionProviderTests.cs (1)
3032EnforcementLevel = ReportDiagnostic.Error
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (1)
115Assert.Equal(ReportDiagnostic.Error, namingRule.EnforcementLevel);
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (9)
113[CombinatorialValues(ReportDiagnostic.Warn, ReportDiagnostic.Error, ReportDiagnostic.Info, ReportDiagnostic.Hidden, ReportDiagnostic.Suppress)] 334analyzerSetting.ChangeSeverity(ReportDiagnostic.Error); 357setting.ChangeSeverity(ReportDiagnostic.Error); 411setting0.ChangeSeverity(ReportDiagnostic.Error); 416Assert.Equal(ReportDiagnostic.Error, setting0.Severity); 418setting1.ChangeSeverity(ReportDiagnostic.Error); 419setting2.ChangeSeverity(ReportDiagnostic.Error); 424Assert.Equal(ReportDiagnostic.Error, setting0.Severity); 425Assert.Equal(ReportDiagnostic.Error, setting0.Severity);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (5)
CodeGen\CodeGenTests.cs (1)
36.WithGeneralDiagnosticOption(ReportDiagnostic.Error);
Emit\CompilationEmitTests.cs (4)
5571var options = TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 5579var options = TestOptions.DebugDll.WithSpecificDiagnosticOptions("CS0169", ReportDiagnostic.Error); 5616var options = TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 5624var options = TestOptions.DebugDll.WithSpecificDiagnosticOptions("CS0612", ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (18)
Attributes\AttributeTests_WellKnownAttributes.cs (3)
8793verify(TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error), 8813verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Error)), 8828verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("CS0618", ReportDiagnostic.Error)),
Diagnostics\DiagnosticAnalyzerTests.cs (15)
168new[] { KeyValuePairUtil.Create("CA9999_UseOfVariableThatStartsWithX", ReportDiagnostic.Error) }); 200var options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 286var options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 317specificDiagOptions.Add(noneDiagDescriptor.Id, ReportDiagnostic.Error); 318specificDiagOptions.Add(infoDiagDescriptor.Id, ReportDiagnostic.Error); 319specificDiagOptions.Add(warningDiagDescriptor.Id, ReportDiagnostic.Error); 346specificDiagOptions.Add(warningDiagDescriptor.Id, ReportDiagnostic.Error); 404options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1303var generalOption = ReportDiagnostic.Error; 1313var generalOption = ReportDiagnostic.Error; 1324var generalOption = ReportDiagnostic.Error; 1334var generalOption = ReportDiagnostic.Error; 1347var generalOption = ReportDiagnostic.Error; 1552var options = compilation.Options.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1830if (compilation.Options.GeneralDiagnosticOption == ReportDiagnostic.Error)
Microsoft.CodeAnalysis.CSharp.Features (2)
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaDiagnosticAnalyzer.cs (1)
48case ReportDiagnostic.Error:
UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeRefactoringProvider.cs (1)
51case ReportDiagnostic.Error:
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (4)
ConvertAutoPropertyToFullProperty\ConvertAutoPropertyToFullPropertyTests_OptionSets.cs (3)
94EnforcementLevel = ReportDiagnostic.Error 126EnforcementLevel = ReportDiagnostic.Error 158EnforcementLevel = ReportDiagnostic.Error
ConvertTupleToStruct\ConvertTupleToStructTests.cs (1)
403EnforcementLevel = ReportDiagnostic.Error
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (34)
Semantics\NullableReferenceTypesTests.cs (30)
125155WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125164comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithSpecificDiagnosticOptions(id, ReportDiagnostic.Error)); 125174WithSpecificDiagnosticOptions(id, ReportDiagnostic.Error). 125185WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125201WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125221WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125322WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125325comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithSpecificDiagnosticOptions(id1, id2, ReportDiagnostic.Error)); 125329WithSpecificDiagnosticOptions(id1, id2, ReportDiagnostic.Error). 125334WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125343WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125355WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125490WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125499comp = CreateCompilation(new[] { source, source2 }, options: options.WithSpecificDiagnosticOptions(id, ReportDiagnostic.Error)); 125509WithSpecificDiagnosticOptions(id, ReportDiagnostic.Error). 125520WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125536WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 125556WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126014WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126018comp = CreateCompilation(new[] { source, source2 }, options: compilationOptions.WithSpecificDiagnosticOptions(id, ReportDiagnostic.Error)); 126023WithSpecificDiagnosticOptions(id, ReportDiagnostic.Error). 126029WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126040WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126055WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126160WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126164comp = CreateCompilation(new[] { source, source2 }, options: options.WithSpecificDiagnosticOptions(id, ReportDiagnostic.Error)); 126169WithSpecificDiagnosticOptions(id, ReportDiagnostic.Error). 126175WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126186WithGeneralDiagnosticOption(ReportDiagnostic.Error)); 126201WithGeneralDiagnosticOption(ReportDiagnostic.Error));
Semantics\StructConstructorTests.cs (1)
3901CreateCompilation(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(GetIdForErrorCode(ErrorCode.WRN_UnassignedThisSupportedVersion), ReportDiagnostic.Error), parseOptions: TestOptions.Regular11)
Semantics\UninitializedNonNullableFieldTests.cs (1)
2785options = options.WithGeneralDiagnosticOption(ReportDiagnostic.Error);
SourceGeneration\GeneratorDriverTests.cs (2)
1193verifyDiagnosticsWithOptions(options.WithSpecificDiagnosticOptions("GEN001", ReportDiagnostic.Error), 1197verifyDiagnosticsWithOptions(options.WithSpecificDiagnosticOptions("GEN002", ReportDiagnostic.Error),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (10)
Compilation\CompilationAPITests.cs (3)
126var options = WithDiagnosticOptions(tree, ("CS0078", ReportDiagnostic.Error)); 149CreateImmutableDictionary(("CS0078", ReportDiagnostic.Error))); 170(newTree, new[] { ("CS0078", ReportDiagnostic.Error) })
Compilation\CSharpCompilationOptionsTests.cs (5)
87new Dictionary<string, ReportDiagnostic> { { "CS0001", ReportDiagnostic.Error } }.ToImmutableDictionary()); 126new Dictionary<string, ReportDiagnostic> { { "CS0001", ReportDiagnostic.Error } }.ToImmutableDictionary()); 196Assert.Equal(ReportDiagnostic.Error, new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithGeneralDiagnosticOption(ReportDiagnostic.Error).GeneralDiagnosticOption); 230{ MessageProvider.Instance.GetIdForErrorCode(1), ReportDiagnostic.Error },
Compilation\GetUnusedImportDirectivesTests.cs (1)
379var comp = CreateCompilation(source, options: TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error));
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
7116var compOptions = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (41)
Diagnostics\DiagnosticTest.cs (41)
574option = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error); 580warnings[MessageProvider.Instance.GetIdForErrorCode(420)] = ReportDiagnostic.Error; 621warnings[MessageProvider.Instance.GetIdForErrorCode(168)] = ReportDiagnostic.Error; 643option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 674warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 690option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 725warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 747option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 781warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 803option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 837warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 859option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 895warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 917option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 953warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 975option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1012warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1040option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1082warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1116option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1153warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1181option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1218warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1234option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1271warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1287option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1325warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1341option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1375warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1385option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1426warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1442option = commonoption.WithWarningLevel(2).WithGeneralDiagnosticOption(ReportDiagnostic.Error); 1482warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1549warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1599warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1655warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1702warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1739warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1772warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 1821warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error); 2245warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Error);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeStyle\CSharpEditorConfigCodeStyleParserTests.cs (4)
45[InlineData("when_on_single_line:error", (int)ExpressionBodyPreference.WhenOnSingleLine, ReportDiagnostic.Error)] 50[InlineData("when_on_single_line : error", (int)ExpressionBodyPreference.WhenOnSingleLine, ReportDiagnostic.Error)] 58severity ??= ReportDiagnostic.Error; 74severity ??= ReportDiagnostic.Error;
Microsoft.CodeAnalysis.EditorFeatures (2)
EditorConfigSettings\Data\CodeStyleSetting.cs (1)
41ReportDiagnostic.Error => NotificationOption2.Error,
EditorConfigSettings\Updater\SettingsUpdateHelper.cs (1)
72ReportDiagnostic.Error => "error",
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\DiagnosticServiceTests.vb (1)
306changeSeverityDiagOptions.Add(workspaceDiagnosticAnalyzer.DiagDescriptor.Id, ReportDiagnostic.Error)
Microsoft.CodeAnalysis.Features (2)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (1)
277warningLevel: effectiveSeverity.WithDefaultSeverity(descriptor.DefaultSeverity) == ReportDiagnostic.Error ? 0 : 1,
src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
137if (effectiveSeverity is ReportDiagnostic.Warn or ReportDiagnostic.Error)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Diagnostics\PullDiagnosticTests.cs (1)
1805projectInfo = projectInfo.WithCompilationOptions(projectInfo.CompilationOptions!.WithGeneralDiagnosticOption(ReportDiagnostic.Error));
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
DeterministicKeyBuilderTests.cs (2)
388]", ("CA109", ReportDiagnostic.Error)); 398]", ("CA109", ReportDiagnostic.Error), ("CA200", ReportDiagnostic.Warn));
Microsoft.CodeAnalysis.Test.Utilities (4)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
435ReportDiagnostic.Error => "error",
Diagnostics\DiagnosticExtensions.cs (2)
234var toggledOption = c.Options.GeneralDiagnosticOption == ReportDiagnostic.Error ? 236ReportDiagnostic.Error;
Diagnostics\ReportDiagnosticExtensions.cs (1)
17ReportDiagnostic.Error => "error",
Microsoft.CodeAnalysis.UnitTests (21)
Analyzers\AnalyzerConfigTests.cs (10)
965CreateImmutableDictionary(("cs000", ReportDiagnostic.Error)), 1014CreateImmutableDictionary(("cs000", ReportDiagnostic.Error)), 1015CreateImmutableDictionary(("cs000", ReportDiagnostic.Error)), 1042CreateImmutableDictionary(("cs000", ReportDiagnostic.Error)), 1141("cs001", ReportDiagnostic.Error)), 1195("cs001", ReportDiagnostic.Error)), 1411new[] { ("cs000", ReportDiagnostic.Error) }, 2034("cs001", ReportDiagnostic.Error)), 2056CreateImmutableDictionary(("cs000", ReportDiagnostic.Error)) 2103CreateImmutableDictionary(("cs000", ReportDiagnostic.Error)),
CommonCommandLineParserTests.cs (11)
167Assert.Equal(expected: ReportDiagnostic.Error, actual: ruleSet.SpecificDiagnosticOptions["CA1012"]); 411Assert.Equal(ReportDiagnostic.Error, ruleSet.SpecificDiagnosticOptions["CA1012"]); 586Assert.Equal(ReportDiagnostic.Error, ruleSet.GeneralDiagnosticOption); 624Assert.Equal(ReportDiagnostic.Error, ruleSet.GeneralDiagnosticOption); 628Assert.Equal(ReportDiagnostic.Error, ruleSet.SpecificDiagnosticOptions["CA1013"]); 662Assert.Equal(ReportDiagnostic.Error, ruleSet.GeneralDiagnosticOption); 767Assert.Equal(ReportDiagnostic.Error, ruleSet.SpecificDiagnosticOptions["CA1013"]); 817Assert.Equal(ReportDiagnostic.Error, ruleSet.SpecificDiagnosticOptions["CA1013"]); 841Assert.Equal(ReportDiagnostic.Error, ruleSet.GeneralDiagnosticOption); 914Assert.Equal(ReportDiagnostic.Error, ruleSet.SpecificDiagnosticOptions["CA1013"]); 954Assert.Equal(ReportDiagnostic.Error, ruleSet.SpecificDiagnosticOptions["CA2100"]);
Microsoft.CodeAnalysis.VisualBasic (11)
CommandLine\VisualBasicCommandLineParser.vb (4)
828generalDiagnosticOption = ReportDiagnostic.Error 833specificDiagnosticOptionsFromGeneralArguments.Add(pair.Key, ReportDiagnostic.Error) 840AddWarnings(specificDiagnosticOptionsFromSpecificArguments, ReportDiagnostic.Error, ParseWarnings(value)) 871If pair.Value <> ReportDiagnostic.Error Then
Compilation\VisualBasicDiagnosticFilter.vb (7)
166If report = ReportDiagnostic.Warn AndAlso generalDiagnosticOption = ReportDiagnostic.Error AndAlso Not specifiedWarnAsErrorMinus Then 167report = ReportDiagnostic.Error 183Not (specifiedWarnAsErrorMinus AndAlso severity = DiagnosticSeverity.Warning AndAlso reportFromSyntaxTreeOptions = ReportDiagnostic.Error) Then 188If Not specifiedWarnAsErrorMinus AndAlso report = ReportDiagnostic.Warn AndAlso generalDiagnosticOption = ReportDiagnostic.Error Then 189report = ReportDiagnostic.Error 223If (generalDiagnosticOption = ReportDiagnostic.Error) AndAlso (severity = DiagnosticSeverity.Warning) Then 228Return ReportDiagnostic.Error
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (19)
CommandLineTests.vb (19)
291Assert.Equal(cmd.Arguments.CompilationOptions.GeneralDiagnosticOption, ReportDiagnostic.Error) 294Assert.Equal(cmd.Arguments.CompilationOptions.GeneralDiagnosticOption, ReportDiagnostic.Error) 2843Assert.True(parsedArgs.CompilationOptions.SpecificDiagnosticOptions("CA1012") = ReportDiagnostic.Error) 5777Assert.Equal(ReportDiagnostic.Error, parsedArgs.CompilationOptions.GeneralDiagnosticOption) 5781Assert.Equal(ReportDiagnostic.Error, parsedArgs.CompilationOptions.GeneralDiagnosticOption) 5790AssertSpecificDiagnostics({42024, 42025}, {ReportDiagnostic.Error, ReportDiagnostic.Error}, parsedArgs) 5799AssertSpecificDiagnostics({42024, 42025}, {ReportDiagnostic.Error, ReportDiagnostic.Error}, parsedArgs) 8693Assert.Equal(expected:=ReportDiagnostic.Error, actual:=arguments.CompilationOptions.GeneralDiagnosticOption) 8713Assert.Equal(expected:=ReportDiagnostic.Error, actual:=arguments.CompilationOptions.GeneralDiagnosticOption) 8715Assert.Equal(expected:=ReportDiagnostic.Error, actual:=arguments.CompilationOptions.SpecificDiagnosticOptions("Test001")) 8734Assert.Equal(expected:=ReportDiagnostic.Error, actual:=arguments.CompilationOptions.GeneralDiagnosticOption) 8757Assert.Equal(expected:=ReportDiagnostic.Error, actual:=arguments.CompilationOptions.SpecificDiagnosticOptions("Test001")) 8797Assert.Equal(expected:=ReportDiagnostic.Error, actual:=arguments.CompilationOptions.GeneralDiagnosticOption) 8840Assert.Equal(expected:=ReportDiagnostic.Error, actual:=arguments.CompilationOptions.GeneralDiagnosticOption) 8842Assert.Equal(expected:=ReportDiagnostic.Error, actual:=arguments.CompilationOptions.SpecificDiagnosticOptions("Test001")) 8886Assert.Equal(expected:=ReportDiagnostic.Error, actual:=arguments.CompilationOptions.SpecificDiagnosticOptions("Test001")) 8907Assert.Equal(expected:=ReportDiagnostic.Error, actual:=arguments.CompilationOptions.GeneralDiagnosticOption)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (24)
Compilation\CompilationAPITests.vb (2)
113New TestSyntaxTreeOptionsProvider(tree, ("BC42024", ReportDiagnostic.Error))) 137(newTree, {("BC4024", ReportDiagnostic.Error)})))
Compilation\VisualBasicCompilationOptionsTests.vb (8)
41New Dictionary(Of String, ReportDiagnostic) From {{"VB0001", ReportDiagnostic.Error}}.ToImmutableDictionary()) 116New Dictionary(Of String, ReportDiagnostic) From {{"VB0001", ReportDiagnostic.Error}}.ToImmutableDictionary()) 452options = commonoption.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 463warnings.Add(MessageProvider.Instance.GetIdForErrorCode(42105), ReportDiagnostic.Error) 475warnings.Add(MessageProvider.Instance.GetIdForErrorCode(42105), ReportDiagnostic.Error) 476warnings.Add(MessageProvider.Instance.GetIdForErrorCode(42099), ReportDiagnostic.Error) 489options = commonoption.WithSpecificDiagnosticOptions(New ReadOnlyDictionary(Of String, ReportDiagnostic)(warnings)).WithGeneralDiagnosticOption(ReportDiagnostic.Error) 499warnings.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Error)
Diagnostics\DiagnosticAnalyzerTests.vb (12)
63specificDiagOptions.Add(noneDiagDescriptor.Id, ReportDiagnostic.[Error]) 64specificDiagOptions.Add(infoDiagDescriptor.Id, ReportDiagnostic.[Error]) 65specificDiagOptions.Add(warningDiagDescriptor.Id, ReportDiagnostic.[Error]) 92specificDiagOptions.Add(warningDiagDescriptor.Id, ReportDiagnostic.[Error]) 147options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 774Dim generalOption = ReportDiagnostic.Error 783Dim generalOption = ReportDiagnostic.Error 793Dim generalOption = ReportDiagnostic.Error 802Dim generalOption = ReportDiagnostic.Error 814Dim generalOption = ReportDiagnostic.Error 899Dim options = compilation.Options.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 1291If compilation.Options.GeneralDiagnosticOption = ReportDiagnostic.Error Then
SourceGeneration\GeneratorDriverTests.vb (2)
206warnings.Add("GEN001", ReportDiagnostic.Error) 212warnings.Add("GEN002", ReportDiagnostic.Error)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (24)
Parser\ParseDirectives.vb (24)
2786diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Error) 2796compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 2826diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Error) 2836compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 2866diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Error) 2876compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 2906diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Error) 2916compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 2946diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Error) 2959compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 2991diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Error) 3004compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 3037diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Error) 3049compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 3080diagOptions.Add("Bc42024", ReportDiagnostic.Error) 3092compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 3129diagOptions.Add("BC42024", ReportDiagnostic.Error) 3141compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 3219diagOptions.Add("soMeId", ReportDiagnostic.Error) 3229compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 3261diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Error) 3274compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error) 3326diagOptions.Add("__someThing_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678902345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678902345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678902345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", ReportDiagnostic.Error) 3336compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Error)
Microsoft.CodeAnalysis.Workspaces (12)
CodeStyle\NotificationOption2_operators.cs (2)
18ReportDiagnostic.Error => NotificationOption.Error, 32ReportDiagnostic.Error => WorkspacesResources.Error,
Diagnostics\DiagnosticData.cs (1)
317case ReportDiagnostic.Error:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\EditorConfigSeverityStrings.cs (1)
40reportDiagnostic = ReportDiagnostic.Error;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (3)
40/// Notification option for an error option with <see cref="ReportDiagnostic.Error"/>. 42public static NotificationOption2 Error => new(ReportDiagnostic.Error, false); 50ReportDiagnostic.Error => Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions_Shared.cs (1)
28DiagnosticSeverity.Error => ReportDiagnostic.Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ReportDiagnosticExtensions.cs (3)
29case ReportDiagnostic.Error: 79ReportDiagnostic.Error => EditorConfigSeverityStrings.Error, 89ReportDiagnostic.Error => NotificationOption2.Error,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingRule.cs (1)
90case EditorConfigSeverityStrings.Error: return ReportDiagnostic.Error;
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Options\OptionsTestHelpers.cs (1)
170EnforcementLevel = ReportDiagnostic.Error
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
CodeStyle\EditorConfigCodeStyleParserTests.cs (6)
20[InlineData("true:error", true, ReportDiagnostic.Error)] 27[InlineData("false:error", false, ReportDiagnostic.Error)] 35[InlineData("true : error", true, ReportDiagnostic.Error)] 36[InlineData("false : error", false, ReportDiagnostic.Error)] 50[InlineData("omit_if_default:error", AccessibilityModifiersRequired.OmitIfDefault, ReportDiagnostic.Error)] 54[InlineData("omit_if_default : error", AccessibilityModifiersRequired.OmitIfDefault, ReportDiagnostic.Error)]
EditorConfigStorageLocation\NamingStylePreferenceEditorConfigStorageLocationTests.cs (1)
36Assert.Equal(ReportDiagnostic.Error, value.Rules.NamingRules[0].EnforcementLevel);
SolutionTests\SolutionTests.cs (5)
4700Assert.Equal(ReportDiagnostic.Error, severity); 4729Assert.Equal(ReportDiagnostic.Error, severity); 4770Assert.Equal(ReportDiagnostic.Error, severity); 4783Assert.Equal(ReportDiagnostic.Error, severity); 4814Assert.Equal(ReportDiagnostic.Error, severity);
Microsoft.VisualStudio.LanguageServices (8)
EditorConfigSettings\Analyzers\View\ColumnDefinitions\AnalyzerSeverityColumnDefinition.cs (1)
48CodeAnalysis.ReportDiagnostic.Error => ServicesVSResources.Error,
EditorConfigSettings\Analyzers\ViewModel\SeverityViewModel.cs (2)
55ReportDiagnostic.Error => 4, 764 => ReportDiagnostic.Error,
EditorConfigSettings\CodeStyle\ViewModel\CodeStyleSeverityViewModel.cs (2)
56ReportDiagnostic.Error => 3, 703 => ReportDiagnostic.Error,
EditorConfigSettings\NamingStyle\View\ColumnDefinitions\NamingStylesSeverityColumnDefinition.cs (1)
54ReportDiagnostic.Error => ServicesVSResources.Error,
EditorConfigSettings\NamingStyle\ViewModel\ColumnViewModels\NamingStylesSeverityViewModel.cs (2)
25ReportDiagnostic.Error => 4, 404 => ReportDiagnostic.Error,
Microsoft.VisualStudio.LanguageServices.CSharp (3)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (3)
77generalDiagnosticOption = warningsAreErrors.Value ? ReportDiagnostic.Error : ReportDiagnostic.Default; 98diagnosticOptions[pair.Key] = ReportDiagnostic.Error; 106diagnosticOptions[diagnosticID] = ReportDiagnostic.Error;
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (11)
ProjectSystemShim\CPS\AnalyzersTests.cs (2)
44Assert.Equal(expected: ReportDiagnostic.Error, actual: options.GeneralDiagnosticOption); 68Assert.Equal(expected: ReportDiagnostic.Error, actual: ca1012DiagnosticOption);
ProjectSystemShim\CPS\CSharpCompilerOptionsTests.cs (1)
51Assert.Equal(expected: ReportDiagnostic.Error, actual: options.SpecificDiagnosticOptions["CS1111"]);
ProjectSystemShim\LegacyProject\AnalyzersTests.cs (7)
47Assert.Equal(expected: ReportDiagnostic.Error, actual: options.GeneralDiagnosticOption); 89Assert.Equal(expected: ReportDiagnostic.Error, actual: options.GeneralDiagnosticOption); 113Assert.Equal(expected: ReportDiagnostic.Error, actual: ca1012DiagnosticOption); 137Assert.Equal(expected: ReportDiagnostic.Error, actual: ca1014DiagnosticOption); 178Assert.Equal(expected: ReportDiagnostic.Error, actual: options.SpecificDiagnosticOptions["CS1014"]); 186Assert.Equal(expected: ReportDiagnostic.Error, actual: options.SpecificDiagnosticOptions["CS1014"]); 248Assert.Equal(expected: ReportDiagnostic.Error, actual: options.GeneralDiagnosticOption);
ProjectSystemShim\LegacyProject\CSharpCompilerOptionsTests.cs (1)
96Assert.Equal(expected: ReportDiagnostic.Error, actual: options.SpecificDiagnosticOptions["CS1111"]);
Microsoft.VisualStudio.LanguageServices.UnitTests (15)
ProjectSystemShim\ConvertedVisualBasicProjectOptionsTests.vb (10)
27Assert.Equal(expected:=ReportDiagnostic.Error, actual:=convertedOptions.GeneralDiagnosticOption) 40Assert.Equal(expected:=ReportDiagnostic.Error, actual:=convertedOptions.GeneralDiagnosticOption) 42Assert.Equal(expected:=ReportDiagnostic.Error, actual:=convertedOptions.SpecificDiagnosticOptions("Test001")) 54Assert.Equal(expected:=ReportDiagnostic.Error, actual:=convertedOptions.GeneralDiagnosticOption) 71Assert.Equal(expected:=ReportDiagnostic.Error, actual:=convertedOptions.GeneralDiagnosticOption) 73Assert.Equal(expected:=ReportDiagnostic.Error, actual:=convertedOptions.SpecificDiagnosticOptions("Test001")) 88Assert.Equal(expected:=ReportDiagnostic.Error, actual:=convertedOptions.GeneralDiagnosticOption) 105Assert.Equal(expected:=ReportDiagnostic.Error, actual:=convertedOptions.GeneralDiagnosticOption) 115{"Test001", ReportDiagnostic.Error}, 126Assert.Equal(expected:=ReportDiagnostic.Error, actual:=convertedOptions.SpecificDiagnosticOptions("Test001"))
ProjectSystemShim\VisualBasicCompilerOptionsTests.vb (1)
191Assert.Equal(ReportDiagnostic.Error, options.SpecificDiagnosticOptions("BC1234"))
SolutionExplorer\AnalyzerCommandHandlerTests.vb (1)
23Dim diagnosticItem = New DiagnosticItem(projectId:=Nothing, analyzerReference:=Nothing, descriptor, ReportDiagnostic.Error, commandHandler:=Nothing)
SolutionExplorer\DiagnosticItemTests.vb (1)
17Dim diagnostic = New DiagnosticItem(projectId:=Nothing, analyzerReference:=Nothing, descriptor, ReportDiagnostic.Error, commandHandler:=Nothing)
SolutionExplorer\RuleSetDocumentExtensionsTests.vb (2)
20document.SetSeverity("Alpha.Analyzer", "Test001", ReportDiagnostic.Error) 95document.SetSeverity("Alpha.Analyzer", "Test001", ReportDiagnostic.Error)
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
ProjectSystemShim\VisualBasicProject.OptionsProcessor.vb (4)
274diagnosticOptions(pair.Key) = ReportDiagnostic.Error 280If pair.Value <> ReportDiagnostic.Error Then 288diagnosticOptions(diagnosticID) = ReportDiagnostic.Error 316Return ReportDiagnostic.Error
System.Windows.Forms.Analyzers.CSharp.Tests (3)
Analyzers\Verifiers\CSharpVerifierHelper.cs (3)
16/// related to nullability mapped to <see cref="ReportDiagnostic.Error"/>, which is then used to enable all 29.SetItem("CS8632", ReportDiagnostic.Error) 30.SetItem("CS8669", ReportDiagnostic.Error);