|
| 1 | +# editorconfig.org |
| 2 | +root = true |
| 3 | + |
| 4 | +[*.cs] |
| 5 | +indent_style = space |
| 6 | +indent_size = 4 |
| 7 | +end_of_line = lf |
| 8 | +charset = utf-8 |
| 9 | +trim_trailing_whitespace = true |
| 10 | +insert_final_newline = true |
| 11 | + |
| 12 | +# CSharp and Visual Basic code style settings: |
| 13 | +[*.cs] |
| 14 | +dotnet_style_require_accessibility_modifiers = always:suggestion |
| 15 | +dotnet_style_readonly_field = true:warning |
| 16 | + |
| 17 | +# CSharp and Visual Basic code style settings: |
| 18 | +[*.cs] |
| 19 | +dotnet_style_object_initializer = true:suggestion |
| 20 | +dotnet_style_collection_initializer = true:suggestion |
| 21 | +dotnet_style_prefer_auto_properties = true:suggestion |
| 22 | + |
| 23 | +# CSharp code style settings: |
| 24 | +[*.cs] |
| 25 | +csharp_style_var_for_built_in_types = true:suggestion |
| 26 | +csharp_style_var_when_type_is_apparent = true:suggestion |
| 27 | +csharp_style_var_elsewhere = true:suggestion |
| 28 | + |
| 29 | +# CSharp code style settings: |
| 30 | +[*.cs] |
| 31 | +csharp_style_expression_bodied_methods = false:silent |
| 32 | +csharp_style_expression_bodied_constructors = false:silent |
| 33 | +csharp_style_expression_bodied_operators = false:silent |
| 34 | +csharp_style_expression_bodied_properties = true:suggestion |
| 35 | +csharp_style_expression_bodied_indexers = true:suggestion |
| 36 | +csharp_style_expression_bodied_accessors = true:suggestion |
| 37 | + |
| 38 | +# CSharp code style settings: |
| 39 | +[*.cs] |
| 40 | +csharp_style_inlined_variable_declaration = true:suggestion |
| 41 | + |
| 42 | +# CSharp code style settings: |
| 43 | +[*.cs] |
| 44 | +csharp_prefer_braces = true:silent |
| 45 | + |
| 46 | +# .NET formatting settings: |
| 47 | +[*.cs] |
| 48 | +dotnet_sort_system_directives_first = true |
| 49 | + |
| 50 | +# CSharp formatting settings: |
| 51 | +[*.cs] |
| 52 | +csharp_new_line_before_open_brace = all |
| 53 | +csharp_new_line_before_else = true |
| 54 | +csharp_new_line_before_catch = true |
| 55 | +csharp_new_line_before_finally = true |
| 56 | +csharp_new_line_before_members_in_object_initializers = true |
| 57 | +csharp_new_line_before_members_in_anonymous_types = true |
| 58 | +csharp_new_line_between_query_expression_clauses = true |
| 59 | + |
| 60 | +# CSharp formatting settings: |
| 61 | +[*.cs] |
| 62 | +csharp_indent_case_contents = true |
| 63 | +csharp_indent_switch_labels = true |
| 64 | + |
| 65 | +# CSharp formatting settings: |
| 66 | +[*.cs] |
| 67 | +csharp_space_after_cast = false |
| 68 | +csharp_space_after_keywords_in_control_flow_statements = true |
| 69 | +csharp_space_between_method_declaration_parameter_list_parentheses = false |
| 70 | +csharp_space_between_method_call_parameter_list_parentheses = false |
| 71 | +csharp_space_between_parentheses = false |
| 72 | +csharp_space_before_colon_in_inheritance_clause = true |
| 73 | +csharp_space_after_colon_in_inheritance_clause = true |
| 74 | +csharp_space_around_binary_operators = before_and_after |
| 75 | +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false |
| 76 | +csharp_space_between_method_call_name_and_opening_parenthesis = false |
| 77 | +csharp_space_between_method_call_empty_parameter_list_parentheses = false |
| 78 | + |
| 79 | +# CSharp formatting settings: |
| 80 | +[*.cs] |
| 81 | +csharp_preserve_single_line_statements = false |
| 82 | +csharp_preserve_single_line_blocks = false |
| 83 | + |
| 84 | +# Rider Specific Settings: |
| 85 | + |
| 86 | +## Blank Lines |
| 87 | + |
| 88 | +[*.cs] |
| 89 | +csharp_blank_lines_around_region = 1 |
| 90 | +csharp_blank_lines_inside_region = 1 |
| 91 | +csharp_blank_lines_before_single_line_comment = 1 |
| 92 | +csharp_keep_blank_lines_in_declarations = 1 |
| 93 | +csharp_remove_blank_lines_near_braces_in_declarations = false |
| 94 | +csharp_blank_lines_after_start_comment = 1 |
| 95 | +csharp_blank_lines_between_using_groups = 0 |
| 96 | +csharp_blank_lines_after_using_list = 0 |
| 97 | +csharp_blank_lines_around_namespace = 1 |
| 98 | +csharp_blank_lines_inside_namespace = 1 |
| 99 | +csharp_blank_lines_around_type = 1 |
| 100 | +csharp_blank_lines_inside_type = 1 |
| 101 | +csharp_blank_lines_around_field = 1 |
| 102 | +csharp_blank_lines_around_single_line_field = 1 |
| 103 | +csharp_blank_lines_around_property = 1 |
| 104 | +csharp_blank_lines_around_single_line_property = 1 |
| 105 | +csharp_blank_lines_around_auto_property = 1 |
| 106 | +csharp_blank_lines_around_single_line_auto_property = 1 |
| 107 | +csharp_blank_lines_around_invocable = 1 |
| 108 | +csharp_blank_lines_around_single_line_invocable = 1 |
| 109 | +csharp_blank_lines_around_local_method = 1 |
| 110 | +csharp_keep_blank_lines_in_code = 1 |
| 111 | +csharp_remove_blank_lines_near_braces_in_code = false |
| 112 | +csharp_blank_lines_around_local_method = 1 |
| 113 | +csharp_blank_lines_around_single_line_local_method = 1 |
| 114 | +csharp_blank_lines_before_control_transfer_statements = 1 |
| 115 | +csharp_blank_lines_after_control_transfer_statements = 1 |
| 116 | +csharp_blank_lines_before_block_statements = 1 |
| 117 | +csharp_blank_lines_after_block_statements = 1 |
| 118 | +csharp_blank_lines_before_multiline_statements = 1 |
| 119 | +csharp_blank_lines_after_multiline_statements = 1 |
| 120 | + |
| 121 | +## Brace Layout |
| 122 | + |
| 123 | +[*.cs] |
| 124 | +csharp_type_declaration_braces = next_line |
| 125 | +csharp_indent_inside_namespace = true |
| 126 | +csharp_invocable_declaration_braces = next_line |
| 127 | +csharp_anonymous_method_declaration_braces = next_line |
| 128 | +csharp_accessor_owner_declaration_braces = next_line |
| 129 | +csharp_accessor_declaration_braces = next_line |
| 130 | +csharp_case_block_braces = next_line |
| 131 | +csharp_initializer_braces = next_line |
| 132 | +csharp_other_braces = next_line |
| 133 | +csharp_allow_comment_after_lbrace = false |
| 134 | +csharp_empty_block_style = multiline |
| 135 | + |
| 136 | +## Code Style |
| 137 | + |
| 138 | +csharp_for_built_in_types = use_var |
| 139 | +csharp_for_simple_types = use_var |
| 140 | +csharp_for_other_types = use_var |
| 141 | +csharp_prefer_explicit_discard_declaration = true |
| 142 | +csharp_instance_members_qualify_members = none |
| 143 | +csharp_instance_members_qualify_declared_in = this_class |
| 144 | +csharp_default_private_modifier = explicit |
| 145 | +csharp_default_internal_modifier = explicit |
| 146 | + |
| 147 | +## Line Breaks |
| 148 | + |
| 149 | +[*.cs] |
| 150 | +csharp_place_type_attribute_on_same_line = false |
| 151 | +csharp_place_method_attribute_on_same_line = false |
| 152 | +csharp_place_accessorholder_attribute_on_same_line = false |
| 153 | +csharp_place_accessor_attribute_on_same_line = false |
| 154 | +csharp_place_field_attribute_on_same_line = false |
| 155 | + |
| 156 | +csharp_keep_existing_declaration_block_arrangement = false |
| 157 | +csharp_place_abstract_accessorholder_on_single_line = true |
| 158 | +csharp_place_simple_accessorholder_on_single_line = false |
| 159 | +csharp_place_accessor_with_attrs_holder_on_single_line = true |
| 160 | +csharp_place_simple_accessor_on_single_line = true |
| 161 | +csharp_place_simple_method_on_single_line = false |
| 162 | + |
| 163 | +## Spaces |
| 164 | + |
| 165 | +[*.cs] |
| 166 | +csharp_extra_spaces = remove_all |
| 167 | +csharp_space_after_keywords_in_control_flow_statements = true |
| 168 | +csharp_space_between_method_call_name_and_opening_parenthesis = false |
| 169 | +csharp_space_before_typeof_parentheses = false |
| 170 | +csharp_space_before_default_parentheses = false |
| 171 | +csharp_space_before_checked_parentheses = false |
| 172 | +csharp_space_before_sizeof_parentheses = false |
| 173 | +csharp_space_before_nameof_parentheses = false |
| 174 | +csharp_space_between_keyword_and_expression = true |
| 175 | +csharp_space_between_keyword_and_type = true |
| 176 | +csharp_space_within_if_parentheses = false |
| 177 | +csharp_space_within_while_parentheses = false |
| 178 | +csharp_space_within_catch_parentheses = false |
| 179 | +csharp_space_within_switch_parentheses = false |
| 180 | +csharp_space_within_for_parentheses = false |
| 181 | +csharp_space_within_foreach_parentheses = false |
| 182 | +csharp_space_within_using_parentheses = false |
| 183 | +csharp_space_within_lock_parentheses = false |
| 184 | +csharp_space_within_fixed_parentheses = false |
| 185 | +csharp_space_within_parentheses = false |
| 186 | +csharp_space_between_typecast_parentheses = false |
| 187 | +csharp_space_between_method_declaration_parameter_list_parentheses = false |
| 188 | +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false |
| 189 | +csharp_space_between_method_call_parameter_list_parentheses = false |
| 190 | +csharp_space_within_typeof_parentheses = false |
| 191 | +csharp_space_within_default_parentheses = false |
| 192 | +csharp_space_within_checked_parentheses = false |
| 193 | +csharp_space_within_sizeof_parentheses = false |
| 194 | +csharp_space_within_nameof_parentheses = false |
| 195 | +csharp_space_before_open_square_brackets = false |
| 196 | +csharp_space_between_square_brackets = false |
| 197 | +csharp_space_between_empty_square_brackets = false |
| 198 | +csharp_space_before_type_parameter_angle = false |
| 199 | +csharp_space_before_type_argument_angle = false |
| 200 | +csharp_space_within_type_parameter_angles = false |
| 201 | +csharp_space_within_type_argument_angles = false; |
| 202 | +csharp_space_before_singleline_accessorholder = true |
| 203 | +csharp_space_in_singleline_accessorholder = true |
| 204 | +csharp_space_between_accessors_in_singleline_property = true |
| 205 | +csharp_space_within_empty_braces = true |
| 206 | +csharp_space_in_singleline_method = true |
| 207 | +csharp_space_in_singleline_anonymous_method = true |
| 208 | +csharp_space_within_single_line_array_initializer_braces = true |
| 209 | +csharp_space_around_assignment_op = true |
| 210 | +csharp_space_around_logical_op = true |
| 211 | +csharp_space_around_equality_op = true |
| 212 | +csharp_space_around_relational_op = true |
| 213 | +csharp_space_around_bitwise_op = true |
| 214 | +csharp_space_around_additive_op = true |
| 215 | +csharp_space_around_multiplicative_op = true |
| 216 | +csharp_space_around_shift_op = true |
| 217 | +csharp_space_around_nullcoalescing_op = true |
| 218 | +csharp_space_around_arrow_op = true |
| 219 | +csharp_space_after_logical_not_op = false |
| 220 | +csharp_space_after_unary_minus_op = false |
| 221 | +csharp_space_after_unary_plus_op = false |
| 222 | +csharp_space_after_ampersand_op = false |
| 223 | +csharp_space_after_asterik_op = false |
| 224 | +csharp_space_near_postfix_and_prefix_op = false |
| 225 | +csharp_space_before_ternary_quest = true |
| 226 | +csharp_space_after_ternary_quest = true |
| 227 | +csharp_space_before_ternary_colon = true |
| 228 | +csharp_space_after_ternary_colon = true |
| 229 | +csharp_space_before_comma = false |
| 230 | +csharp_space_after_comma = true |
| 231 | +csharp_space_before_semicolon_in_for_statement = false |
| 232 | +csharp_space_after_semicolon_in_for_statement = true |
| 233 | +csharp_space_before_semicolon = false |
| 234 | +csharp_space_before_colon_in_inheritance_clause = true |
| 235 | +csharp_space_after_colon_in_inheritance_clause = true |
| 236 | +csharp_space_before_type_parameter_constraint_colon = true |
| 237 | +csharp_space_after_type_parameter_constraint_colon = true |
| 238 | +csharp_space_before_colon_in_case = false |
| 239 | +csharp_space_after_colon_in_case = true |
| 240 | +csharp_space_before_attribute_colon = true |
| 241 | +csharp_space_after_attribute_colon = true |
| 242 | +csharp_space_between_attribute_sections = true |
| 243 | +csharp_space_between_square_brackets = false |
| 244 | +csharp_space_after_attributes = true |
| 245 | +csharp_space_after_cast = false |
| 246 | +csharp_space_around_dot = false |
| 247 | +csharp_space_around_lambda_arrow = true |
| 248 | +csharp_space_before_pointer_asterik_declaration = false |
| 249 | +csharp_space_before_nullable_mark = false |
| 250 | +csharp_space_around_alias_eq = true |
| 251 | +csharp_space_before_trailing_comment = true |
| 252 | +csharp_space_after_operator_keyword = true |
| 253 | + |
| 254 | +## Resharper |
| 255 | + |
| 256 | +[*.cs] |
| 257 | +resharper_check_namespace_highlighting = do_not_show |
| 258 | +resharper_inconsistent_naming_highlighting = do_not_show |
| 259 | +resharper_member_can_be_private_global_highlighting = do_not_show |
| 260 | +resharper_unused_member_global_highlighting = do_not_show |
| 261 | +resharper_introduce_optional_parameters_global_highlighting = do_not_show |
| 262 | +resharper_delegate_subtraction_highlighting = do_not_show |
0 commit comments