397 references to Suppress
BuildActionTelemetryTable (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\EditorConfigSeverityStrings.cs (1)
23reportDiagnostic = ReportDiagnostic.Suppress;
CodeStyleConfigFileGenerator (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\EditorConfigSeverityStrings.cs (1)
23reportDiagnostic = ReportDiagnostic.Suppress;
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (3)
CSharpCompiler.cs (3)
172{"CS1701", ReportDiagnostic.Suppress}, // Binding redirects 173{"CS1702", ReportDiagnostic.Suppress}, 174{"CS1705", ReportDiagnostic.Suppress}
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (3)
CSharpCompilerTest.cs (3)
102Assert.Equal(ReportDiagnostic.Suppress, item.Value); 107Assert.Equal(ReportDiagnostic.Suppress, item.Value); 112Assert.Equal(ReportDiagnostic.Suppress, item.Value);
Microsoft.CodeAnalysis (19)
CommandLine\AnalyzerConfigSet.cs (1)
361severity = ReportDiagnostic.Suppress;
CommandLine\SarifV2ErrorLogger.cs (1)
333var defaultSeverity = descriptor.IsEnabledByDefault ? DiagnosticDescriptor.MapSeverityToReport(descriptor.DefaultSeverity) : ReportDiagnostic.Suppress;
Diagnostic\CommonMessageProvider.cs (1)
146case ReportDiagnostic.Suppress:
Diagnostic\Diagnostic.cs (1)
531case ReportDiagnostic.Suppress:
Diagnostic\DiagnosticDescriptor.cs (2)
245return effectiveDiagnostic != null ? MapSeverityToReport(effectiveDiagnostic.Severity) : ReportDiagnostic.Suppress; 278case ReportDiagnostic.Suppress:
Diagnostic\SuppressionDescriptor.cs (1)
110reportDiagnostic == ReportDiagnostic.Suppress;
DiagnosticAnalyzer\AnalyzerDriver.cs (4)
373Debug.Assert(!severityFilter.Contains(ReportDiagnostic.Suppress)); 948ReportDiagnostic.Suppress; 1403configuredSeverity = ReportDiagnostic.Suppress; 1406if (configuredSeverity != ReportDiagnostic.Suppress)
DiagnosticAnalyzer\AnalyzerManager.cs (3)
325if (configuredValue != ReportDiagnostic.Suppress && !severityFilter.Contains(configuredValue)) 392isSuppressed = severity == ReportDiagnostic.Suppress; 396severity = isSuppressed ? ReportDiagnostic.Suppress : DiagnosticDescriptor.MapSeverityToReport(diag.DefaultSeverity);
RuleSet\RuleSet.cs (4)
81case ReportDiagnostic.Suppress: 91if (item.Value != ReportDiagnostic.Suppress && item.Value != ReportDiagnostic.Default) 119if (ruleSetInclude.Action == ReportDiagnostic.Suppress) 229case ReportDiagnostic.Suppress:
RuleSet\RuleSetProcessor.cs (1)
227return ReportDiagnostic.Suppress;
Microsoft.CodeAnalysis.CodeStyle (23)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
163if (notification?.Severity == ReportDiagnostic.Suppress)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (1)
278effectiveSeverity == ReportDiagnostic.Suppress,
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
142applicableRule.EnforcementLevel == ReportDiagnostic.Suppress)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
107if (severity == ReportDiagnostic.Suppress)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (5)
226option.Notification.Severity == ReportDiagnostic.Suppress) 256Debug.Assert(unusedValueExpressionStatementSeverity.Severity != ReportDiagnostic.Suppress || 257unusedValueAssignmentSeverity.Severity != ReportDiagnostic.Suppress || 258unusedParametersSeverity.Severity != ReportDiagnostic.Suppress); 281if (unusedParametersSeverity == ReportDiagnostic.Suppress)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (3)
164if (_options.UnusedValueExpressionStatementNotification.Severity == ReportDiagnostic.Suppress) 457if (_options.UnusedValueAssignmentSeverity.Severity == ReportDiagnostic.Suppress && 604if (_options.UnusedValueAssignmentSeverity.Severity == ReportDiagnostic.Suppress ||
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
134if (option.Notification.Severity == ReportDiagnostic.Suppress ||
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
384if (notification.Severity == ReportDiagnostic.Suppress)
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
42if (option.Notification.Severity == ReportDiagnostic.Suppress)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\EditorConfigSeverityStrings.cs (1)
23reportDiagnostic = ReportDiagnostic.Suppress;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (3)
20/// Notification option to disable or suppress an option with <see cref="ReportDiagnostic.Suppress"/>. 22public static NotificationOption2 None => new(ReportDiagnostic.Suppress, false); 54ReportDiagnostic.Suppress => None,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ReportDiagnosticExtensions.cs (3)
41case ReportDiagnostic.Suppress: 75ReportDiagnostic.Suppress => EditorConfigSeverityStrings.None, 93ReportDiagnostic.Suppress => NotificationOption2.None,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingRule.cs (1)
82return ReportDiagnostic.Suppress;
Microsoft.CodeAnalysis.CSharp (13)
CommandLine\CSharpCommandLineParser.cs (3)
245AddWarnings(noWarns, ReportDiagnostic.Suppress, valueMemory.Value); 2141if (existing != ReportDiagnostic.Suppress) 2181if (value != ReportDiagnostic.Suppress)
Compilation\CSharpDiagnosticFilter.cs (10)
175return ReportDiagnostic.Suppress; 182return ReportDiagnostic.Suppress; 248report = isEnabledByDefault ? ReportDiagnostic.Default : ReportDiagnostic.Suppress; 251if (report == ReportDiagnostic.Suppress) 253return ReportDiagnostic.Suppress; 275case ReportDiagnostic.Suppress: 291else if (report == ReportDiagnostic.Suppress) // check options (/nowarn) 293return ReportDiagnostic.Suppress; 309case ReportDiagnostic.Suppress: 315report = ReportDiagnostic.Suppress;
Microsoft.CodeAnalysis.CSharp.CodeStyle (6)
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertNamespaceAnalysis.cs (2)
30var analyzerDisabled = option.Notification.Severity == ReportDiagnostic.Suppress; 60var analyzerDisabled = option.Notification.Severity == ReportDiagnostic.Suppress;
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
47var analyzerDisabled = option.Notification.Severity == ReportDiagnostic.Suppress;
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
20var analyzerDisabled = option.Notification.Severity == ReportDiagnostic.Suppress;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (2)
95var analyzerDisabled = preference.Notification.Severity == ReportDiagnostic.Suppress; 181var analyzerDisabled = preference.Notification.Severity == ReportDiagnostic.Suppress;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (43)
CommandLineTests.cs (40)
308Assert.Equal(ReportDiagnostic.Suppress, severity); 310Assert.Equal(ReportDiagnostic.Suppress, severity); 2846Assert.True(parsedArgs.CompilationOptions.SpecificDiagnosticOptions["CA1014"] == ReportDiagnostic.Suppress); 3282Assert.Equal(expected: ReportDiagnostic.Suppress, actual: arguments.CompilationOptions.SpecificDiagnosticOptions["Test001"]); 3317Assert.Equal(expected: ReportDiagnostic.Suppress, actual: arguments.CompilationOptions.SpecificDiagnosticOptions["Test001"]); 3352Assert.Equal(expected: ReportDiagnostic.Suppress, actual: arguments.CompilationOptions.SpecificDiagnosticOptions["Test001"]); 3379Assert.Equal(expected: ReportDiagnostic.Suppress, actual: arguments.CompilationOptions.SpecificDiagnosticOptions[warning]); 3382Assert.Equal(expected: ReportDiagnostic.Suppress, 3384Assert.Equal(expected: ReportDiagnostic.Suppress, 3412Assert.Equal(expected: ReportDiagnostic.Suppress, actual: arguments.CompilationOptions.SpecificDiagnosticOptions[warning]); 3415Assert.Equal(expected: ReportDiagnostic.Suppress, 3417Assert.Equal(expected: ReportDiagnostic.Suppress, 3445Assert.Equal(expected: ReportDiagnostic.Suppress, actual: arguments.CompilationOptions.SpecificDiagnosticOptions[warning]); 3448Assert.Equal(expected: ReportDiagnostic.Suppress, actual: arguments.CompilationOptions.SpecificDiagnosticOptions["Test001"]); 3449Assert.Equal(expected: ReportDiagnostic.Suppress, 3451Assert.Equal(expected: ReportDiagnostic.Suppress, 5546AssertSpecificDiagnostics(new[] { 1062, 1066, 1734 }, new[] { ReportDiagnostic.Suppress, ReportDiagnostic.Suppress, ReportDiagnostic.Suppress }, parsedArgs); 5552AssertSpecificDiagnostics(new[] { 1062, 1066, 1734 }, new[] { ReportDiagnostic.Suppress, ReportDiagnostic.Suppress, ReportDiagnostic.Suppress }, parsedArgs); 5558AssertSpecificDiagnostics(new[] { 1062, 1066, 1734, 1762 }, new[] { ReportDiagnostic.Suppress, ReportDiagnostic.Suppress, ReportDiagnostic.Suppress, ReportDiagnostic.Error }, parsedArgs); 5564AssertSpecificDiagnostics(new[] { 1062, 1066, 1734, 1762 }, new[] { ReportDiagnostic.Suppress, ReportDiagnostic.Suppress, ReportDiagnostic.Suppress, ReportDiagnostic.Error }, parsedArgs); 13166TestBulkAnalyzerConfigurationCore(analyzer, analyzerConfigText, errorlog, expectedDiagnosticSeverity: ReportDiagnostic.Suppress, noWarn: true); 13216TestBulkAnalyzerConfigurationCore(analyzer, analyzerConfigText, errorlog, expectedDiagnosticSeverity: ReportDiagnostic.Suppress); 13223TestBulkAnalyzerConfigurationCore(analyzer, analyzerConfigText, errorlog, expectedDiagnosticSeverity: ReportDiagnostic.Suppress); 13230TestBulkAnalyzerConfigurationCore(analyzer, analyzerConfigText: string.Empty, errorlog, expectedDiagnosticSeverity: ReportDiagnostic.Suppress); 13236TestBulkAnalyzerConfigurationCore(analyzer, analyzerConfigText, errorlog, expectedDiagnosticSeverity: ReportDiagnostic.Suppress); 13242TestBulkAnalyzerConfigurationCore(analyzer, analyzerConfigText, errorlog, expectedDiagnosticSeverity: ReportDiagnostic.Suppress); 13272TestBulkAnalyzerConfigurationCore(analyzer, analyzerConfigText, errorlog, expectedDiagnosticSeverity: ReportDiagnostic.Suppress, noWarn: true); 13311expectedDiagnosticSeverity = customConfigurable ? defaultReportDiagnostic : ReportDiagnostic.Suppress; 13322expectedDiagnosticSeverity = customConfigurable ? defaultReportDiagnostic : ReportDiagnostic.Suppress; 13328expectedDiagnosticSeverity = customConfigurable ? defaultReportDiagnostic : ReportDiagnostic.Suppress; 13443ReportDiagnostic.Suppress => null, 15637var comp = CreateCompilation(src, options: TestOptions.DebugExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress));
SarifV2ErrorLoggerTests.cs (3)
498(AnalyzerForErrorLogTest.Descriptor1.Id, 0, ImmutableHashSet.Create(ReportDiagnostic.Suppress)), 499(AnalyzerForErrorLogTest.Descriptor2.Id, 1, ImmutableHashSet.Create(ReportDiagnostic.Suppress)))); 580(AnalyzerForErrorLogTest.Descriptor1.Id, 0, ImmutableHashSet.Create(ReportDiagnostic.Suppress, ReportDiagnostic.Warn))));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (3)
113[CombinatorialValues(ReportDiagnostic.Warn, ReportDiagnostic.Error, ReportDiagnostic.Info, ReportDiagnostic.Hidden, ReportDiagnostic.Suppress)] 134var analyzerSetting = new AnalyzerSetting(descriptor, ReportDiagnostic.Suppress, null!, language, new SettingLocation(EditorConfigSettings.LocationKind.VisualStudio, null)); 333var analyzerSetting = new AnalyzerSetting(descriptor, ReportDiagnostic.Suppress, updater, Language.CSharp, new SettingLocation(EditorConfigSettings.LocationKind.VisualStudio, null));
Semantics\SpeculationAnalyzerTests.cs (1)
533TestOptions.ReleaseDll.WithSpecificDiagnosticOptions([KeyValuePairUtil.Create("CS0219", ReportDiagnostic.Suppress)]));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (2)
Emit\CompilationEmitTests.cs (1)
4748warnings.Add(MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_ALinkWarn), ReportDiagnostic.Suppress);
Emit\EmitErrorTests.cs (1)
305warnOpts.Add(MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_UnreferencedVarAssg), ReportDiagnostic.Suppress);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (30)
Attributes\AttributeTests_Assembly.cs (3)
183warnings.Add(MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_ALinkWarn), ReportDiagnostic.Suppress); 215warnings.Add(MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_ALinkWarn), ReportDiagnostic.Suppress); 431warnings.Add(MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_ALinkWarn), ReportDiagnostic.Suppress);
Attributes\AttributeTests_WellKnownAttributes.cs (3)
8804verify(TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 8825verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("TEST1", ReportDiagnostic.Suppress))); 8834verify(TestOptions.DebugDll.WithSpecificDiagnosticOptions(ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("CS0618", ReportDiagnostic.Suppress)),
Diagnostics\DiagnosticAnalyzerTests.cs (18)
145new[] { KeyValuePairUtil.Create("CA9999_UseOfVariableThatStartsWithX", ReportDiagnostic.Suppress) }); 332specificDiagOptions.Add(noneDiagDescriptor.Id, ReportDiagnostic.Suppress); 333specificDiagOptions.Add(infoDiagDescriptor.Id, ReportDiagnostic.Suppress); 334specificDiagOptions.Add(warningDiagDescriptor.Id, ReportDiagnostic.Suppress); 335specificDiagOptions.Add(errorDiagDescriptor.Id, ReportDiagnostic.Suppress); 431options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress); 460specificDiagOptions.Add(enabledDiagDescriptor.Id, ReportDiagnostic.Suppress); 532specificDiagOptions.Add(PartiallyDisabledAnalyzer.desc2.Id, ReportDiagnostic.Suppress); 1141specificDiagOptions.Add(NotConfigurableDiagnosticAnalyzer.EnabledRule.Id, ReportDiagnostic.Suppress); 1322var specificOption = ReportDiagnostic.Suppress; 1337TestEffectiveSeverity(DiagnosticSeverity.Warning, expectedEffectiveSeverity: ReportDiagnostic.Suppress, generalOption: generalOption, isEnabledByDefault: enabledByDefault); 3386new TestSyntaxTreeOptionsProvider(tree2, (NamedTypeAnalyzer.RuleId, ReportDiagnostic.Suppress))); 3429new TestSyntaxTreeOptionsProvider(tree2, (NamedTypeAnalyzer.RuleId, ReportDiagnostic.Suppress)) 3481new TestSyntaxTreeOptionsProvider(tree2, (NamedTypeAnalyzer.RuleId, ReportDiagnostic.Suppress)) 3533new TestSyntaxTreeOptionsProvider((NamedTypeAnalyzer.RuleId, ReportDiagnostic.Suppress))); 3554new TestSyntaxTreeOptionsProvider((NamedTypeAnalyzer.RuleId, ReportDiagnostic.Suppress), (tree1, new[] { (NamedTypeAnalyzer.RuleId, ReportDiagnostic.Default) }))); 4197(tree2, new[] { (AnalyzerWithDisabledRules.Rule.Id, ReportDiagnostic.Suppress) }), 4198(tree3, new[] { (AnalyzerWithDisabledRules.Rule.Id, ReportDiagnostic.Suppress) })));
Diagnostics\DiagnosticSuppressorTests.cs (1)
313var specificDiagnosticOptions = compilation.Options.SpecificDiagnosticOptions.Add(suppressionId, ReportDiagnostic.Suppress);
FirstClassSpanTests.cs (4)
2001options: TestOptions.UnsafeReleaseExe.WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress), 2160options: TestOptions.UnsafeReleaseExe.WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress)); 2398options: TestOptions.UnsafeReleaseExe.WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress)); 2631options: TestOptions.UnsafeReleaseExe.WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress));
Semantics\RecordTests.cs (1)
30193var compB = CreateCompilation(sourceB, references: new[] { refA }, options: TestOptions.ReleaseDll.WithSpecificDiagnosticOptions("CS1701", ReportDiagnostic.Suppress), parseOptions: TestOptions.Regular9, targetFramework: TargetFramework.NetCoreApp);
Microsoft.CodeAnalysis.CSharp.Features (8)
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (1)
52if (typeStyle.IsStylePreferred && typeStyle.Notification.Severity != ReportDiagnostic.Suppress)
src\Analyzers\CSharp\Analyzers\ConvertNamespace\ConvertNamespaceAnalysis.cs (2)
30var analyzerDisabled = option.Notification.Severity == ReportDiagnostic.Suppress; 60var analyzerDisabled = option.Notification.Severity == ReportDiagnostic.Suppress;
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_ProgramMain.cs (1)
47var analyzerDisabled = option.Notification.Severity == ReportDiagnostic.Suppress;
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
20var analyzerDisabled = option.Notification.Severity == ReportDiagnostic.Suppress;
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (2)
95var analyzerDisabled = preference.Notification.Severity == ReportDiagnostic.Suppress; 181var analyzerDisabled = preference.Notification.Severity == ReportDiagnostic.Suppress;
UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeRefactoringProvider.cs (1)
40case ReportDiagnostic.Suppress:
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1064.Add(IDEDiagnosticIds.RemoveUnnecessarySuppressionDiagnosticId, ReportDiagnostic.Suppress));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (28)
Semantics\InitOnlyMemberTests.cs (2)
3469ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("CS1685", ReportDiagnostic.Suppress))); 3568ImmutableDictionary<string, ReportDiagnostic>.Empty.Add("CS1685", ReportDiagnostic.Suppress)));
Semantics\NullableReferenceTypesTests.cs (21)
6364var comp2 = CreateCompilation(source, options: TestOptions.DebugDll.WithSpecificDiagnosticOptions(id, ReportDiagnostic.Suppress)); 125195WithSpecificDiagnosticOptions(id, ReportDiagnostic.Suppress)); 125200WithSpecificDiagnosticOptions(id, ReportDiagnostic.Suppress). 125206WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125338WithSpecificDiagnosticOptions(id1, id2, ReportDiagnostic.Suppress)); 125342WithSpecificDiagnosticOptions(id1, id2, ReportDiagnostic.Suppress). 125347WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 125530WithSpecificDiagnosticOptions(id, ReportDiagnostic.Suppress)); 125535WithSpecificDiagnosticOptions(id, ReportDiagnostic.Suppress). 125541WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 126034WithSpecificDiagnosticOptions(id, ReportDiagnostic.Suppress)); 126039WithSpecificDiagnosticOptions(id, ReportDiagnostic.Suppress). 126045WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 126180WithSpecificDiagnosticOptions(id, ReportDiagnostic.Suppress)); 126185WithSpecificDiagnosticOptions(id, ReportDiagnostic.Suppress). 126191WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)); 144986options: WithNullableEnable().WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress)); 144999options: WithNullableEnable().WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress)); 145056", options: WithNullableEnable().WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress)); 145074", options: WithNullableEnable().WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress)); 145128", options: WithNullableEnable().WithSpecificDiagnosticOptions("CS0436", ReportDiagnostic.Suppress));
Semantics\SemanticErrorTests.cs (3)
2117{ MessageProvider.Instance.GetIdForErrorCode(649), ReportDiagnostic.Suppress } 11038noWarns.Add(MessageProvider.Instance.GetIdForErrorCode(219), ReportDiagnostic.Suppress); 23620CreateCompilation(builder.ToString(), null, TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)).VerifyEmitDiagnostics(
SourceGeneration\GeneratorDriverTests.cs (2)
1176verifyDiagnosticsWithOptions(options.WithSpecificDiagnosticOptions("GEN001", ReportDiagnostic.Suppress), 1179verifyDiagnosticsWithOptions(options.WithSpecificDiagnosticOptions("GEN002", ReportDiagnostic.Suppress),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (15)
Compilation\CompilationAPITests.cs (7)
53diagnosticOptions: CreateImmutableDictionary(("CS1584", ReportDiagnostic.Suppress)), 72.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress); 101var options = WithDiagnosticOptions(tree, ("CS0078", ReportDiagnostic.Suppress)); 139var options = WithDiagnosticOptions(tree, ("CS0078", ReportDiagnostic.Suppress)); 169(tree, new[] { ("CS0078", ReportDiagnostic.Suppress) }), 195new TestSyntaxTreeOptionsProvider((tree, new[] { ("cs0078", ReportDiagnostic.Suppress) })) 208(tree, new[] { ("cs0078", ReportDiagnostic.Suppress) }))
Compilation\CSharpCompilationOptionsTests.cs (3)
84TestHiddenProperty((old, value) => old.WithGeneralDiagnosticOption(value), opt => opt.GeneralDiagnosticOption, ReportDiagnostic.Suppress); 122TestProperty((old, value) => old.WithGeneralDiagnosticOption(value), opt => opt.GeneralDiagnosticOption, ReportDiagnostic.Suppress); 231{ MessageProvider.Instance.GetIdForErrorCode(2), ReportDiagnostic.Suppress },
Compilation\UsedAssembliesTests.cs (1)
295options = options.WithSpecificDiagnosticOptions(options.SpecificDiagnosticOptions.Add("CS1591", ReportDiagnostic.Suppress));
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
5759var warnDict = new Dictionary<string, ReportDiagnostic> { { MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_MissingXMLComment), ReportDiagnostic.Suppress } };
Symbols\CovariantReturnTests.cs (1)
515options: TestOptions.ReleaseDll.WithSpecificDiagnosticOptions("CS1701", ReportDiagnostic.Suppress),
Symbols\GenericConstraintTests.cs (1)
7312comp.WithOptions(comp.Options.WithSpecificDiagnosticOptions("CS1701", ReportDiagnostic.Suppress)),
Symbols\SymbolErrorTests.cs (1)
108options: TestOptions.ReleaseDll.WithSpecificDiagnosticOptions(new Dictionary<string, ReportDiagnostic>() { { MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_UnreferencedField), ReportDiagnostic.Suppress } }),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (11)
Diagnostics\DiagnosticTest.cs (7)
570warnings.Add(MessageProvider.Instance.GetIdForErrorCode(420), ReportDiagnostic.Suppress); 614warnings.Add(MessageProvider.Instance.GetIdForErrorCode(168), ReportDiagnostic.Suppress); 1499warnings.Add(MessageProvider.Instance.GetIdForErrorCode(1633), ReportDiagnostic.Suppress); 1782warnings[MessageProvider.Instance.GetIdForErrorCode(168)] = ReportDiagnostic.Suppress; 1834warnings[MessageProvider.Instance.GetIdForErrorCode(168)] = ReportDiagnostic.Suppress; 2143var options = TestOptions.DebugDll.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress); 2264warnings[MessageProvider.Instance.GetIdForErrorCode(168)] = ReportDiagnostic.Suppress;
Syntax\SyntaxTreeTests.cs (4)
130var options = CreateImmutableDictionary(("CS0078", ReportDiagnostic.Suppress)); 140var options = CreateImmutableDictionary(("CS0078", ReportDiagnostic.Suppress)); 187var options = CreateImmutableDictionary(("CS0078", ReportDiagnostic.Suppress)); 232new[] { KeyValuePair.Create("CS00778", ReportDiagnostic.Suppress) });
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeStyle\CSharpEditorConfigCodeStyleParserTests.cs (2)
43[InlineData("false:none", (int)ExpressionBodyPreference.Never, ReportDiagnostic.Suppress)] 48[InlineData("false : none", (int)ExpressionBodyPreference.Never, ReportDiagnostic.Suppress)]
Microsoft.CodeAnalysis.EditorFeatures (2)
EditorConfigSettings\Data\AnalyzerSetting.cs (1)
32var enabled = effectiveSeverity != ReportDiagnostic.Suppress;
EditorConfigSettings\Data\CodeStyleSetting.cs (1)
21if (severity is ReportDiagnostic.Default or ReportDiagnostic.Suppress)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\DiagnosticServiceTests.vb (1)
298suppressDiagOptions.Add(workspaceDiagnosticAnalyzer.DiagDescriptor.Id, ReportDiagnostic.Suppress)
Microsoft.CodeAnalysis.Features (16)
PreferFrameworkType\PreferFrameworkTypeDiagnosticAnalyzerBase.cs (1)
109=> !optionValue.Value && optionValue.Notification.Severity != ReportDiagnostic.Suppress;
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
163if (notification?.Severity == ReportDiagnostic.Suppress)
src\Analyzers\Core\Analyzers\Helpers\DiagnosticHelper.cs (1)
278effectiveSeverity == ReportDiagnostic.Suppress,
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
142applicableRule.EnforcementLevel == ReportDiagnostic.Suppress)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
107if (severity == ReportDiagnostic.Suppress)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.cs (5)
226option.Notification.Severity == ReportDiagnostic.Suppress) 256Debug.Assert(unusedValueExpressionStatementSeverity.Severity != ReportDiagnostic.Suppress || 257unusedValueAssignmentSeverity.Severity != ReportDiagnostic.Suppress || 258unusedParametersSeverity.Severity != ReportDiagnostic.Suppress); 281if (unusedParametersSeverity == ReportDiagnostic.Suppress)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (3)
164if (_options.UnusedValueExpressionStatementNotification.Severity == ReportDiagnostic.Suppress) 457if (_options.UnusedValueAssignmentSeverity.Severity == ReportDiagnostic.Suppress && 604if (_options.UnusedValueAssignmentSeverity.Severity == ReportDiagnostic.Suppress ||
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
134if (option.Notification.Severity == ReportDiagnostic.Suppress ||
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
384if (notification.Severity == ReportDiagnostic.Suppress)
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
42if (option.Notification.Severity == ReportDiagnostic.Suppress)
Microsoft.CodeAnalysis.Rebuild (1)
CSharpCompilationFactory.cs (1)
104ReportDiagnostic.Suppress,
Microsoft.CodeAnalysis.Test.Utilities (2)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
430if (severity == ReportDiagnostic.Suppress)
Diagnostics\ReportDiagnosticExtensions.cs (1)
21ReportDiagnostic.Suppress => "none",
Microsoft.CodeAnalysis.UnitTests (16)
Analyzers\AnalyzerConfigTests.cs (11)
964CreateImmutableDictionary(("cs000", ReportDiagnostic.Suppress)), 993CreateImmutableDictionary(("cs000", ReportDiagnostic.Suppress)) 1041CreateImmutableDictionary(("cs000", ReportDiagnostic.Suppress)), 1064("cs000", ReportDiagnostic.Suppress), 1110("cs000", ReportDiagnostic.Suppress), 1194("cs000", ReportDiagnostic.Suppress), 1197("cs000", ReportDiagnostic.Suppress)) 1217("cs000", ReportDiagnostic.Suppress)) 1410new[] { ("cs000", ReportDiagnostic.Suppress) }, 2033Assert.Equal(CreateImmutableDictionary(("cs000", ReportDiagnostic.Suppress), 2132CreateImmutableDictionary(("cs000", ReportDiagnostic.Suppress)),
CommonCommandLineParserTests.cs (4)
415Assert.Equal(ReportDiagnostic.Suppress, ruleSet.SpecificDiagnosticOptions["CA1014"]); 889Assert.Equal(ReportDiagnostic.Suppress, ruleSet.SpecificDiagnosticOptions["CA1013"]); 957Assert.Equal(ReportDiagnostic.Suppress, ruleSet.SpecificDiagnosticOptions["CA2111"]); 958Assert.Equal(ReportDiagnostic.Suppress, ruleSet.SpecificDiagnosticOptions["CA2119"]);
Diagnostics\CompilationWithAnalyzersTests.cs (1)
41new[] { KeyValuePairUtil.Create($"CS{(int)ErrorCode.WRN_AlwaysNull:D4}", ReportDiagnostic.Suppress) }));
Microsoft.CodeAnalysis.VisualBasic (12)
CommandLine\VisualBasicCommandLineParser.vb (5)
845If generalDiagnosticOption <> ReportDiagnostic.Suppress Then 867generalDiagnosticOption = ReportDiagnostic.Suppress 872specificDiagnosticOptionsFromGeneralArguments.Add(pair.Key, ReportDiagnostic.Suppress) 879AddWarnings(specificDiagnosticOptionsFromNoWarnArguments, ReportDiagnostic.Suppress, ParseWarnings(value)) 2265If existing <> ReportDiagnostic.Suppress Then
Compilation\VisualBasicDiagnosticFilter.vb (6)
195report = If(isEnabledByDefault, ReportDiagnostic.Default, ReportDiagnostic.Suppress) 199If report = ReportDiagnostic.Suppress Then 200Return ReportDiagnostic.Suppress 205location.SourceTree.GetWarningState(id, location.SourceSpan.Start) = ReportDiagnostic.Suppress Then 216If generalDiagnosticOption = ReportDiagnostic.Suppress AndAlso 218Return ReportDiagnostic.Suppress
Syntax\VisualBasicWarningStateMap.vb (1)
68reportingState = ReportDiagnostic.Suppress
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (16)
CommandLineTests.vb (16)
136Assert.Equal(ReportDiagnostic.Suppress, report) 138Assert.Equal(ReportDiagnostic.Suppress, report) 140Assert.Equal(ReportDiagnostic.Suppress, report) 288Assert.Equal(cmd.Arguments.CompilationOptions.GeneralDiagnosticOption, ReportDiagnostic.Suppress) 297Assert.Equal(cmd.Arguments.CompilationOptions.GeneralDiagnosticOption, ReportDiagnostic.Suppress) 300Assert.Equal(cmd.Arguments.CompilationOptions.GeneralDiagnosticOption, ReportDiagnostic.Suppress) 303Assert.Equal(cmd.Arguments.CompilationOptions.GeneralDiagnosticOption, ReportDiagnostic.Suppress) 2847Assert.True(parsedArgs.CompilationOptions.SpecificDiagnosticOptions("CA1014") = ReportDiagnostic.Suppress) 5844Assert.Equal(ReportDiagnostic.Suppress, parsedArgs.CompilationOptions.GeneralDiagnosticOption) 5853AssertSpecificDiagnostics({42024, 42025}, {ReportDiagnostic.Suppress, ReportDiagnostic.Suppress}, parsedArgs) 8889Assert.Equal(expected:=ReportDiagnostic.Suppress, actual:=arguments.CompilationOptions.GeneralDiagnosticOption) 8912Assert.Equal(expected:=ReportDiagnostic.Suppress, actual:=arguments.CompilationOptions.GeneralDiagnosticOption) 8915Assert.Equal(expected:=ReportDiagnostic.Suppress, actual:=arguments.CompilationOptions.SpecificDiagnosticOptions("Test002")) 8916Assert.Equal(expected:=ReportDiagnostic.Suppress, actual:=arguments.CompilationOptions.SpecificDiagnosticOptions("Test003")) 8937Assert.Equal(expected:=ReportDiagnostic.Suppress, actual:=arguments.CompilationOptions.SpecificDiagnosticOptions("Test001"))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Emit\CompilationEmitTests.vb (1)
3937warns.Add(MessageProvider.Instance.GetIdForErrorCode(40010), ReportDiagnostic.Suppress)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (27)
Compilation\CompilationAPITests.vb (6)
45WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 73Dim options = WithDiagnosticOptions(tree, ("BC42024", ReportDiagnostic.Suppress)) 108CreateImmutableDictionary(("BC42024", ReportDiagnostic.Suppress))) 136(tree, {("BC42024", ReportDiagnostic.Suppress)}), 156Dim options = WithDiagnosticOptions(tree, ("bc42024", ReportDiagnostic.Suppress)) 165(tree, {("bc42024", ReportDiagnostic.Suppress)}))
Compilation\VisualBasicCompilationOptionsTests.vb (8)
38TestHiddenProperty(Function(old, value) old.WithGeneralDiagnosticOption(value), Function(opt) opt.GeneralDiagnosticOption, ReportDiagnostic.Suppress) 113TestProperty(Function(old, value) old.WithGeneralDiagnosticOption(value), Function(opt) opt.GeneralDiagnosticOption, ReportDiagnostic.Suppress) 427Dim options = commonoption.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 434warnings.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Suppress) 444warnings.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Suppress) 445warnings.Add(MessageProvider.Instance.GetIdForErrorCode(42099), ReportDiagnostic.Suppress) 488warnings.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Suppress) 500options = commonoption.WithSpecificDiagnosticOptions(New ReadOnlyDictionary(Of String, ReportDiagnostic)(warnings)).WithGeneralDiagnosticOption(ReportDiagnostic.Suppress)
Diagnostics\DiagnosticAnalyzerTests.vb (10)
78specificDiagOptions.Add(noneDiagDescriptor.Id, ReportDiagnostic.Suppress) 79specificDiagOptions.Add(infoDiagDescriptor.Id, ReportDiagnostic.Suppress) 80specificDiagOptions.Add(warningDiagDescriptor.Id, ReportDiagnostic.Suppress) 81specificDiagOptions.Add(errorDiagDescriptor.Id, ReportDiagnostic.Suppress) 174options = TestOptions.ReleaseDll.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 203specificDiagOptions.Add(enabledDiagDescriptor.Id, ReportDiagnostic.Suppress) 255specificDiagOptions.Add(PartiallyDisabledAnalyzer.desc2.Id, ReportDiagnostic.Suppress) 685specificDiagOptions.Add(NotConfigurableDiagnosticAnalyzer.EnabledRule.Id, ReportDiagnostic.Suppress) 791Dim specificOption = ReportDiagnostic.Suppress 805TestEffectiveSeverity(DiagnosticSeverity.Warning, expectedEffectiveSeverity:=ReportDiagnostic.Suppress, generalOption:=generalOption, isEnabledByDefault:=enabledByDefault)
Semantics\AsyncAwait.vb (1)
5502warnings.Add(MessageProvider.Instance.GetIdForErrorCode(42356), ReportDiagnostic.Suppress)
SourceGeneration\GeneratorDriverTests.vb (2)
196warnings.Add("GEN001", ReportDiagnostic.Suppress) 201warnings.Add("GEN002", ReportDiagnostic.Suppress)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
UsedAssembliesTests.vb (2)
3664WithSpecificDiagnosticOptions({KeyValuePairUtil.Create("BC40057", ReportDiagnostic.Suppress)}), 3676WithSpecificDiagnosticOptions({KeyValuePairUtil.Create("BC40057", ReportDiagnostic.Suppress)}),
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (55)
Parser\ParseDirectives.vb (51)
2792diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Suppress) 2800compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 2832diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Suppress) 2840compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 2872diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Suppress) 2880compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 2912diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Suppress) 2920compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 2954diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Suppress) 2965compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 2999diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Suppress) 3010compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 3044diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Suppress) 3054compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 3087diagOptions.Add("bc42024", ReportDiagnostic.Suppress) 3097compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 3136diagOptions.Add("bC42024", ReportDiagnostic.Suppress) 3146compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 3225diagOptions.Add("SoMeiD", ReportDiagnostic.Suppress) 3233compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 3269diagOptions.Add(MessageProvider.Instance.GetIdForErrorCode(42024), ReportDiagnostic.Suppress) 3280compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 3332diagOptions.Add("__somethIng_123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678902345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678902345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789023456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678902345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", ReportDiagnostic.Suppress) 3340compOptions = TestOptions.ReleaseExe.WithGeneralDiagnosticOption(ReportDiagnostic.Suppress) 3421Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetEndPosition(tree, "#Disable Warning"))) 3422Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetStartPosition(tree, "Module Program"))) 3423Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetEndPosition(tree, "Module Program"))) 3424Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetStartPosition(tree, "#enable Warning"))) 3425Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("bC42104", GetEndPosition(tree, "#Disable Warning"))) 3426Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("bC42104", GetStartPosition(tree, "Module Program"))) 3427Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("bC42104", GetEndPosition(tree, "Module Program"))) 3428Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("bC42104", GetStartPosition(tree, "#enable Warning"))) 3435Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetEndPosition(tree, "#Disable Warning BC42024"))) 3436Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetEndPosition(tree, "Dim b"))) 3440Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetEndPosition(tree, "#enable warning [bc42024]") - 1)) 3450Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetEndPosition(tree, "#disable warning BC42024, [bc42104]"))) 3451Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetEndPosition(tree, "End Module"))) 3454Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("bc42104", GetEndPosition(tree, "#disable warning BC42024, [bc42104]"))) 3455Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("bc42104", GetEndPosition(tree, "End Module"))) 3457Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetEndPosition(tree, "#enable Warning") - 1)) 3459Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("bc42104", GetEndPosition(tree, "#enable Warning") - 1)) 3463Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", endPos - 1)) 3465Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("bc42104", endPos - 1)) 3503Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetEndPosition(tree, "#Disable Warning bc42024, [BC42025]"))) 3505Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42025", GetEndPosition(tree, "#Disable Warning bc42024, [BC42025]"))) 3507Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetStartPosition(tree, "#enable warning bc42024, bc42025"))) 3508Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetEndPosition(tree, "#enable warning bc42024, bc42025"))) 3509Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42025", GetStartPosition(tree, "#enable warning bc42024, bc42025"))) 3510Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42025", GetEndPosition(tree, "#enable warning bc42024, bc42025"))) 3512Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42024", GetStartPosition(tree, "#Enable Warning [bc42025], [bC42024]") + 1)) 3514Assert.Equal(ReportDiagnostic.Suppress, tree.GetWarningState("BC42025", GetStartPosition(tree, "#Enable Warning [bc42025], [bC42024]") + 1))
Syntax\SyntaxTreeTests.vb (4)
25Dim options = CreateImmutableDictionary(("BC000", ReportDiagnostic.Suppress)) 32Dim options = CreateImmutableDictionary(("BC000", ReportDiagnostic.Suppress)) 64Dim options = CreateImmutableDictionary(("BC000", ReportDiagnostic.Suppress)) 100Dim map = CreateImmutableDictionary(("BC000", ReportDiagnostic.Suppress))
Microsoft.CodeAnalysis.Workspaces (11)
CodeStyle\NotificationOption2_operators.cs (2)
14ReportDiagnostic.Suppress => NotificationOption.None, 28ReportDiagnostic.Suppress => WorkspacesResources.None,
Diagnostics\DiagnosticData.cs (1)
292if (reportDiagnostic == ReportDiagnostic.Suppress)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\EditorConfigSeverityStrings.cs (1)
23reportDiagnostic = ReportDiagnostic.Suppress;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (3)
20/// Notification option to disable or suppress an option with <see cref="ReportDiagnostic.Suppress"/>. 22public static NotificationOption2 None => new(ReportDiagnostic.Suppress, false); 54ReportDiagnostic.Suppress => None,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ReportDiagnosticExtensions.cs (3)
41case ReportDiagnostic.Suppress: 75ReportDiagnostic.Suppress => EditorConfigSeverityStrings.None, 93ReportDiagnostic.Suppress => NotificationOption2.None,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_NamingRule.cs (1)
82return ReportDiagnostic.Suppress;
Microsoft.CodeAnalysis.Workspaces.UnitTests (4)
CodeStyle\EditorConfigCodeStyleParserTests.cs (4)
15[InlineData("true:none", true, ReportDiagnostic.Suppress)] 22[InlineData("false:none", false, ReportDiagnostic.Suppress)] 47[InlineData("never:none", AccessibilityModifiersRequired.Never, ReportDiagnostic.Suppress)] 51[InlineData("never : none", AccessibilityModifiersRequired.Never, ReportDiagnostic.Suppress), WorkItem("https://github.com/dotnet/roslyn/issues/27685")]
Microsoft.VisualStudio.LanguageServices (6)
EditorConfigSettings\Analyzers\View\ColumnDefinitions\AnalyzerSeverityColumnDefinition.cs (1)
44CodeAnalysis.ReportDiagnostic.Suppress => ServicesVSResources.Disabled,
EditorConfigSettings\Analyzers\ViewModel\SeverityViewModel.cs (2)
51ReportDiagnostic.Suppress => 0, 720 => ReportDiagnostic.Suppress,
EditorConfigSettings\NamingStyle\View\ColumnDefinitions\NamingStylesSeverityColumnDefinition.cs (1)
50ReportDiagnostic.Suppress => ServicesVSResources.Disabled,
EditorConfigSettings\NamingStyle\ViewModel\ColumnViewModels\NamingStylesSeverityViewModel.cs (2)
21ReportDiagnostic.Suppress => 0, 360 => ReportDiagnostic.Suppress,
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
123diagnosticOptions[diagnosticID] = ReportDiagnostic.Suppress;
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (3)
ProjectSystemShim\LegacyProject\AnalyzersTests.cs (3)
182Assert.Equal(expected: ReportDiagnostic.Suppress, actual: options.SpecificDiagnosticOptions["CS1014"]); 190Assert.Equal(expected: ReportDiagnostic.Suppress, actual: options.SpecificDiagnosticOptions["CS1014"]); 217Assert.Equal(expected: ReportDiagnostic.Suppress, actual: ca1014DiagnosticOption);
Microsoft.VisualStudio.LanguageServices.UnitTests (4)
ProjectSystemShim\ConvertedVisualBasicProjectOptionsTests.vb (4)
124Assert.Equal(expected:=ReportDiagnostic.Suppress, actual:=convertedOptions.GeneralDiagnosticOption) 127Assert.Equal(expected:=ReportDiagnostic.Suppress, actual:=convertedOptions.SpecificDiagnosticOptions("Test002")) 128Assert.Equal(expected:=ReportDiagnostic.Suppress, actual:=convertedOptions.SpecificDiagnosticOptions("Test003")) 145Assert.Equal(expected:=ReportDiagnostic.Suppress, actual:=convertedOptions.SpecificDiagnosticOptions("Test001"))
Microsoft.VisualStudio.LanguageServices.VisualBasic (3)
ProjectSystemShim\VisualBasicProject.OptionsProcessor.vb (3)
281diagnosticOptions(pair.Key) = ReportDiagnostic.Suppress 301diagnosticOptions(diagnosticID) = ReportDiagnostic.Suppress 310Return ReportDiagnostic.Suppress
Mvc.Api.Analyzers.Test (1)
IgnoreCS1701WarningCodeFixRunner.cs (1)
14return options.WithSpecificDiagnosticOptions(new[] { "CS1701" }.ToDictionary(c => c, _ => ReportDiagnostic.Suppress));