-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy path.editorconfig
More file actions
82 lines (64 loc) · 3.18 KB
/
Copy path.editorconfig
File metadata and controls
82 lines (64 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
[*.{md,markdown}]
trim_trailing_whitespace = false
[*.{yml,yaml,json}]
indent_size = 2
[*.{csproj,props,targets,slnx,xml,config,resx,manifest,xsd}]
indent_size = 2
[*.{cs,vb}]
# IDE0130: Namespace does not match folder structure
dotnet_style_namespace_match_folder = false
[*.cs]
# IDE0160: Convert to block scoped namespace
dotnet_diagnostic.IDE0160.severity = silent
# WFO1000: WinForms designer code-serialization advisory. MCEC's public properties on Forms
# (Invoker, Settings, DefaultTab, ...) are runtime state, never touched by the WinForms designer,
# so this designer-only concern does not apply.
dotnet_diagnostic.WFO1000.severity = none
# IDE0005 / ReSharper redundant-using: ImplicitUsings is enabled, so many explicit `using`
# directives in legacy files are now redundant. We do NOT want the build (under
# TreatWarningsAsErrors) to break on these, nor to mass-delete usings during cleanup, so
# silence the unused-using diagnostic. It would otherwise show as a spurious editor suggestion.
dotnet_diagnostic.IDE0005.severity = none
resharper_redundant_using_directive_highlighting = none
# Always use braces - no single-line if/else/for/while/using
csharp_prefer_braces = true:warning
# Prefer file-scoped namespaces
csharp_style_namespace_declarations = file_scoped:warning
# Prefer explicit type over var unless the type is apparent from the RHS
csharp_style_var_for_built_in_types = false:silent
csharp_style_var_when_type_is_apparent = true:silent
csharp_style_var_elsewhere = false:silent
# Prefer pattern matching and modern C# idioms (enforced)
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
csharp_style_pattern_matching_over_as_with_null_check = true:warning
csharp_style_prefer_not_pattern = true:warning
csharp_style_prefer_switch_expression = true:warning
# Prefer target-typed new (enforced)
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
# Prefer collection expressions (enforced)
dotnet_style_prefer_collection_expression = true:warning
# Standard C#: no space before parentheses in calls/declarations (`Method(arg)`, `new()`),
# but keep a space after control-flow keywords (`if (x)`, `while (x)`).
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_after_keywords_in_control_flow_statements = true
# ReSharper space knobs - dotnet format reads the csharp_space_* keys above, but ReSharper has
# additional knobs. Kept in sync with the standard no-space-before-parens style above.
resharper_space_before_new_parentheses = false
resharper_space_before_method_call_parentheses = false
resharper_space_before_method_parentheses = false
resharper_space_before_empty_method_call_parentheses = false
resharper_space_before_empty_method_parentheses = false
resharper_space_before_typeof_parentheses = false
resharper_space_before_default_parentheses = false
resharper_space_before_checked_parentheses = false
resharper_space_before_sizeof_parentheses = false
resharper_space_before_nameof_parentheses = false