1- # ##############################
2- # Core EditorConfig Options #
3- # ##############################
4- root = true
5-
6- # All files
7- [* ]
8- tab_width = 4
9- end_of_line = crlf
10- indent_style = space
11-
12- # XML project files
13- [* .{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj} ]
14- indent_size = 2
15-
16- # XML config files
17- [* .{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct} ]
18- indent_size = 2
19-
20- # ##############################
21- # .NET Coding Conventions #
22- # ##############################
23- [* .{cs,vb} ]
24-
25- # Suppress CS1591: Missing XML comment for publicly visible type or member
26- dotnet_diagnostic.CS1591.severity = none
27-
28- # Suppress IDE0058: Expression value is never used
29- dotnet_diagnostic.IDE0058.severity = none
30-
31- # Organize usings
32- dotnet_sort_system_directives_first = true :error
33- dotnet_separate_import_directive_groups = true :error
34-
35- # Unfortunately, no java-style usings
36- dotnet_diagnostic.IDE0064.severity = none
37-
38- # Using directive is unnecessary.
39- dotnet_diagnostic.IDE0005.severity = error
40-
41- # this. preferences
42- dotnet_style_qualification_for_field = false :error
43- dotnet_style_qualification_for_property = false :error
44- dotnet_style_qualification_for_method = false :error
45- dotnet_style_qualification_for_event = false :error
46-
47- # Language keywords vs BCL types preferences
48- dotnet_style_predefined_type_for_locals_parameters_members = true :error
49- dotnet_style_predefined_type_for_member_access = true :error
50-
51- # Parentheses preferences
52- dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:error
53- dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:error
54- dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:error
55- dotnet_style_parentheses_in_other_operators = never_if_unnecessary:error
56-
57- # Modifier preferences
58- dotnet_style_require_accessibility_modifiers = always:error
59- dotnet_style_readonly_field = true :error
60-
61- # Expression-level preferences
62- dotnet_style_object_initializer = true :error
63- dotnet_style_collection_initializer = true :error
64- dotnet_style_explicit_tuple_names = true :error
65- dotnet_style_null_propagation = true :error
66- dotnet_style_coalesce_expression = true :error
67- dotnet_style_prefer_is_null_check_over_reference_equality_method = true :error
68- dotnet_style_prefer_inferred_tuple_names = true :error
69- dotnet_style_prefer_inferred_anonymous_type_member_names = true :error
70- dotnet_style_prefer_auto_properties = true :error
71- dotnet_style_prefer_conditional_expression_over_assignment = true :error
72- dotnet_style_prefer_conditional_expression_over_return = true :error
73-
74- # Don't force namespaces to match their folder names (DSharpPlus.Entities)
75- dotnet_diagnostic.IDE0130.severity = none
76- dotnet_style_namespace_match_folder = false
77-
78- dotnet_style_prefer_simplified_boolean_expressions = true :error
79- dotnet_style_operator_placement_when_wrapping = beginning_of_line:error
80-
81- # ##############################
82- # Naming Conventions #
83- # ##############################
84-
85- # Style Definitions
86- dotnet_naming_style.pascal_case_style.capitalization = pascal_case
87-
88- # Use PascalCase for constant fields
89- dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = error
90- dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
91- dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
92- dotnet_naming_symbols.constant_fields.applicable_kinds = field
93- dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
94- dotnet_naming_symbols.constant_fields.required_modifiers = const
95-
96- # Interfaces should start with I
97- dotnet_naming_rule.interface_should_be_begins_with_i.severity = error
98- dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
99- dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
100- dotnet_naming_style.begins_with_i.required_prefix = I
101- dotnet_naming_style.begins_with_i.capitalization = pascal_case
102- dotnet_naming_symbols.interface.applicable_kinds = interface
103-
104- # Async Methods should end with Async
105- dotnet_naming_rule.async_methods_should_be_async_suffix.severity = error
106- dotnet_naming_rule.async_methods_should_be_async_suffix.symbols = async_methods
107- dotnet_naming_rule.async_methods_should_be_async_suffix.style = async_suffix
108- dotnet_naming_style.async_suffix.required_suffix = Async
109- dotnet_naming_style.async_suffix.capitalization = pascal_case
110- dotnet_naming_symbols.async_methods.applicable_kinds = method
111- dotnet_naming_symbols.async_methods.required_modifiers = async
112-
113- # ##############################
114- # C# Coding Conventions #
115- # ##############################
116- [* .cs ]
117-
118- # File-scoped namespaces
119- csharp_style_namespace_declarations = file_scoped:error
120-
121- # var preferences
122- csharp_style_var_for_built_in_types = false :error
123- csharp_style_var_when_type_is_apparent = false :error
124- csharp_style_var_elsewhere = false :error
125-
126- # Pattern matching preferences
127- csharp_style_pattern_matching_over_is_with_cast_check = true :error
128- csharp_style_pattern_matching_over_as_with_null_check = true :error
129-
130- # Null-checking preferences
131- csharp_style_throw_expression = true :error
132- csharp_style_conditional_delegate_call = true :error
133-
134- # Modifier preferences
135- csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:error
136-
137- # Expression-level preferences
138- csharp_prefer_braces = true :error
139- csharp_style_deconstructed_variable_declaration = true :error
140- csharp_prefer_simple_default_expression = true :error
141- csharp_style_pattern_local_over_anonymous_function = true :error
142- csharp_style_inlined_variable_declaration = true :error
143-
144- # ##############################
145- # C# Formatting Rules #
146- # ##############################
147-
148- # https://stackoverflow.com/q/63369382/10942966
149- csharp_qualified_using_at_nested_scope = true :error
150-
151- # New line preferences
152- csharp_new_line_before_open_brace = all
153- csharp_new_line_before_else = true
154- csharp_new_line_before_catch = true
155- csharp_new_line_before_finally = true
156- csharp_new_line_before_members_in_object_initializers = true
157- csharp_new_line_before_members_in_anonymous_types = true
158- csharp_new_line_between_query_expression_clauses = true
159-
160- # Indentation preferences
161- charset = utf-8
162- indent_size = 4
163- insert_final_newline = true
164- csharp_indent_case_contents = true
165- csharp_indent_switch_labels = true
166- csharp_indent_labels = flush_left
167-
168- # Space preferences
169- csharp_space_after_cast = false
170- csharp_space_after_keywords_in_control_flow_statements = true
171- csharp_space_between_method_call_parameter_list_parentheses = false
172- csharp_space_between_method_declaration_parameter_list_parentheses = false
173- csharp_space_between_parentheses = false
174- csharp_space_before_colon_in_inheritance_clause = true
175- csharp_space_after_colon_in_inheritance_clause = true
176- csharp_space_around_binary_operators = before_and_after
177- csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
178- csharp_space_between_method_call_name_and_opening_parenthesis = false
179- csharp_space_between_method_call_empty_parameter_list_parentheses = false
180-
181- # Wrapping preferences
182- csharp_preserve_single_line_statements = true
183- csharp_preserve_single_line_blocks = true
184-
185- # Use regular constructors over primary constructors
186- csharp_style_prefer_primary_constructors = false :error
187-
188- # Expression-bodied members
189- csharp_style_expression_bodied_methods = true :error
190- csharp_style_expression_bodied_constructors = true :error
191- csharp_style_expression_bodied_operators = true :error
192- csharp_style_expression_bodied_properties = true :error
193- csharp_style_expression_bodied_indexers = true :error
194- csharp_style_expression_bodied_accessors = true :error
1+ # ##############################
2+ # Core EditorConfig Options #
3+ # ##############################
4+ root = true
5+
6+ # All files
7+ [* ]
8+ tab_width = 4
9+ end_of_line = crlf
10+ indent_style = space
11+
12+ # XML project files
13+ [* .{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj} ]
14+ indent_size = 2
15+
16+ # XML config files
17+ [* .{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct} ]
18+ indent_size = 2
19+
20+ # ##############################
21+ # .NET Coding Conventions #
22+ # ##############################
23+ [* .{cs,vb} ]
24+
25+ # Suppress CS1591: Missing XML comment for publicly visible type or member
26+ dotnet_diagnostic.CS1591.severity = none
27+
28+ # Suppress IDE0058: Expression value is never used
29+ dotnet_diagnostic.IDE0058.severity = none
30+
31+ # Organize usings
32+ dotnet_sort_system_directives_first = true :error
33+ dotnet_separate_import_directive_groups = true :error
34+
35+ # Unfortunately, no java-style usings
36+ dotnet_diagnostic.IDE0064.severity = none
37+
38+ # Using directive is unnecessary.
39+ dotnet_diagnostic.IDE0005.severity = error
40+
41+ # this. preferences
42+ dotnet_style_qualification_for_field = false :error
43+ dotnet_style_qualification_for_property = false :error
44+ dotnet_style_qualification_for_method = false :error
45+ dotnet_style_qualification_for_event = false :error
46+
47+ # Language keywords vs BCL types preferences
48+ dotnet_style_predefined_type_for_locals_parameters_members = true :error
49+ dotnet_style_predefined_type_for_member_access = true :error
50+
51+ # Parentheses preferences
52+ dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:error
53+ dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:error
54+ dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:error
55+ dotnet_style_parentheses_in_other_operators = never_if_unnecessary:error
56+
57+ # Modifier preferences
58+ dotnet_style_require_accessibility_modifiers = always:error
59+ dotnet_style_readonly_field = true :error
60+
61+ # Expression-level preferences
62+ dotnet_style_object_initializer = true :error
63+ dotnet_style_collection_initializer = true :error
64+ dotnet_style_explicit_tuple_names = true :error
65+ dotnet_style_null_propagation = true :error
66+ dotnet_style_coalesce_expression = true :error
67+ dotnet_style_prefer_is_null_check_over_reference_equality_method = true :error
68+ dotnet_style_prefer_inferred_tuple_names = true :error
69+ dotnet_style_prefer_inferred_anonymous_type_member_names = true :error
70+ dotnet_style_prefer_auto_properties = true :error
71+ dotnet_style_prefer_conditional_expression_over_assignment = true :error
72+ dotnet_style_prefer_conditional_expression_over_return = true :error
73+
74+ # Don't force namespaces to match their folder names (DSharpPlus.Entities)
75+ dotnet_diagnostic.IDE0130.severity = none
76+ dotnet_style_namespace_match_folder = false
77+
78+ dotnet_style_prefer_simplified_boolean_expressions = true :error
79+ dotnet_style_operator_placement_when_wrapping = beginning_of_line:error
80+
81+ # ##############################
82+ # Naming Conventions #
83+ # ##############################
84+
85+ # Style Definitions
86+ dotnet_naming_style.pascal_case_style.capitalization = pascal_case
87+
88+ # Use PascalCase for constant fields
89+ dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = error
90+ dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
91+ dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
92+ dotnet_naming_symbols.constant_fields.applicable_kinds = field
93+ dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
94+ dotnet_naming_symbols.constant_fields.required_modifiers = const
95+
96+ # Interfaces should start with I
97+ dotnet_naming_rule.interface_should_be_begins_with_i.severity = error
98+ dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
99+ dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
100+ dotnet_naming_style.begins_with_i.required_prefix = I
101+ dotnet_naming_style.begins_with_i.capitalization = pascal_case
102+ dotnet_naming_symbols.interface.applicable_kinds = interface
103+
104+ # Async Methods should end with Async
105+ dotnet_naming_rule.async_methods_should_be_async_suffix.severity = error
106+ dotnet_naming_rule.async_methods_should_be_async_suffix.symbols = async_methods
107+ dotnet_naming_rule.async_methods_should_be_async_suffix.style = async_suffix
108+ dotnet_naming_style.async_suffix.required_suffix = Async
109+ dotnet_naming_style.async_suffix.capitalization = pascal_case
110+ dotnet_naming_symbols.async_methods.applicable_kinds = method
111+ dotnet_naming_symbols.async_methods.required_modifiers = async
112+
113+ # ##############################
114+ # C# Coding Conventions #
115+ # ##############################
116+ [* .cs ]
117+
118+ # File-scoped namespaces
119+ csharp_style_namespace_declarations = file_scoped:error
120+
121+ # var preferences
122+ csharp_style_var_for_built_in_types = false :error
123+ csharp_style_var_when_type_is_apparent = false :error
124+ csharp_style_var_elsewhere = false :error
125+
126+ # Pattern matching preferences
127+ csharp_style_pattern_matching_over_is_with_cast_check = true :error
128+ csharp_style_pattern_matching_over_as_with_null_check = true :error
129+
130+ # Null-checking preferences
131+ csharp_style_throw_expression = true :error
132+ csharp_style_conditional_delegate_call = true :error
133+
134+ # Modifier preferences
135+ csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:error
136+
137+ # Expression-level preferences
138+ csharp_prefer_braces = true :error
139+ csharp_style_deconstructed_variable_declaration = true :error
140+ csharp_prefer_simple_default_expression = true :error
141+ csharp_style_pattern_local_over_anonymous_function = true :error
142+ csharp_style_inlined_variable_declaration = true :error
143+
144+ # ##############################
145+ # C# Formatting Rules #
146+ # ##############################
147+
148+ # https://stackoverflow.com/q/63369382/10942966
149+ csharp_qualified_using_at_nested_scope = true :error
150+ csharp_using_directive_placement = inside_namespace:error
151+
152+ # New line preferences
153+ csharp_new_line_before_open_brace = all
154+ csharp_new_line_before_else = true
155+ csharp_new_line_before_catch = true
156+ csharp_new_line_before_finally = true
157+ csharp_new_line_before_members_in_object_initializers = true
158+ csharp_new_line_before_members_in_anonymous_types = true
159+ csharp_new_line_between_query_expression_clauses = true
160+
161+ # Indentation preferences
162+ charset = utf-8
163+ indent_size = 4
164+ insert_final_newline = true
165+ csharp_indent_case_contents = true
166+ csharp_indent_switch_labels = true
167+ csharp_indent_labels = flush_left
168+
169+ # Space preferences
170+ csharp_space_after_cast = false
171+ csharp_space_after_keywords_in_control_flow_statements = true
172+ csharp_space_between_method_call_parameter_list_parentheses = false
173+ csharp_space_between_method_declaration_parameter_list_parentheses = false
174+ csharp_space_between_parentheses = false
175+ csharp_space_before_colon_in_inheritance_clause = true
176+ csharp_space_after_colon_in_inheritance_clause = true
177+ csharp_space_around_binary_operators = before_and_after
178+ csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
179+ csharp_space_between_method_call_name_and_opening_parenthesis = false
180+ csharp_space_between_method_call_empty_parameter_list_parentheses = false
181+
182+ # Wrapping preferences
183+ csharp_preserve_single_line_statements = true
184+ csharp_preserve_single_line_blocks = true
185+
186+ # Use regular constructors over primary constructors
187+ csharp_style_prefer_primary_constructors = false :error
188+
189+ # Expression-bodied members
190+ csharp_style_expression_bodied_methods = true :error
191+ csharp_style_expression_bodied_constructors = true :error
192+ csharp_style_expression_bodied_operators = true :error
193+ csharp_style_expression_bodied_properties = true :error
194+ csharp_style_expression_bodied_indexers = true :error
195+ csharp_style_expression_bodied_accessors = true :error
195196csharp_style_expression_bodied_lambdas = true :error
0 commit comments