Skip to content

Commit 7dfbb33

Browse files
committed
Add .editorconfig file
1 parent 05dfac5 commit 7dfbb33

File tree

1 file changed

+364
-0
lines changed

1 file changed

+364
-0
lines changed

Diff for: .editorconfig

+364
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,364 @@
1+
root = true
2+
3+
# All files
4+
[*]
5+
indent_style = space
6+
7+
# Xml files
8+
[*.xml]
9+
indent_size = 2
10+
11+
# C# files
12+
[*.cs]
13+
14+
#### Core EditorConfig Options ####
15+
16+
# Indentation and spacing
17+
indent_size = 4
18+
tab_width = 4
19+
20+
# New line preferences
21+
end_of_line = crlf
22+
insert_final_newline = false
23+
24+
#### .NET Coding Conventions ####
25+
[*.{cs,vb}]
26+
27+
# Organize usings
28+
dotnet_separate_import_directive_groups = true
29+
dotnet_sort_system_directives_first = true
30+
file_header_template = unset
31+
32+
# this. and Me. preferences
33+
dotnet_style_qualification_for_event = false:silent
34+
dotnet_style_qualification_for_field = false:silent
35+
dotnet_style_qualification_for_method = false:silent
36+
dotnet_style_qualification_for_property = false:silent
37+
38+
# Language keywords vs BCL types preferences
39+
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
40+
dotnet_style_predefined_type_for_member_access = true:silent
41+
42+
# Parentheses preferences
43+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
44+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
45+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
46+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
47+
48+
# Modifier preferences
49+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
50+
51+
# Expression-level preferences
52+
dotnet_style_coalesce_expression = true:suggestion
53+
dotnet_style_collection_initializer = true:suggestion
54+
dotnet_style_explicit_tuple_names = true:suggestion
55+
dotnet_style_null_propagation = true:suggestion
56+
dotnet_style_object_initializer = true:suggestion
57+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
58+
dotnet_style_prefer_auto_properties = true:suggestion
59+
dotnet_style_prefer_compound_assignment = true:suggestion
60+
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
61+
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
62+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
63+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
64+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
65+
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
66+
dotnet_style_prefer_simplified_interpolation = true:suggestion
67+
68+
# Field preferences
69+
dotnet_style_readonly_field = true:warning
70+
71+
# Parameter preferences
72+
dotnet_code_quality_unused_parameters = all:suggestion
73+
74+
# Suppression preferences
75+
dotnet_remove_unnecessary_suppression_exclusions = none
76+
77+
#### C# Coding Conventions ####
78+
[*.cs]
79+
80+
# var preferences
81+
csharp_style_var_elsewhere = false:silent
82+
csharp_style_var_for_built_in_types = false:silent
83+
csharp_style_var_when_type_is_apparent = false:silent
84+
85+
# Expression-bodied members
86+
csharp_style_expression_bodied_accessors = true:silent
87+
csharp_style_expression_bodied_constructors = false:silent
88+
csharp_style_expression_bodied_indexers = true:silent
89+
csharp_style_expression_bodied_lambdas = true:suggestion
90+
csharp_style_expression_bodied_local_functions = false:silent
91+
csharp_style_expression_bodied_methods = false:silent
92+
csharp_style_expression_bodied_operators = false:silent
93+
csharp_style_expression_bodied_properties = true:silent
94+
95+
# Pattern matching preferences
96+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
97+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
98+
csharp_style_prefer_not_pattern = true:suggestion
99+
csharp_style_prefer_pattern_matching = true:silent
100+
csharp_style_prefer_switch_expression = true:suggestion
101+
102+
# Null-checking preferences
103+
csharp_style_conditional_delegate_call = true:suggestion
104+
105+
# Modifier preferences
106+
csharp_prefer_static_local_function = true:warning
107+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent
108+
109+
# Code-block preferences
110+
csharp_prefer_braces = true:silent
111+
csharp_prefer_simple_using_statement = true:suggestion
112+
113+
# Expression-level preferences
114+
csharp_prefer_simple_default_expression = true:suggestion
115+
csharp_style_deconstructed_variable_declaration = true:suggestion
116+
csharp_style_inlined_variable_declaration = true:suggestion
117+
csharp_style_pattern_local_over_anonymous_function = true:suggestion
118+
csharp_style_prefer_index_operator = true:suggestion
119+
csharp_style_prefer_range_operator = true:suggestion
120+
csharp_style_throw_expression = true:suggestion
121+
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
122+
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
123+
124+
# 'using' directive preferences
125+
csharp_using_directive_placement = outside_namespace:silent
126+
127+
#### C# Formatting Rules ####
128+
129+
# New line preferences
130+
csharp_new_line_before_catch = true
131+
csharp_new_line_before_else = true
132+
csharp_new_line_before_finally = true
133+
csharp_new_line_before_members_in_anonymous_types = true
134+
csharp_new_line_before_members_in_object_initializers = true
135+
csharp_new_line_before_open_brace = all
136+
csharp_new_line_between_query_expression_clauses = true
137+
138+
# Indentation preferences
139+
csharp_indent_block_contents = true
140+
csharp_indent_braces = false
141+
csharp_indent_case_contents = true
142+
csharp_indent_case_contents_when_block = true
143+
csharp_indent_labels = one_less_than_current
144+
csharp_indent_switch_labels = true
145+
146+
# Space preferences
147+
csharp_space_after_cast = false
148+
csharp_space_after_colon_in_inheritance_clause = true
149+
csharp_space_after_comma = true
150+
csharp_space_after_dot = false
151+
csharp_space_after_keywords_in_control_flow_statements = true
152+
csharp_space_after_semicolon_in_for_statement = true
153+
csharp_space_around_binary_operators = before_and_after
154+
csharp_space_around_declaration_statements = false
155+
csharp_space_before_colon_in_inheritance_clause = true
156+
csharp_space_before_comma = false
157+
csharp_space_before_dot = false
158+
csharp_space_before_open_square_brackets = false
159+
csharp_space_before_semicolon_in_for_statement = false
160+
csharp_space_between_empty_square_brackets = false
161+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
162+
csharp_space_between_method_call_name_and_opening_parenthesis = false
163+
csharp_space_between_method_call_parameter_list_parentheses = false
164+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
165+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
166+
csharp_space_between_method_declaration_parameter_list_parentheses = false
167+
csharp_space_between_parentheses = false
168+
csharp_space_between_square_brackets = false
169+
170+
# Wrapping preferences
171+
csharp_preserve_single_line_blocks = true
172+
csharp_preserve_single_line_statements = true
173+
174+
#### Naming styles ####
175+
[*.{cs,vb}]
176+
177+
# Naming rules
178+
179+
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion
180+
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces
181+
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase
182+
183+
dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = suggestion
184+
dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces
185+
dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase
186+
187+
dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = suggestion
188+
dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters
189+
dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase
190+
191+
dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion
192+
dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods
193+
dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase
194+
195+
dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion
196+
dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties
197+
dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase
198+
199+
dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion
200+
dotnet_naming_rule.events_should_be_pascalcase.symbols = events
201+
dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase
202+
203+
dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion
204+
dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables
205+
dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase
206+
207+
dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion
208+
dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants
209+
dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase
210+
211+
dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion
212+
dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters
213+
dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase
214+
215+
dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion
216+
dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields
217+
dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase
218+
219+
dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion
220+
dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields
221+
dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase
222+
223+
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion
224+
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields
225+
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase
226+
227+
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion
228+
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields
229+
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase
230+
231+
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion
232+
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields
233+
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase
234+
235+
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion
236+
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
237+
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase
238+
239+
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
240+
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
241+
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
242+
243+
dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
244+
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
245+
dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase
246+
247+
dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion
248+
dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions
249+
dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase
250+
251+
dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion
252+
dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members
253+
dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase
254+
255+
# Symbol specifications
256+
257+
dotnet_naming_symbols.interfaces.applicable_kinds = interface
258+
dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
259+
dotnet_naming_symbols.interfaces.required_modifiers =
260+
261+
dotnet_naming_symbols.enums.applicable_kinds = enum
262+
dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
263+
dotnet_naming_symbols.enums.required_modifiers =
264+
265+
dotnet_naming_symbols.events.applicable_kinds = event
266+
dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
267+
dotnet_naming_symbols.events.required_modifiers =
268+
269+
dotnet_naming_symbols.methods.applicable_kinds = method
270+
dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
271+
dotnet_naming_symbols.methods.required_modifiers =
272+
273+
dotnet_naming_symbols.properties.applicable_kinds = property
274+
dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
275+
dotnet_naming_symbols.properties.required_modifiers =
276+
277+
dotnet_naming_symbols.public_fields.applicable_kinds = field
278+
dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal
279+
dotnet_naming_symbols.public_fields.required_modifiers =
280+
281+
dotnet_naming_symbols.private_fields.applicable_kinds = field
282+
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
283+
dotnet_naming_symbols.private_fields.required_modifiers =
284+
285+
dotnet_naming_symbols.private_static_fields.applicable_kinds = field
286+
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
287+
dotnet_naming_symbols.private_static_fields.required_modifiers = static
288+
289+
dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum
290+
dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
291+
dotnet_naming_symbols.types_and_namespaces.required_modifiers =
292+
293+
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
294+
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
295+
dotnet_naming_symbols.non_field_members.required_modifiers =
296+
297+
dotnet_naming_symbols.type_parameters.applicable_kinds = namespace
298+
dotnet_naming_symbols.type_parameters.applicable_accessibilities = *
299+
dotnet_naming_symbols.type_parameters.required_modifiers =
300+
301+
dotnet_naming_symbols.private_constant_fields.applicable_kinds = field
302+
dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
303+
dotnet_naming_symbols.private_constant_fields.required_modifiers = const
304+
305+
dotnet_naming_symbols.local_variables.applicable_kinds = local
306+
dotnet_naming_symbols.local_variables.applicable_accessibilities = local
307+
dotnet_naming_symbols.local_variables.required_modifiers =
308+
309+
dotnet_naming_symbols.local_constants.applicable_kinds = local
310+
dotnet_naming_symbols.local_constants.applicable_accessibilities = local
311+
dotnet_naming_symbols.local_constants.required_modifiers = const
312+
313+
dotnet_naming_symbols.parameters.applicable_kinds = parameter
314+
dotnet_naming_symbols.parameters.applicable_accessibilities = *
315+
dotnet_naming_symbols.parameters.required_modifiers =
316+
317+
dotnet_naming_symbols.public_constant_fields.applicable_kinds = field
318+
dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal
319+
dotnet_naming_symbols.public_constant_fields.required_modifiers = const
320+
321+
dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field
322+
dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal
323+
dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static
324+
325+
dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field
326+
dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
327+
dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static
328+
329+
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
330+
dotnet_naming_symbols.local_functions.applicable_accessibilities = *
331+
dotnet_naming_symbols.local_functions.required_modifiers =
332+
333+
# Naming styles
334+
335+
dotnet_naming_style.pascalcase.required_prefix =
336+
dotnet_naming_style.pascalcase.required_suffix =
337+
dotnet_naming_style.pascalcase.word_separator =
338+
dotnet_naming_style.pascalcase.capitalization = pascal_case
339+
340+
dotnet_naming_style.ipascalcase.required_prefix = I
341+
dotnet_naming_style.ipascalcase.required_suffix =
342+
dotnet_naming_style.ipascalcase.word_separator =
343+
dotnet_naming_style.ipascalcase.capitalization = pascal_case
344+
345+
dotnet_naming_style.tpascalcase.required_prefix = T
346+
dotnet_naming_style.tpascalcase.required_suffix =
347+
dotnet_naming_style.tpascalcase.word_separator =
348+
dotnet_naming_style.tpascalcase.capitalization = pascal_case
349+
350+
dotnet_naming_style._camelcase.required_prefix = _
351+
dotnet_naming_style._camelcase.required_suffix =
352+
dotnet_naming_style._camelcase.word_separator =
353+
dotnet_naming_style._camelcase.capitalization = camel_case
354+
355+
dotnet_naming_style.camelcase.required_prefix =
356+
dotnet_naming_style.camelcase.required_suffix =
357+
dotnet_naming_style.camelcase.word_separator =
358+
dotnet_naming_style.camelcase.capitalization = camel_case
359+
360+
dotnet_naming_style.s_camelcase.required_prefix = s_
361+
dotnet_naming_style.s_camelcase.required_suffix =
362+
dotnet_naming_style.s_camelcase.word_separator =
363+
dotnet_naming_style.s_camelcase.capitalization = camel_case
364+

0 commit comments

Comments
 (0)