87 references to Error
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (21)
AddMissingImports\CSharpAddMissingImportsRefactoringProviderTests.cs (2)
31
new(AddImportPlacement.InsideNamespace, NotificationOption2.
Error
);
34
new(AddImportPlacement.InsideNamespace, NotificationOption2.
Error
);
CodeActions\GenerateType\GenerateTypeTests.cs (5)
2943
new TestParameters(index: 1, options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.
Error
)));
3240
new TestParameters(index: 1, options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.
Error
)));
3323
new TestParameters(options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.
Error
)));
3355
new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.
Error
)));
3673
parameters: new TestParameters(options: Option(CSharpCodeStyleOptions.PreferredUsingDirectivePlacement, AddImportPlacement.InsideNamespace, NotificationOption2.
Error
)));
EventHookup\EventHookupCommandHandlerTests.cs (1)
926
using var testState = EventHookupTestState.CreateTestState(markup, QualifyMethodAccessWithNotification(NotificationOption2.
Error
));
Formatting\CodeCleanupTests.cs (2)
958
new(AddImportPlacement.InsideNamespace, NotificationOption2.
Error
);
961
new(AddImportPlacement.OutsideNamespace, NotificationOption2.
Error
);
Formatting\CSharpNewDocumentFormattingServiceTests.cs (10)
55
{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.FileScoped, NotificationOption2.
Error
) }
77
{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.FileScoped, NotificationOption2.
Error
) }
99
{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.FileScoped, NotificationOption2.
Error
) }
124
{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.BlockScoped, NotificationOption2.
Error
) }
140
{ CSharpCodeStyleOptions.PreferredUsingDirectivePlacement, new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.OutsideNamespace, NotificationOption2.
Error
) }
191
{ CodeStyleOptions2.AccessibilityModifiersRequired, new CodeStyleOption2<AccessibilityModifiersRequired>(AccessibilityModifiersRequired.Always, NotificationOption2.
Error
) }
216
{ CSharpCodeStyleOptions.NamespaceDeclarations, new CodeStyleOption2<NamespaceDeclarationPreference>(NamespaceDeclarationPreference.FileScoped, NotificationOption2.
Error
) },
217
{ CodeStyleOptions2.AccessibilityModifiersRequired, new CodeStyleOption2<AccessibilityModifiersRequired>(AccessibilityModifiersRequired.Always, NotificationOption2.
Error
) }
261
{ CodeStyleOptions2.AccessibilityModifiersRequired, new CodeStyleOption2<AccessibilityModifiersRequired>(AccessibilityModifiersRequired.Always, NotificationOption2.
Error
) }
281
{ CSharpCodeStyleOptions.PreferredUsingDirectivePlacement, new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.InsideNamespace, NotificationOption2.
Error
) }
GenerateConstructors\GenerateConstructorsTests.cs (1)
520
""", new TestParameters(options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.
Error
)));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (34)
EncapsulateField\EncapsulateFieldTests.cs (2)
1254
""", options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.
Error
));
1283
""", options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.
Error
));
ExtractClass\ExtractClassTests.cs (1)
1215
{ CSharpCodeStyleOptions.NamespaceDeclarations, NamespaceDeclarationPreference.FileScoped, NotificationOption2.
Error
},
SimplifyTypeNames\SimplifyTypeNamesTests.cs (13)
4151
""", new TestParameters(options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.
Error
)));
4279
""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.
Error
)));
4322
""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.
Error
)));
4362
""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.
Error
)));
4413
""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.
Error
)));
4428
""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.
Error
)));
4443
""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, false, NotificationOption2.
Error
)));
4526
""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.
Error
)));
4539
""", new TestParameters(options: Option(CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, false, NotificationOption2.
Error
)));
6893
{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, true, NotificationOption2.
Error
},
6900
{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInDeclaration, true, NotificationOption2.
Error
},
6907
{ CodeStyleOptions2.PreferIntrinsicPredefinedTypeKeywordInMemberAccess, true, NotificationOption2.
Error
},
6921
private readonly CodeStyleOption2<bool> onWithError = new(true, NotificationOption2.
Error
);
src\Analyzers\CSharp\Tests\GenerateConstructor\GenerateConstructorTests.cs (5)
528
new(options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.
Error
)));
663
new(options: Option(CodeStyleOptions2.QualifyFieldAccess, true, NotificationOption2.
Error
)));
831
new(options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.
Error
)));
966
new(options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.
Error
)));
1055
new(options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.
Error
)));
src\Analyzers\CSharp\Tests\MisplacedUsingDirectives\MisplacedUsingDirectivesTests.cs (3)
36
new(AddImportPlacement.InsideNamespace, NotificationOption2.
Error
);
39
new(AddImportPlacement.OutsideNamespace, NotificationOption2.
Error
);
42
new(AddImportPlacement.OutsideNamespaceIgnoringAliases, NotificationOption2.
Error
);
src\Analyzers\CSharp\Tests\QualifyMemberAccess\QualifyMemberAccessTests.cs (3)
35
=> TestAsyncWithOptionAndNotificationOption(code, expected, option, NotificationOption2.
Error
);
45
=> TestMissingAsyncWithOptionAndNotificationOption(code, option, NotificationOption2.
Error
);
1501
CodeStyleOptions2.QualifyPropertyAccess, NotificationOption2.
Error
);
src\Analyzers\CSharp\Tests\UseAutoProperty\UseAutoPropertyTests.cs (2)
3031
new(options: Option(CodeStyleOptions2.QualifyPropertyAccess, false, NotificationOption2.
Error
)));
3060
new(options: Option(CodeStyleOptions2.QualifyPropertyAccess, true, NotificationOption2.
Error
)));
src\Analyzers\CSharp\Tests\UseExpressionBody\UseExpressionBodyForMethodsAnalyzerTests.cs (1)
68
Assert.Equal(NotificationOption2.
Error
.WithIsExplicitlySpecified(true), option.Notification);
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseExplicitTypeTests.cs (1)
31
private readonly CodeStyleOption2<bool> offWithError = new(false, NotificationOption2.
Error
);
src\Analyzers\CSharp\Tests\UseImplicitOrExplicitType\UseImplicitTypeTests.cs (1)
32
private static readonly CodeStyleOption2<bool> onWithError = new(true, NotificationOption2.
Error
);
src\Analyzers\CSharp\Tests\UseVarTestExtensions.cs (2)
22
private static readonly CodeStyleOption2<bool> offWithError = new(false, NotificationOption2.
Error
);
23
private static readonly CodeStyleOption2<bool> onWithError = new(true, NotificationOption2.
Error
);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeStyle\CSharpEditorConfigCodeStyleParserTests.cs (2)
57
var defaultValue = new CodeStyleOption2<ExpressionBodyPreference>(ExpressionBodyPreference.Never, NotificationOption2.
Error
);
73
var defaultValue = new CodeStyleOption2<AddImportPlacement>(AddImportPlacement.InsideNamespace, NotificationOption2.
Error
);
Microsoft.CodeAnalysis.EditorFeatures (1)
EditorConfigSettings\Data\CodeStyleSetting.cs (1)
41
ReportDiagnostic.Error => NotificationOption2.
Error
,
Microsoft.CodeAnalysis.Workspaces (9)
CodeStyle\NotificationOption.cs (2)
54
/// <inheritdoc cref="NotificationOption2.
Error
"/>
55
public static readonly NotificationOption Error = new(NotificationOption2.
Error
);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleHelpers.cs (2)
59
/// in <paramref name="value"/> and <see cref="NotificationOption2.
Error
"/> will be returned
111
case EditorConfigSeverityStrings.Error: notification = NotificationOption2.
Error
; return true;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (1)
195
DiagnosticSeverity.Error => NotificationOption2.
Error
,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\NotificationOption2.cs (2)
49
ReportDiagnostic.Error =>
Error
,
60
DiagnosticSeverity.Error =>
Error
,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticSeverityExtensions.cs (1)
15
DiagnosticSeverity.Error => NotificationOption2.
Error
,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ReportDiagnosticExtensions.cs (1)
30
ReportDiagnostic.Error => NotificationOption2.
Error
,
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (4)
Options\OptionsTestHelpers.cs (4)
129
.WithNotification((codeStyle.Notification == NotificationOption2.
Error
) ? NotificationOption2.Warning : NotificationOption2.
Error
),
132
.WithNotification((codeStyle.Notification == NotificationOption2.
Error
) ? NotificationOption2.Warning : NotificationOption2.
Error
),
Microsoft.CodeAnalysis.Workspaces.UnitTests (16)
Options\CodeStyleOptionTests.cs (11)
25
var style = new CodeStyleOption2<int>(1, NotificationOption2.
Error
);
32
var style = new CodeStyleOption2<ExpressionBodyPreference>(ExpressionBodyPreference.WhenOnSingleLine, NotificationOption2.
Error
);
39
var style = new CodeStyleOption2<string>("abc", NotificationOption2.
Error
);
46
new CodeStyleOption2<bool>(true, NotificationOption2.
Error
).WithValue(false),
47
new CodeStyleOption2<bool>(false, NotificationOption2.
Error
));
52
new CodeStyleOption2<int>(1, NotificationOption2.
Error
).WithValue(2),
53
new CodeStyleOption2<int>(2, NotificationOption2.
Error
));
58
new CodeStyleOption2<ExpressionBodyPreference>(ExpressionBodyPreference.Never, NotificationOption2.
Error
).WithValue(ExpressionBodyPreference.WhenPossible),
59
new CodeStyleOption2<ExpressionBodyPreference>(ExpressionBodyPreference.WhenPossible, NotificationOption2.
Error
));
64
new CodeStyleOption2<string>("abc", NotificationOption2.
Error
).WithValue("xyz"),
65
new CodeStyleOption2<string>("xyz", NotificationOption2.
Error
));
Options\DocumentOptionSetTests.cs (2)
23
new CodeStyleOption2<bool>(true, NotificationOption2.
Error
)));
53
new CodeStyleOption2<bool>(true, NotificationOption2.
Error
)));
Remote\ServiceDescriptorTests.cs (3)
248
QualifyFieldAccess = new CodeStyleOption2<bool>(true, NotificationOption2.
Error
)
254
PreferExpressionBodiedIndexers = new CodeStyleOption2<ExpressionBodyPreference>(ExpressionBodyPreference.WhenOnSingleLine, NotificationOption2.
Error
)
270
QualifyFieldAccess = new CodeStyleOption2<bool>(true, NotificationOption2.
Error
)