44 references to Warning
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (7)
CodeActions\InitializeParameter\InitializeMemberFromParameterTests.cs (3)
1457private TestParameters OmitIfDefault_Warning => new TestParameters(options: Option(CodeStyleOptions2.AccessibilityModifiersRequired, AccessibilityModifiersRequired.OmitIfDefault, NotificationOption2.Warning)); 1458private TestParameters Never_Warning => new TestParameters(options: Option(CodeStyleOptions2.AccessibilityModifiersRequired, AccessibilityModifiersRequired.Never, NotificationOption2.Warning)); 1459private TestParameters Always_Warning => new TestParameters(options: Option(CodeStyleOptions2.AccessibilityModifiersRequired, AccessibilityModifiersRequired.Always, NotificationOption2.Warning));
CodeActions\InitializeParameter\InitializeMemberFromPrimaryConstructorParameterTests.cs (3)
26private TestParameters OmitIfDefault_Warning => new TestParameters(options: Option(CodeStyleOptions2.AccessibilityModifiersRequired, AccessibilityModifiersRequired.OmitIfDefault, NotificationOption2.Warning)); 27private TestParameters Never_Warning => new TestParameters(options: Option(CodeStyleOptions2.AccessibilityModifiersRequired, AccessibilityModifiersRequired.Never, NotificationOption2.Warning)); 28private TestParameters Always_Warning => new TestParameters(options: Option(CodeStyleOptions2.AccessibilityModifiersRequired, AccessibilityModifiersRequired.Always, NotificationOption2.Warning));
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (1)
98var option = new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.InsideNamespace, NotificationOption2.Warning);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionDiagnosticAnalyzer.cs (1)
44NotificationOption2.Warning,
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (17)
ConvertNamespace\ConvertNamespaceRefactoringFixAllTests.cs (2)
23=> this.Option(CSharpCodeStyleOptions.NamespaceDeclarations, NamespaceDeclarationPreference.BlockScoped, NotificationOption2.Warning); 26=> this.Option(CSharpCodeStyleOptions.NamespaceDeclarations, NamespaceDeclarationPreference.FileScoped, NotificationOption2.Warning);
Diagnostics\Suppression\RemoveUnnecessaryPragmaSuppressionsTests.cs (1)
1559""", new TestParameters(options: Option(CodeStyleOptions2.PreferAutoProperties, true, NotificationOption2.Warning)));
IntroduceVariable\IntroduceVariableTests.cs (3)
3888{ CSharpCodeStyleOptions.ImplicitObjectCreationWhenTypeIsApparent, new CodeStyleOption2<bool>(true, NotificationOption2.Warning) }, 3922{ CSharpCodeStyleOptions.ImplicitObjectCreationWhenTypeIsApparent, new CodeStyleOption2<bool>(true, NotificationOption2.Warning) }, 3965{ CSharpCodeStyleOptions.ImplicitObjectCreationWhenTypeIsApparent, new CodeStyleOption2<bool>(true, NotificationOption2.Warning) },
SimplifyThisOrMe\SimplifyThisOrMeTests.cs (1)
100options: Option(CodeStyleOptions2.QualifyPropertyAccess, false, NotificationOption2.Warning),
src\Analyzers\CSharp\Tests\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionTests.cs (1)
866{ CSharpCodeStyleOptions.PreferSwitchExpression, true, NotificationOption2.Warning },
src\Analyzers\CSharp\Tests\QualifyMemberAccess\QualifyMemberAccessTests.cs (1)
1465CodeStyleOptions2.QualifyPropertyAccess, NotificationOption2.Warning);
src\Analyzers\CSharp\Tests\UseExplicitTupleName\UseExplicitTupleNameTests.cs (2)
210{ CodeStyleOptions2.PreferExplicitTupleNames, false, NotificationOption2.Warning } 230{ CodeStyleOptions2.PreferExplicitTupleNames, false, NotificationOption2.Warning }
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForMethodsAnalyzerTests.cs (1)
72Assert.Equal(NotificationOption2.Warning.WithIsExplicitlySpecified(true), option.Notification);
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseExplicitTypeTests.cs (1)
30private readonly CodeStyleOption2<bool> offWithWarning = new(false, NotificationOption2.Warning);
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (1)
31private static readonly CodeStyleOption2<bool> onWithWarning = new(true, NotificationOption2.Warning);
src\Analyzers\CSharp\Tests\UsePatternMatching\CSharpIsAndCastCheckDiagnosticAnalyzerTests.cs (1)
609var warningOption = new CodeStyleOption2<bool>(true, NotificationOption2.Warning);
src\Analyzers\CSharp\Tests\UseVarTestExtensions.cs (2)
25private static readonly CodeStyleOption2<bool> onWithWarning = new CodeStyleOption2<bool>(true, NotificationOption2.Warning); 26private static readonly CodeStyleOption2<bool> offWithWarning = new CodeStyleOption2<bool>(false, NotificationOption2.Warning);
Microsoft.CodeAnalysis.EditorFeatures (1)
EditorConfigSettings\Data\CodeStyleSetting.cs (1)
40ReportDiagnostic.Warn => NotificationOption2.Warning,
Microsoft.CodeAnalysis.Features (2)
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDiagnosticAnalyzer.cs (1)
80NotificationOption2.Warning,
EmbeddedLanguages\RegularExpressions\LanguageServices\AbstractRegexDiagnosticAnalyzer.cs (1)
93NotificationOption2.Warning,
Microsoft.CodeAnalysis.Workspaces (8)
CodeStyle\NotificationOption.cs (2)
51/// <inheritdoc cref="NotificationOption2.Warning"/> 52public static readonly NotificationOption Warning = new(NotificationOption2.Warning);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (1)
110case EditorConfigSeverityStrings.Warning: notification = NotificationOption2.Warning; return true;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
194DiagnosticSeverity.Warning => NotificationOption2.Warning,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (2)
50ReportDiagnostic.Warn => Warning, 61DiagnosticSeverity.Warning => Warning,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
16DiagnosticSeverity.Warning => NotificationOption2.Warning,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ReportDiagnosticExtensions.cs (1)
31ReportDiagnostic.Warn => NotificationOption2.Warning,
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Options\OptionsTestHelpers.cs (2)
129.WithNotification((codeStyle.Notification == NotificationOption2.Error) ? NotificationOption2.Warning : NotificationOption2.Error), 132.WithNotification((codeStyle.Notification == NotificationOption2.Error) ? NotificationOption2.Warning : NotificationOption2.Error),
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
Options\DocumentOptionSetTests.cs (1)
32var internalCodeStyleOption = new CodeStyleOption2<bool>(true, NotificationOption2.Warning.WithIsExplicitlySpecified(true));
WorkspaceServiceTests\GlobalOptionServiceTests.cs (2)
272var perLanguageOption2 = new PerLanguageOption2<CodeStyleOption2<bool>>("test", new CodeStyleOption2<bool>(false, NotificationOption2.Warning)).WithPublicOption("test", "test"); 288var option2 = new Option2<CodeStyleOption2<bool>>("test", new CodeStyleOption2<bool>(false, NotificationOption2.Warning)).WithPublicOption("test", "test");
Roslyn.VisualStudio.Next.UnitTests (3)
Options\VisualStudioSettingsOptionPersisterTests.cs (3)
96optionType == typeof(CodeStyleOption2<bool>) ? (new CodeStyleOption2<bool>(false, NotificationOption2.Warning), new CodeStyleOption2<bool>(false, NotificationOption2.Warning).ToXElement().ToString()) : 264var value1 = new CodeStyleOption2<int>(1, NotificationOption2.Warning);