1
- # # IDE-independent coding style via EditorConfig: https://editorconfig.org/
2
-
1
+ # Remove the line below if you want to inherit .editorconfig settings from higher directories
3
2
root = true
4
-
5
3
[* ]
6
- indent_style = space
4
+ max_line_length =160
5
+ dotnet_style_operator_placement_when_wrapping = beginning_of_line
6
+ tab_width = 4
7
+ indent_size = 4
8
+ end_of_line = crlf
9
+ dotnet_style_coalesce_expression = true :suggestion
10
+ dotnet_style_null_propagation = true :suggestion
11
+ dotnet_style_prefer_is_null_check_over_reference_equality_method = true :suggestion
12
+ dotnet_style_prefer_auto_properties = true :silent
13
+ dotnet_style_object_initializer = true :suggestion
14
+ dotnet_style_collection_initializer = true :suggestion
15
+ dotnet_style_prefer_simplified_boolean_expressions = true :suggestion
16
+ dotnet_style_prefer_conditional_expression_over_assignment = true :silent
17
+ dotnet_style_prefer_conditional_expression_over_return = true :silent
18
+ dotnet_style_explicit_tuple_names = true :suggestion
19
+ dotnet_style_prefer_inferred_tuple_names = true :suggestion
20
+ dotnet_style_prefer_inferred_anonymous_type_member_names = true :suggestion
21
+ dotnet_style_prefer_compound_assignment = true :suggestion
22
+ dotnet_style_prefer_simplified_interpolation = true :suggestion
23
+ # C# files
24
+ [* .cs ]
25
+ csharp_keep_user_linebreaks = true
26
+ wrap_before_comma = false
27
+ wrap_parameters_style = chop_if_long
28
+ max_formal_parameters_on_line = 4
29
+ wrap_after_dot_in_method_calls = false
30
+ csharp_preserve_single_line_blocks = false
31
+ csharp_new_line_between_query_expression_clauses = true
32
+ csharp_new_line_before_members_in_anonymous_types = true
33
+ csharp_new_line_before_open_brace = all
34
+ # ### Core EditorConfig Options ####
35
+ # Indentation and spacing
7
36
indent_size = 4
8
- charset = utf-8
9
- trim_trailing_whitespace = true
10
- insert_final_newline = true
37
+ indent_style = space
38
+ tab_width = 4
39
+ # New line preferences
40
+ end_of_line = crlf
41
+ insert_final_newline = false
42
+ # ### .NET Coding Conventions ####
43
+ # Organize usings
44
+ dotnet_separate_import_directive_groups = false
45
+ dotnet_sort_system_directives_first = true
46
+ # this. and Me. preferences
47
+ dotnet_style_qualification_for_event = false
48
+ dotnet_style_qualification_for_field = false
49
+ dotnet_style_qualification_for_method = false
50
+ dotnet_style_qualification_for_property = false
51
+ # Language keywords vs BCL types preferences
52
+ dotnet_style_predefined_type_for_locals_parameters_members = true
53
+ dotnet_style_predefined_type_for_member_access = true
54
+ # Parentheses preferences
55
+ dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
56
+ dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
57
+ dotnet_style_parentheses_in_other_operators = never_if_unnecessary
58
+ dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
59
+ # Modifier preferences
60
+ dotnet_style_require_accessibility_modifiers = for_non_interface_members
61
+ # Expression-level preferences
62
+ dotnet_style_coalesce_expression = true
63
+ dotnet_style_collection_initializer = true
64
+ dotnet_style_explicit_tuple_names = true
65
+ dotnet_style_null_propagation = true
66
+ dotnet_style_object_initializer = true
67
+ dotnet_style_operator_placement_when_wrapping = beginning_of_line
68
+ dotnet_style_prefer_auto_properties = true
69
+ dotnet_style_prefer_compound_assignment = true
70
+ dotnet_style_prefer_conditional_expression_over_assignment = true
71
+ dotnet_style_prefer_conditional_expression_over_return = true
72
+ dotnet_style_prefer_inferred_anonymous_type_member_names = true
73
+ dotnet_style_prefer_inferred_tuple_names = true
74
+ dotnet_style_prefer_is_null_check_over_reference_equality_method = true
75
+ dotnet_style_prefer_simplified_boolean_expressions = true
76
+ dotnet_style_prefer_simplified_interpolation = true
77
+ # Field preferences
78
+ dotnet_style_readonly_field = true
79
+ # Parameter preferences
80
+ dotnet_code_quality_unused_parameters = all
81
+ # Suppression preferences
82
+ dotnet_remove_unnecessary_suppression_exclusions = none
83
+ # ### C# Coding Conventions ####
84
+ # var preferences
85
+ csharp_style_var_elsewhere = true :silent
86
+ csharp_style_var_for_built_in_types = true :silent
87
+ csharp_style_var_when_type_is_apparent = true :silent
88
+ # Expression-bodied members
89
+ csharp_style_expression_bodied_accessors = true :silent
90
+ csharp_style_expression_bodied_constructors = false :silent
91
+ csharp_style_expression_bodied_indexers = true :silent
92
+ csharp_style_expression_bodied_lambdas = true :silent
93
+ csharp_style_expression_bodied_local_functions = false :silent
94
+ csharp_style_expression_bodied_methods = false :silent
95
+ csharp_style_expression_bodied_operators = false :silent
96
+ csharp_style_expression_bodied_properties = true :silent
97
+ # Pattern matching preferences
98
+ csharp_style_pattern_matching_over_as_with_null_check = true
99
+ csharp_style_pattern_matching_over_is_with_cast_check = true
100
+ csharp_style_prefer_not_pattern = true
101
+ csharp_style_prefer_pattern_matching = true
102
+ csharp_style_prefer_switch_expression = true
103
+ # Null-checking preferences
104
+ csharp_style_conditional_delegate_call = true
105
+ # Modifier preferences
106
+ csharp_prefer_static_local_function = true
107
+ csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
108
+ # Code-block preferences
109
+ csharp_prefer_braces = true :silent
110
+ csharp_prefer_simple_using_statement = true :suggestion
111
+ # Expression-level preferences
112
+ csharp_prefer_simple_default_expression = true
113
+ csharp_style_deconstructed_variable_declaration = true :suggestion
114
+ csharp_style_implicit_object_creation_when_type_is_apparent = true
115
+ csharp_style_inlined_variable_declaration = true :suggestion
116
+ csharp_style_pattern_local_over_anonymous_function = true
117
+ csharp_style_prefer_index_operator = true
118
+ csharp_style_prefer_range_operator = true
119
+ csharp_style_throw_expression = true
120
+ csharp_style_unused_value_assignment_preference = discard_variable
121
+ csharp_style_unused_value_expression_statement_preference = discard_variable
122
+ # 'using' directive preferences
123
+ csharp_using_directive_placement = outside_namespace:silent
124
+ # ### C# Formatting Rules ####
125
+ # New line preferences
126
+ csharp_new_line_before_catch = true
127
+ csharp_new_line_before_else = true
128
+ csharp_new_line_before_finally = true
129
+ csharp_new_line_before_members_in_anonymous_types = true
130
+ csharp_new_line_before_members_in_object_initializers = true
131
+ csharp_new_line_before_open_brace = all
132
+ csharp_new_line_between_query_expression_clauses = true
133
+ # Indentation preferences
134
+ csharp_indent_block_contents = true
135
+ csharp_indent_braces = false
136
+ csharp_indent_case_contents = true
137
+ csharp_indent_case_contents_when_block = true
138
+ csharp_indent_labels = one_less_than_current
139
+ csharp_indent_switch_labels = true
140
+ # Space preferences
141
+ csharp_space_after_cast = false
142
+ csharp_space_after_colon_in_inheritance_clause = true
143
+ csharp_space_after_comma = true
144
+ csharp_space_after_dot = false
145
+ csharp_space_after_keywords_in_control_flow_statements = true
146
+ csharp_space_after_semicolon_in_for_statement = true
147
+ csharp_space_around_binary_operators = before_and_after
148
+ csharp_space_around_declaration_statements = false
149
+ csharp_space_before_colon_in_inheritance_clause = true
150
+ csharp_space_before_comma = false
151
+ csharp_space_before_dot = false
152
+ csharp_space_before_open_square_brackets = false
153
+ csharp_space_before_semicolon_in_for_statement = false
154
+ csharp_space_between_empty_square_brackets = false
155
+ csharp_space_between_method_call_empty_parameter_list_parentheses = false
156
+ csharp_space_between_method_call_name_and_opening_parenthesis = false
157
+ csharp_space_between_method_call_parameter_list_parentheses = false
158
+ csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
159
+ csharp_space_between_method_declaration_name_and_open_parenthesis = false
160
+ csharp_space_between_method_declaration_parameter_list_parentheses = false
161
+ csharp_space_between_parentheses = false
162
+ csharp_space_between_square_brackets = false
163
+ # Wrapping preferences
164
+ csharp_preserve_single_line_blocks = true
165
+ csharp_preserve_single_line_statements = true
166
+ # Namespace declaration preferences
167
+ csharp_style_namespace_declarations = file_scoped:warning
168
+ # ### Naming styles ####
169
+ # Naming rules
170
+ dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
171
+ dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
172
+ dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
173
+ dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
174
+ dotnet_naming_rule.types_should_be_pascal_case.symbols = types
175
+ dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
176
+ dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
177
+ dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
178
+ dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
179
+ # Symbol specifications
180
+ dotnet_naming_symbols.interface.applicable_kinds = interface
181
+ dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
182
+ dotnet_naming_symbols.interface.required_modifiers =
183
+ dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
184
+ dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
185
+ dotnet_naming_symbols.types.required_modifiers =
186
+ dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
187
+ dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
188
+ dotnet_naming_symbols.non_field_members.required_modifiers =
189
+ # Naming styles
190
+ dotnet_naming_style.pascal_case.required_prefix =
191
+ dotnet_naming_style.pascal_case.required_suffix =
192
+ dotnet_naming_style.pascal_case.word_separator =
193
+ dotnet_naming_style.pascal_case.capitalization = pascal_case
194
+ dotnet_naming_style.begins_with_i.required_prefix = I
195
+ dotnet_naming_style.begins_with_i.required_suffix =
196
+ dotnet_naming_style.begins_with_i.word_separator =
197
+ dotnet_naming_style.begins_with_i.capitalization = pascal_case
198
+ # New line preferences
199
+ dotnet_style_allow_multiple_blank_lines_experimental = false
200
+ dotnet_style_allow_statement_immediately_after_block_experimental = false
201
+ csharp_style_prefer_method_group_conversion = true :silent
202
+ csharp_style_prefer_top_level_statements = true :silent
203
+ csharp_style_prefer_primary_constructors = true :suggestion
0 commit comments