1- # ##############################
2- # Core EditorConfig Options #
3- # ##############################
1+ # ##############################
2+ # Core EditorConfig Options #
3+ # ##############################
44
5- # All files
6- [* ]
5+ root = true
6+
7+ # All files
8+ [* ]
79charset = utf-8
810end_of_line = crlf
9- indent_style = space
11+ indent_style = space
1012insert_final_newline = true
1113trim_trailing_whitespace = true
1214
13- [* .{csproj,xml,json,yaml} ]
15+ [* .{csproj,xml,json,yml, yaml} ]
1416indent_size = 2
1517
1618[* .md ]
1719trim_trailing_whitespace = false
1820
19- # Code files
20- [* .{cs,csx,vb,vbx} ]
21- indent_size = 4
22- insert_final_newline = true
21+ # Code files
22+ [* .{cs,csx,vb,vbx} ]
23+ indent_size = 4
24+ insert_final_newline = true
2325
24- # ##############################
25- # .NET Coding Conventions #
26- # ##############################
26+ # ##############################
27+ # .NET Coding Conventions #
28+ # ##############################
2729
28- [* .{cs,vb} ]
29- # Organize usings
30+ [* .{cs,vb} ]
31+ # Organize usings
3032dotnet_sort_system_directives_first = true
31- # this. preferences
33+
34+ # this. preferences
3235dotnet_style_qualification_for_field = true :warning
3336dotnet_style_qualification_for_property = true :warning
3437dotnet_style_qualification_for_method = true :warning
3538dotnet_style_qualification_for_event = true :warning
36- # Language keywords vs BCL types preferences
39+
40+ # Language keywords vs BCL types preferences
3741dotnet_style_predefined_type_for_locals_parameters_members = true :warning
3842dotnet_style_predefined_type_for_member_access = true :warning
39- # Parentheses preferences
43+
44+ # Parentheses preferences
4045dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
4146dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
4247dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
4348dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
44- # Modifier preferences
45- dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
46- dotnet_style_readonly_field = true :suggestion
47- # Expression-level preferences
48- dotnet_style_object_initializer = true :suggestion
49- dotnet_style_collection_initializer = true :suggestion
50- dotnet_style_explicit_tuple_names = true :suggestion
51- dotnet_style_null_propagation = true :suggestion
52- dotnet_style_coalesce_expression = true :suggestion
53- dotnet_style_prefer_is_null_check_over_reference_equality_method = true :suggestion
54- dotnet_prefer_inferred_tuple_names = true :suggestion
55- dotnet_prefer_inferred_anonymous_type_member_names = true :suggestion
56- dotnet_style_prefer_auto_properties = true :suggestion
57- dotnet_style_prefer_conditional_expression_over_assignment = true :suggestion
58- dotnet_style_prefer_conditional_expression_over_return = false :warning
59-
60- # ##############################
61- # Naming Conventions #
62- # ##############################
63- # Style Definitions
64- dotnet_naming_style.pascal_case_style.capitalization = pascal_case
65- # Use PascalCase for constant fields
66- dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
67- dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
68- dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
69- dotnet_naming_symbols.constant_fields.applicable_kinds = field
70- dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
71- dotnet_naming_symbols.constant_fields.required_modifiers = const
72-
73- # ##############################
74- # C# Coding Conventions #
75- # ##############################
76- [* .cs ]
77- # var preferences
78- csharp_style_var_for_built_in_types = true
49+
50+ # Modifier preferences
51+ dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
52+ dotnet_style_readonly_field = true :suggestion
53+
54+ # Expression-level preferences
55+ dotnet_style_object_initializer = true :suggestion
56+ dotnet_style_collection_initializer = true :suggestion
57+ dotnet_style_explicit_tuple_names = true :suggestion
58+ dotnet_style_null_propagation = true :suggestion
59+ dotnet_style_coalesce_expression = true :suggestion
60+ dotnet_style_prefer_is_null_check_over_reference_equality_method = true :suggestion
61+ dotnet_prefer_inferred_tuple_names = true :suggestion
62+ dotnet_prefer_inferred_anonymous_type_member_names = true :suggestion
63+ dotnet_style_prefer_auto_properties = true :suggestion
64+ dotnet_style_prefer_conditional_expression_over_assignment = true :suggestion
65+ dotnet_style_prefer_conditional_expression_over_return = false :warning
66+ dotnet_style_operator_placement_when_wrapping = beginning_of_line
67+ dotnet_style_prefer_simplified_boolean_expressions = true :suggestion
68+
69+ # ##############################
70+ # Naming Conventions #
71+ # ##############################
72+
73+ # Style Definitions
74+ dotnet_naming_style.pascal_case_style.capitalization = pascal_case
75+
76+ # Use PascalCase for constant fields
77+ dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
78+ dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
79+ dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
80+ dotnet_naming_symbols.constant_fields.applicable_kinds = field
81+ dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
82+ dotnet_naming_symbols.constant_fields.required_modifiers = const
83+
84+ # ##############################
85+ # C# Coding Conventions #
86+ # ##############################
87+
88+ [* .cs ]
89+ # var preferences
90+ csharp_style_var_for_built_in_types = true
7991csharp_style_var_when_type_is_apparent = true
8092csharp_style_var_elsewhere = true
81- # Expression-bodied members
93+
94+ # Expression-bodied members
8295csharp_style_expression_bodied_methods = false :suggestion
8396csharp_style_expression_bodied_constructors = false :suggestion
8497csharp_style_expression_bodied_operators = false :suggestion
8598csharp_style_expression_bodied_properties = true :suggestion
8699csharp_style_expression_bodied_indexers = true :suggestion
87100csharp_style_expression_bodied_accessors = true :suggestion
101+
88102# Pattern matching preferences
89103csharp_style_pattern_matching_over_is_with_cast_check = true :suggestion
90104csharp_style_pattern_matching_over_as_with_null_check = true :suggestion
91- # Null-checking preferences
105+
106+ # Null-checking preferences
92107csharp_style_throw_expression = true :suggestion
93108csharp_style_conditional_delegate_call = true :suggestion
94- # Modifier preferences
109+
110+ # Modifier preferences
95111csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:error
96- # Expression-level preferences
112+
113+ # Expression-level preferences
97114csharp_prefer_braces = true :silent
98115csharp_style_deconstructed_variable_declaration = true :suggestion
99116csharp_prefer_simple_default_expression = true :suggestion
100117csharp_style_pattern_local_over_anonymous_function = true :suggestion
101118csharp_style_inlined_variable_declaration = true :suggestion
102119
103- # ##############################
104- # C# Formatting Rules #
105- # ##############################
106- # New line preferences
120+ # ##############################
121+ # C# Formatting Rules #
122+ # ##############################
123+
124+ # New line preferences
107125csharp_new_line_before_open_brace = all
108126csharp_new_line_before_else = true
109127csharp_new_line_before_catch = true
110128csharp_new_line_before_finally = true
111129csharp_new_line_before_members_in_object_initializers = true
112130csharp_new_line_before_members_in_anonymous_types = true
113131csharp_new_line_between_query_expression_clauses = true
132+
114133# Indentation preferences
115134csharp_indent_case_contents = true
116135csharp_indent_switch_labels = true
117136csharp_indent_labels = flush_left
137+
118138# Space preferences
119139csharp_space_after_cast = false
120140csharp_space_after_keywords_in_control_flow_statements = true
@@ -127,6 +147,15 @@ csharp_space_around_binary_operators = before_and_after
127147csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
128148csharp_space_between_method_call_name_and_opening_parenthesis = false
129149csharp_space_between_method_call_empty_parameter_list_parentheses = false
150+
130151# Wrapping preferences
131152csharp_preserve_single_line_statements = true
132153csharp_preserve_single_line_blocks = false
154+ csharp_using_directive_placement = outside_namespace:silent
155+ csharp_prefer_simple_using_statement = true :suggestion
156+ csharp_style_namespace_declarations = block_scoped:silent
157+ csharp_style_prefer_method_group_conversion = true :silent
158+ csharp_style_prefer_top_level_statements = true :silent
159+ csharp_style_prefer_primary_constructors = true :suggestion
160+ csharp_style_expression_bodied_lambdas = true :silent
161+ csharp_style_expression_bodied_local_functions = false :silent
0 commit comments