Skip to content

Commit efdaa2b

Browse files
committed
Update .editorconfig
1 parent cc869bb commit efdaa2b

File tree

1 file changed

+169
-13
lines changed

1 file changed

+169
-13
lines changed

.editorconfig

+169-13
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,181 @@
1+
# Remove the line below if you want to inherit .editorconfig settings from higher directories
2+
root = true
3+
14
[*]
25
end_of_line = lf
36
indent_style = tab
47
indent_size = 4
8+
tab_width = 4
59
insert_final_newline = true
610
charset = utf-8
711
trim_trailing_whitespace = true
812

913
[*.cs]
10-
csharp_style_var_for_built_in_types = true:warning
11-
csharp_style_var_when_type_is_apparent = true:warning
12-
csharp_style_var_elsewhere = true:suggestion
13-
csharp_style_expression_bodied_methods = true:silent
14-
csharp_style_expression_bodied_constructors = true:silent
15-
csharp_style_expression_bodied_operators = true:silent
16-
csharp_style_expression_bodied_properties = true:silent
17-
csharp_style_expression_bodied_indexers = true:silent
14+
15+
# Organize usings
16+
dotnet_separate_import_directive_groups = false
17+
dotnet_sort_system_directives_first = true
18+
19+
# this. and Me. preferences
20+
dotnet_style_qualification_for_event = false:suggestion
21+
dotnet_style_qualification_for_field = false:suggestion
22+
dotnet_style_qualification_for_method = false:suggestion
23+
dotnet_style_qualification_for_property = false:suggestion
24+
25+
# Language keywords vs BCL types preferences
26+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
27+
dotnet_style_predefined_type_for_member_access = true:suggestion
28+
29+
# Expression-level preferences
30+
dotnet_style_coalesce_expression = true:suggestion
31+
dotnet_style_collection_initializer = true:suggestion
32+
dotnet_style_explicit_tuple_names = true:suggestion
33+
dotnet_style_null_propagation = true:suggestion
34+
dotnet_style_object_initializer = true:suggestion
35+
dotnet_style_prefer_auto_properties = true:suggestion
36+
dotnet_style_prefer_compound_assignment = true:suggestion
37+
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
38+
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
39+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
40+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
41+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
42+
dotnet_style_prefer_simplified_interpolation = true:suggestion
43+
44+
# Field preferences
45+
dotnet_style_readonly_field = true:suggestion
46+
47+
# Parameter preferences
48+
dotnet_code_quality_unused_parameters = all:suggestion
49+
50+
# var preferences
51+
csharp_style_var_elsewhere = false:silent
52+
csharp_style_var_for_built_in_types = false:suggestion
53+
csharp_style_var_when_type_is_apparent = true:suggestion
54+
55+
# Expression-bodied members
1856
csharp_style_expression_bodied_accessors = true:silent
19-
csharp_prefer_braces = false:silent
57+
csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
58+
csharp_style_expression_bodied_indexers = true:silent
59+
csharp_style_expression_bodied_lambdas = true:silent
60+
csharp_style_expression_bodied_local_functions = false:silent
61+
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
62+
csharp_style_expression_bodied_operators = when_on_single_line:suggestion
63+
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
2064

21-
csharp_prefer_simple_default_expression = true
22-
csharp_preserve_single_line_statements = true
23-
csharp_preserve_single_line_blocks = true
65+
# Pattern matching preferences
66+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
67+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
68+
csharp_style_prefer_switch_expression = true:suggestion
2469

25-
dotnet_sort_system_directives_first = true
70+
# Null-checking preferences
71+
csharp_style_conditional_delegate_call = true:suggestion
72+
73+
# Modifier preferences
74+
csharp_prefer_static_local_function = true:suggestion
75+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent
76+
77+
# Code-block preferences
78+
csharp_prefer_braces = false:suggestion
79+
csharp_prefer_simple_using_statement = true:suggestion
80+
81+
# Expression-level preferences
82+
csharp_prefer_simple_default_expression = true:suggestion
83+
csharp_style_deconstructed_variable_declaration = true:suggestion
84+
csharp_style_inlined_variable_declaration = true:suggestion
85+
csharp_style_pattern_local_over_anonymous_function = true:suggestion
86+
csharp_style_prefer_index_operator = true:suggestion
87+
csharp_style_prefer_range_operator = true:suggestion
88+
csharp_style_throw_expression = true:suggestion
89+
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
90+
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
91+
92+
#### C# Formatting Rules ####
93+
94+
# New line preferences
95+
csharp_new_line_before_catch = true
96+
csharp_new_line_before_else = true
97+
csharp_new_line_before_finally = true
98+
csharp_new_line_before_members_in_anonymous_types = true
99+
csharp_new_line_before_members_in_object_initializers = true
100+
csharp_new_line_before_open_brace = all
101+
csharp_new_line_between_query_expression_clauses = true
102+
103+
# Indentation preferences
104+
csharp_indent_block_contents = true
105+
csharp_indent_braces = false
106+
csharp_indent_case_contents = true
107+
csharp_indent_case_contents_when_block = true
108+
csharp_indent_labels = one_less_than_current
109+
csharp_indent_switch_labels = true
110+
111+
# Space preferences
112+
csharp_space_after_cast = false
113+
csharp_space_after_colon_in_inheritance_clause = true
114+
csharp_space_after_comma = true
115+
csharp_space_after_dot = false
116+
csharp_space_after_keywords_in_control_flow_statements = true
117+
csharp_space_after_semicolon_in_for_statement = true
118+
csharp_space_around_binary_operators = before_and_after
119+
csharp_space_around_declaration_statements = false
120+
csharp_space_before_colon_in_inheritance_clause = true
121+
csharp_space_before_comma = false
122+
csharp_space_before_dot = false
123+
csharp_space_before_open_square_brackets = false
124+
csharp_space_before_semicolon_in_for_statement = false
125+
csharp_space_between_empty_square_brackets = false
126+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
127+
csharp_space_between_method_call_name_and_opening_parenthesis = false
128+
csharp_space_between_method_call_parameter_list_parentheses = false
129+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
130+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
131+
csharp_space_between_method_declaration_parameter_list_parentheses = false
132+
csharp_space_between_parentheses = false
133+
csharp_space_between_square_brackets = false
134+
135+
# Wrapping preferences
136+
csharp_preserve_single_line_blocks = false
137+
csharp_preserve_single_line_statements = false
138+
139+
#### Naming styles ####
140+
141+
# Naming rules
142+
143+
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
144+
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
145+
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
146+
147+
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
148+
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
149+
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
150+
151+
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
152+
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
153+
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
154+
155+
# Symbol specifications
156+
dotnet_naming_symbols.interface.applicable_kinds = interface
157+
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
158+
dotnet_naming_symbols.interface.required_modifiers =
159+
160+
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
161+
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
162+
dotnet_naming_symbols.types.required_modifiers =
163+
164+
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
165+
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
166+
dotnet_naming_symbols.non_field_members.required_modifiers =
167+
168+
# Naming styles
169+
170+
dotnet_naming_style.pascal_case.required_prefix =
171+
dotnet_naming_style.pascal_case.required_suffix =
172+
dotnet_naming_style.pascal_case.word_separator =
173+
dotnet_naming_style.pascal_case.capitalization = pascal_case
174+
175+
dotnet_naming_style.begins_with_i.required_prefix = I
176+
dotnet_naming_style.begins_with_i.required_suffix =
177+
dotnet_naming_style.begins_with_i.word_separator =
178+
dotnet_naming_style.begins_with_i.capitalization = pascal_case
179+
180+
dotnet_diagnostic.CA1303.severity = suggestion
181+
dotnet_diagnostic.CA1031.severity = suggestion

0 commit comments

Comments
 (0)