@@ -10,8 +10,15 @@ indent_size = 2
1010
1111# CS files
1212[* .cs ]
13+
14+ # ### Core EditorConfig Options ####
15+
16+ # Indentation and spacing
1317indent_size = 4
18+ indent_style = space
19+ tab_width = 4
1420
21+ # ## .NET Analyzers and Code Style Options ####
1522dotnet_diagnostic.CA1001.severity = suggestion # CA1001: Type owns disposable field(s) but is not disposable
1623dotnet_diagnostic.CA1848.severity = suggestion # CA1848: For improved performance, use the LoggerMessage delegates
1724dotnet_diagnostic.CA1707.severity = none # CA1707: Remove underscores from member name
@@ -25,4 +32,234 @@ dotnet_diagnostic.RCS1211.severity = warning # Remove unnecessary else cl
2532dotnet_diagnostic.RCS1214.severity = warning # Unnecessary interpolated string.
2633dotnet_diagnostic.RCS1225.severity = warning # Make class sealed.
2734dotnet_diagnostic.RCS1141.severity = warning # Add documentation comment to public members.
28- dotnet_diagnostic.RCS1232.severity = warning # Order elements in documentation comment.
35+ dotnet_diagnostic.RCS1232.severity = warning # Order elements in documentation comment.
36+
37+ # ### .NET Code Actions ####
38+
39+ # Type members
40+ dotnet_hide_advanced_members = false
41+ dotnet_member_insertion_location = with_other_members_of_the_same_kind
42+ dotnet_property_generation_behavior = prefer_throwing_properties
43+
44+ # Symbol search
45+ dotnet_search_reference_assemblies = true
46+
47+ # ### .NET Coding Conventions ####
48+
49+ # Organize usings
50+ dotnet_separate_import_directive_groups = false
51+ dotnet_sort_system_directives_first = false
52+ file_header_template = unset
53+
54+ # this. and Me. preferences
55+ dotnet_style_qualification_for_event = false
56+ dotnet_style_qualification_for_field = false
57+ dotnet_style_qualification_for_method = false
58+ dotnet_style_qualification_for_property = false
59+
60+ # Language keywords vs BCL types preferences
61+ dotnet_style_predefined_type_for_locals_parameters_members = true
62+ dotnet_style_predefined_type_for_member_access = true
63+
64+ # Parentheses preferences
65+ dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
66+ dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
67+ dotnet_style_parentheses_in_other_operators = never_if_unnecessary
68+ dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
69+
70+ # Modifier preferences
71+ dotnet_style_require_accessibility_modifiers = for_non_interface_members
72+
73+ # Expression-level preferences
74+ dotnet_prefer_system_hash_code = true
75+ dotnet_style_coalesce_expression = true
76+ dotnet_style_collection_initializer = true
77+ dotnet_style_explicit_tuple_names = true
78+ dotnet_style_namespace_match_folder = true
79+ dotnet_style_null_propagation = true
80+ dotnet_style_object_initializer = true
81+ dotnet_style_operator_placement_when_wrapping = beginning_of_line
82+ dotnet_style_prefer_auto_properties = true
83+ dotnet_style_prefer_collection_expression = when_types_loosely_match
84+ dotnet_style_prefer_compound_assignment = true
85+ dotnet_style_prefer_conditional_expression_over_assignment = true
86+ dotnet_style_prefer_conditional_expression_over_return = true
87+ dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
88+ dotnet_style_prefer_inferred_anonymous_type_member_names = true
89+ dotnet_style_prefer_inferred_tuple_names = true
90+ dotnet_style_prefer_is_null_check_over_reference_equality_method = true
91+ dotnet_style_prefer_simplified_boolean_expressions = true
92+ dotnet_style_prefer_simplified_interpolation = true
93+
94+ # Field preferences
95+ dotnet_style_readonly_field = true
96+
97+ # Parameter preferences
98+ dotnet_code_quality_unused_parameters = all
99+
100+ # Suppression preferences
101+ dotnet_remove_unnecessary_suppression_exclusions = none
102+
103+ # New line preferences
104+ dotnet_style_allow_multiple_blank_lines_experimental = true
105+ dotnet_style_allow_statement_immediately_after_block_experimental = true
106+
107+ # ### C# Coding Conventions ####
108+
109+ # var preferences
110+ csharp_style_var_elsewhere = false
111+ csharp_style_var_for_built_in_types = false
112+ csharp_style_var_when_type_is_apparent = false
113+
114+ # Expression-bodied members
115+ csharp_style_expression_bodied_accessors = true
116+ csharp_style_expression_bodied_constructors = false
117+ csharp_style_expression_bodied_indexers = true
118+ csharp_style_expression_bodied_lambdas = true
119+ csharp_style_expression_bodied_local_functions = false
120+ csharp_style_expression_bodied_methods = false
121+ csharp_style_expression_bodied_operators = false
122+ csharp_style_expression_bodied_properties = true
123+
124+ # Pattern matching preferences
125+ csharp_style_pattern_matching_over_as_with_null_check = true
126+ csharp_style_pattern_matching_over_is_with_cast_check = true
127+ csharp_style_prefer_extended_property_pattern = true
128+ csharp_style_prefer_not_pattern = true
129+ csharp_style_prefer_pattern_matching = true
130+ csharp_style_prefer_switch_expression = true
131+
132+ # Null-checking preferences
133+ csharp_style_conditional_delegate_call = true
134+
135+ # Modifier preferences
136+ csharp_prefer_static_anonymous_function = true
137+ csharp_prefer_static_local_function = true
138+ csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
139+ csharp_style_prefer_readonly_struct = true
140+ csharp_style_prefer_readonly_struct_member = true
141+
142+ # Code-block preferences
143+ csharp_prefer_braces = true
144+ csharp_prefer_simple_using_statement = true
145+ csharp_prefer_system_threading_lock = true
146+ csharp_style_namespace_declarations = block_scoped
147+ csharp_style_prefer_method_group_conversion = true
148+ csharp_style_prefer_primary_constructors = true
149+ csharp_style_prefer_top_level_statements = true
150+
151+ # Expression-level preferences
152+ csharp_prefer_simple_default_expression = true
153+ csharp_style_deconstructed_variable_declaration = true
154+ csharp_style_implicit_object_creation_when_type_is_apparent = true
155+ csharp_style_inlined_variable_declaration = true
156+ csharp_style_prefer_implicitly_typed_lambda_expression = true
157+ csharp_style_prefer_index_operator = true
158+ csharp_style_prefer_local_over_anonymous_function = true
159+ csharp_style_prefer_null_check_over_type_check = true
160+ csharp_style_prefer_range_operator = true
161+ csharp_style_prefer_tuple_swap = true
162+ csharp_style_prefer_unbound_generic_type_in_nameof = true
163+ csharp_style_prefer_utf8_string_literals = true
164+ csharp_style_throw_expression = true
165+ csharp_style_unused_value_assignment_preference = discard_variable
166+ csharp_style_unused_value_expression_statement_preference = discard_variable
167+
168+ # 'using' directive preferences
169+ csharp_using_directive_placement = outside_namespace
170+
171+ # New line preferences
172+ csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
173+ csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
174+ csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
175+ csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
176+ csharp_style_allow_embedded_statements_on_same_line_experimental = true
177+
178+ # ### C# Formatting Rules ####
179+
180+ # New line preferences
181+ csharp_new_line_before_catch = true
182+ csharp_new_line_before_else = true
183+ csharp_new_line_before_finally = true
184+ csharp_new_line_before_members_in_anonymous_types = true
185+ csharp_new_line_before_members_in_object_initializers = true
186+ csharp_new_line_before_open_brace = all
187+ csharp_new_line_between_query_expression_clauses = true
188+
189+ # Indentation preferences
190+ csharp_indent_block_contents = true
191+ csharp_indent_braces = false
192+ csharp_indent_case_contents = true
193+ csharp_indent_case_contents_when_block = true
194+ csharp_indent_labels = one_less_than_current
195+ csharp_indent_switch_labels = true
196+
197+ # Space preferences
198+ csharp_space_after_cast = false
199+ csharp_space_after_colon_in_inheritance_clause = true
200+ csharp_space_after_comma = true
201+ csharp_space_after_dot = false
202+ csharp_space_after_keywords_in_control_flow_statements = true
203+ csharp_space_after_semicolon_in_for_statement = true
204+ csharp_space_around_binary_operators = before_and_after
205+ csharp_space_around_declaration_statements = false
206+ csharp_space_before_colon_in_inheritance_clause = true
207+ csharp_space_before_comma = false
208+ csharp_space_before_dot = false
209+ csharp_space_before_open_square_brackets = false
210+ csharp_space_before_semicolon_in_for_statement = false
211+ csharp_space_between_empty_square_brackets = false
212+ csharp_space_between_method_call_empty_parameter_list_parentheses = false
213+ csharp_space_between_method_call_name_and_opening_parenthesis = false
214+ csharp_space_between_method_call_parameter_list_parentheses = false
215+ csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
216+ csharp_space_between_method_declaration_name_and_open_parenthesis = false
217+ csharp_space_between_method_declaration_parameter_list_parentheses = false
218+ csharp_space_between_parentheses = false
219+ csharp_space_between_square_brackets = false
220+
221+ # Wrapping preferences
222+ csharp_preserve_single_line_blocks = true
223+ csharp_preserve_single_line_statements = true
224+
225+ # ### Naming styles ####
226+
227+ # Naming rules
228+
229+ dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
230+ dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
231+ dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
232+
233+ dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
234+ dotnet_naming_rule.types_should_be_pascal_case.symbols = types
235+ dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
236+
237+ dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
238+ dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
239+ dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
240+
241+ # Symbol specifications
242+
243+ dotnet_naming_symbols.interface.applicable_kinds = interface
244+ dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
245+ dotnet_naming_symbols.interface.required_modifiers =
246+
247+ dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
248+ dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
249+ dotnet_naming_symbols.types.required_modifiers =
250+
251+ dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
252+ dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
253+ dotnet_naming_symbols.non_field_members.required_modifiers =
254+
255+ # Naming styles
256+
257+ dotnet_naming_style.pascal_case.required_prefix =
258+ dotnet_naming_style.pascal_case.required_suffix =
259+ dotnet_naming_style.pascal_case.word_separator =
260+ dotnet_naming_style.pascal_case.capitalization = pascal_case
261+
262+ dotnet_naming_style.begins_with_i.required_prefix = I
263+ dotnet_naming_style.begins_with_i.required_suffix =
264+ dotnet_naming_style.begins_with_i.word_separator =
265+ dotnet_naming_style.begins_with_i.capitalization = pascal_case
0 commit comments