-
Notifications
You must be signed in to change notification settings - Fork 1
/
.editorconfig
91 lines (71 loc) · 3.58 KB
/
.editorconfig
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
83
84
85
86
87
88
89
90
91
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
[*.{csproj,props,json,xml,xsd}]
indent_size = 2
[*.{cs,razor}]
indent_size = 4
# Formatting errors
dotnet_diagnostic.IDE0055.severity = warning
# Bracing and newline preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_members_in_object_initializers = true
csharp_prefer_braces = false:suggestion
# this. qualification
dotnet_style_qualification_for_field = true:warning
dotnet_style_qualification_for_method = true:warning
dotnet_style_qualification_for_property = true:warning
dotnet_style_qualification_for_event = true:warning
# Switch style
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_switch_labels = false
# Sort System.* using directives alphabetically, and place them before other usings
dotnet_sort_system_directives_first = true
# Leave code block on single line
csharp_preserve_single_line_blocks = true
# Leave statements and member declarations on the same line
csharp_preserve_single_line_statements = true
# Prefer no curly braces if allowed
csharp_prefer_braces = false:suggestion
# Block preferences
csharp_style_expression_bodied_constructors = false:suggestion
csharp_style_expression_bodied_methods = true:suggestion
csharp_style_expression_bodied_operators = true:suggestion
csharp_style_expression_bodied_properties = true:suggestion
# Prefer out variables to be declared inline in the argument list of a method call when possible
csharp_style_inlined_variable_declaration = true:suggestion
# Prefer tuple names to ItemX properties
dotnet_style_explicit_tuple_names = true:suggestion
# Prefer the language keyword for member access expressions, instead of the type name, for types that have a keyword to represent them
dotnet_style_predefined_type_for_member_access = true:suggestion
# Prefer default over default(T)
csharp_prefer_simple_default_expression = true:suggestion
# Prefer objects to be initialized using object initializers when possible
dotnet_style_object_initializer = true:suggestion
# Prefer inferred tuple element names
dotnet_style_prefer_inferred_tuple_names = true:suggestion
# Prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
# Var preferences
csharp_style_var_elsewhere = true:suggestion
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
# Using directive preferences
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
# Prefer file scoped namespaces over braced namespaces
csharp_style_namespace_declarations = file_scoped:warning
# Prefer local functions over anonymous functions
csharp_style_pattern_local_over_anonymous_function = true:suggestion
# Prefer accessibility modifiers to be declared except for public interface members. This will currently not differ from always and will act as future proofing for if C# adds default interface methods.
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
# When this rule is set to a list of modifiers, prefer the specified ordering.
csharp_preferred_modifier_order = public,private,protected,internal,static,readonly,override,abstract,new:suggestion
# Prefer pattern matching instead of is expression with type casts
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion