|
1 | | -# Rules in this file were initially inferred by Visual Studio IntelliCode from the C:\Users\david\Projects\Simple.OData.Client codebase based on best match to current usage at 08/12/2021 |
2 | | -# You can modify the rules from these initially generated values to suit your own policies |
3 | | -# You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference |
4 | | -[*.cs] |
5 | | - |
| 1 | +root = true |
6 | 2 |
|
7 | | -#Core editorconfig formatting - indentation |
8 | | - |
9 | | -#use soft tabs (spaces) for indentation |
| 3 | +[*] |
| 4 | +charset = utf-8 |
10 | 5 | indent_style = space |
11 | 6 |
|
12 | | -#Formatting - indentation options |
13 | | - |
14 | | -#indent switch case contents. |
15 | | -csharp_indent_case_contents = true |
16 | | -#indent switch labels |
17 | | -csharp_indent_switch_labels = true |
18 | | - |
19 | | -#Formatting - new line options |
20 | | - |
21 | | -#place catch statements on a new line |
22 | | -csharp_new_line_before_catch = true |
23 | | -#place else statements on a new line |
24 | | -csharp_new_line_before_else = true |
25 | | -#require members of anonymous types to be on separate lines |
26 | | -csharp_new_line_before_members_in_anonymous_types = true |
27 | | -#require members of object initializers to be on the same line |
28 | | -csharp_new_line_before_members_in_object_initializers = false |
29 | | -#require braces to be on a new line for methods, accessors, object_collection_array_initializers, control_blocks, properties, lambdas, anonymous_types, and types (also known as "Allman" style) |
30 | | -csharp_new_line_before_open_brace = methods, accessors, object_collection_array_initializers, control_blocks, properties, lambdas, anonymous_types, types |
31 | | - |
32 | | -#Formatting - organize using options |
33 | | - |
34 | | -#sort System.* using directives alphabetically, and place them before other usings |
35 | | -dotnet_sort_system_directives_first = true |
36 | | - |
37 | | -#Formatting - spacing options |
38 | | - |
39 | | -#require NO space between a cast and the value |
40 | | -csharp_space_after_cast = false |
41 | | -#require a space before the colon for bases or interfaces in a type declaration |
42 | | -csharp_space_after_colon_in_inheritance_clause = true |
43 | | -#require a space after a keyword in a control flow statement such as a for loop |
44 | | -csharp_space_after_keywords_in_control_flow_statements = true |
45 | | -#require a space before the colon for bases or interfaces in a type declaration |
46 | | -csharp_space_before_colon_in_inheritance_clause = true |
47 | | -#remove space within empty argument list parentheses |
48 | | -csharp_space_between_method_call_empty_parameter_list_parentheses = false |
49 | | -#remove space between method call name and opening parenthesis |
50 | | -csharp_space_between_method_call_name_and_opening_parenthesis = false |
51 | | -#do not place space characters after the opening parenthesis and before the closing parenthesis of a method call |
52 | | -csharp_space_between_method_call_parameter_list_parentheses = false |
53 | | -#remove space within empty parameter list parentheses for a method declaration |
54 | | -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false |
55 | | -#place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list. |
56 | | -csharp_space_between_method_declaration_parameter_list_parentheses = false |
57 | | - |
58 | | -#Formatting - wrapping options |
59 | | - |
60 | | -#leave code block on single line |
61 | | -csharp_preserve_single_line_blocks = true |
62 | | -#leave statements and member declarations on the same line |
63 | | -csharp_preserve_single_line_statements = true |
64 | | - |
65 | | -#Style - Code block preferences |
66 | | - |
67 | | -#prefer no curly braces if allowed |
68 | | -csharp_prefer_braces = true:suggestion |
69 | | - |
70 | | -#Style - expression bodied member options |
71 | | - |
72 | | -#prefer block bodies for accessors |
73 | | -csharp_style_expression_bodied_accessors = when_on_single_line:suggestion |
74 | | -#prefer block bodies for constructors |
75 | | -csharp_style_expression_bodied_constructors = false:suggestion |
76 | | -#prefer block bodies for methods |
77 | | -csharp_style_expression_bodied_methods = false:suggestion |
78 | | -#prefer expression-bodied members for properties |
79 | | -csharp_style_expression_bodied_properties = true:suggestion |
80 | | - |
81 | | -#Style - expression level options |
82 | | - |
83 | | -#prefer out variables to be declared inline in the argument list of a method call when possible |
84 | | -csharp_style_inlined_variable_declaration = true:suggestion |
85 | | -#prefer ItemX properties to tuple names |
86 | | -dotnet_style_explicit_tuple_names = false:suggestion |
87 | | -#prefer the language keyword for member access expressions, instead of the type name, for types that have a keyword to represent them |
88 | | -dotnet_style_predefined_type_for_member_access = true:suggestion |
89 | | - |
90 | | -#Style - Expression-level preferences |
91 | | - |
92 | | -#prefer default(T) over default |
93 | | -csharp_prefer_simple_default_expression = false:suggestion |
94 | | -#prefer objects to be initialized using object initializers when possible |
95 | | -dotnet_style_object_initializer = true:suggestion |
96 | | -#prefer inferred anonymous type member names |
97 | | -dotnet_style_prefer_inferred_anonymous_type_member_names = false:suggestion |
98 | | -#prefer inferred tuple element names |
99 | | -dotnet_style_prefer_inferred_tuple_names = true:suggestion |
100 | | - |
101 | | -#Style - implicit and explicit types |
102 | | - |
103 | | -#prefer var over explicit type in all cases, unless overridden by another code style rule |
104 | | -csharp_style_var_elsewhere = true:suggestion |
105 | | -#prefer var is used to declare variables with built-in system types such as int |
106 | | -csharp_style_var_for_built_in_types = true:suggestion |
107 | | -#prefer var when the type is already mentioned on the right-hand side of a declaration expression |
108 | | -csharp_style_var_when_type_is_apparent = true:suggestion |
109 | | - |
110 | | -#Style - language keyword and framework type options |
111 | | - |
112 | | -#prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them |
113 | | -dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion |
114 | | - |
115 | | -#Style - Miscellaneous preferences |
116 | | - |
117 | | -#prefer anonymous functions over local functions |
118 | | -csharp_style_pattern_local_over_anonymous_function = false:suggestion |
119 | | - |
120 | | -#Style - modifier options |
121 | | - |
122 | | -#prefer accessibility modifiers to be declared except for public interface members. This will currently not differ from always and will act as future proofing for if C# adds default interface methods. |
123 | | -dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion |
124 | | - |
125 | | -#Style - Modifier preferences |
126 | | - |
127 | | -#when this rule is set to a list of modifiers, prefer the specified ordering. |
128 | | -csharp_preferred_modifier_order = public,private,internal,protected,async,static,override,readonly,abstract:suggestion |
129 | | - |
130 | | -#Style - Pattern matching |
131 | | - |
132 | | -#prefer pattern matching instead of is expression with type casts |
133 | | -csharp_style_pattern_matching_over_as_with_null_check = true:suggestion |
134 | | - |
135 | | -#Style - qualification options |
136 | | - |
137 | | -#prefer fields not to be prefaced with this. or Me. in Visual Basic |
138 | | -dotnet_style_qualification_for_field = false:suggestion |
139 | | -#prefer methods not to be prefaced with this. or Me. in Visual Basic |
140 | | -dotnet_style_qualification_for_method = false:suggestion |
141 | | -#prefer properties not to be prefaced with this. or Me. in Visual Basic |
142 | | -dotnet_style_qualification_for_property = false:suggestion |
143 | | -csharp_style_namespace_declarations= file_scoped:silent |
144 | | -csharp_indent_labels = one_less_than_current |
145 | | -csharp_using_directive_placement = outside_namespace:silent |
146 | | -csharp_prefer_simple_using_statement = true:suggestion |
147 | | -csharp_style_prefer_method_group_conversion = true:silent |
148 | | -csharp_style_prefer_top_level_statements = true:silent |
149 | | -csharp_style_expression_bodied_operators = false:silent |
150 | | -csharp_style_expression_bodied_indexers = true:silent |
151 | | -csharp_style_expression_bodied_lambdas = true:silent |
152 | | -csharp_style_expression_bodied_local_functions = false:silent |
153 | | -csharp_style_throw_expression = true:suggestion |
154 | | -csharp_style_prefer_null_check_over_type_check = true:suggestion |
155 | | - |
156 | | -[*.{cs,vb}] |
157 | | -indent_style=tab |
158 | | -[*.{cs,vb}] |
159 | | -#### Naming styles #### |
160 | | - |
161 | | -# Naming rules |
162 | | - |
163 | | -dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion |
164 | | -dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface |
165 | | -dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i |
166 | | - |
167 | | -dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion |
168 | | -dotnet_naming_rule.types_should_be_pascal_case.symbols = types |
169 | | -dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case |
170 | | - |
171 | | -dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion |
172 | | -dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members |
173 | | -dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case |
174 | | - |
175 | | -# Symbol specifications |
176 | | - |
177 | | -dotnet_naming_symbols.interface.applicable_kinds = interface |
178 | | -dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
179 | | -dotnet_naming_symbols.interface.required_modifiers = |
180 | | - |
181 | | -dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum |
182 | | -dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
183 | | -dotnet_naming_symbols.types.required_modifiers = |
184 | | - |
185 | | -dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method |
186 | | -dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
187 | | -dotnet_naming_symbols.non_field_members.required_modifiers = |
188 | | - |
189 | | -# Naming styles |
190 | | - |
191 | | -dotnet_naming_style.begins_with_i.required_prefix = I |
192 | | -dotnet_naming_style.begins_with_i.required_suffix = |
193 | | -dotnet_naming_style.begins_with_i.word_separator = |
194 | | -dotnet_naming_style.begins_with_i.capitalization = pascal_case |
195 | | - |
196 | | -dotnet_naming_style.pascal_case.required_prefix = |
197 | | -dotnet_naming_style.pascal_case.required_suffix = |
198 | | -dotnet_naming_style.pascal_case.word_separator = |
199 | | -dotnet_naming_style.pascal_case.capitalization = pascal_case |
200 | | - |
201 | | -dotnet_naming_style.pascal_case.required_prefix = |
202 | | -dotnet_naming_style.pascal_case.required_suffix = |
203 | | -dotnet_naming_style.pascal_case.word_separator = |
204 | | -dotnet_naming_style.pascal_case.capitalization = pascal_case |
205 | | -dotnet_style_operator_placement_when_wrapping = beginning_of_line |
| 7 | +[*.cs] |
206 | 8 | tab_width = 4 |
207 | | -indent_size = 4 |
208 | | -end_of_line = crlf |
209 | | -dotnet_style_coalesce_expression = true:suggestion |
210 | | -dotnet_style_null_propagation = true:suggestion |
211 | | -dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion |
212 | | -dotnet_style_prefer_auto_properties = true:suggestion |
213 | | -dotnet_style_object_initializer = true:suggestion |
214 | | -dotnet_style_collection_initializer = true:suggestion |
215 | | -dotnet_style_prefer_simplified_boolean_expressions = true:suggestion |
216 | | -dotnet_style_prefer_conditional_expression_over_assignment = true:silent |
217 | | -dotnet_style_prefer_conditional_expression_over_return = true:silent |
218 | | -dotnet_style_explicit_tuple_names = false:suggestion |
219 | | -dotnet_style_prefer_inferred_tuple_names = true:suggestion |
220 | | -dotnet_style_prefer_inferred_anonymous_type_member_names = false:suggestion |
221 | | -dotnet_style_prefer_compound_assignment = true:suggestion |
222 | | -dotnet_style_prefer_simplified_interpolation = true:suggestion |
223 | | -dotnet_style_namespace_match_folder = true:suggestion |
| 9 | +trim_trailing_whitespace = true |
| 10 | +csharp_new_line_before_open_brace = all |
| 11 | +csharp_preserve_single_line_statements = true |
| 12 | +dotnet_sort_system_directives_first = true |
0 commit comments