|
| 1 | +root=true |
| 2 | +# EditorConfig is awesome: https://EditorConfig.org |
| 3 | + |
| 4 | +# top-most EditorConfig file |
| 5 | + |
| 6 | +# Don't use tabs for indentation. |
| 7 | +[*] |
| 8 | +indent_style=space |
| 9 | + |
| 10 | +# ReSharper properties |
| 11 | +resharper_align_multiline_argument=true |
| 12 | +resharper_align_multiline_calls_chain=true |
| 13 | +resharper_align_multiline_extends_list=true |
| 14 | +resharper_align_multline_type_parameter_constrains=true |
| 15 | +resharper_align_multline_type_parameter_list=true |
| 16 | +resharper_align_tuple_components=true |
| 17 | +resharper_csharp_align_multiline_calls_chain=false |
| 18 | +resharper_csharp_align_multiple_declaration=true |
| 19 | +resharper_csharp_max_line_length=130 |
| 20 | +resharper_csharp_stick_comment=false |
| 21 | +resharper_csharp_wrap_after_declaration_lpar=true |
| 22 | +resharper_csharp_wrap_arguments_style=chop_if_long |
| 23 | +resharper_csharp_wrap_extends_list_style=chop_if_long |
| 24 | +resharper_csharp_wrap_parameters_style=chop_if_long |
| 25 | +resharper_max_initializer_elements_on_line=3 |
| 26 | +resharper_place_attribute_on_same_line=false |
| 27 | +resharper_place_simple_accessorholder_on_single_line=true |
| 28 | +resharper_space_within_single_line_array_initializer_braces=true |
| 29 | +resharper_wrap_before_extends_colon=true |
| 30 | +resharper_xmldoc_indent_text=ZeroIndent |
| 31 | +resharper_xmldoc_max_line_length=140 |
| 32 | +# (Please don't specify an indent_size here; that has too many unintended consequences.) |
| 33 | + |
| 34 | +# Code files |
| 35 | +[*.{cs,csx,vb,vbx}] |
| 36 | +indent_size=4 |
| 37 | +insert_final_newline=true |
| 38 | +charset=utf-8 |
| 39 | + |
| 40 | +# XML project files |
| 41 | +[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] |
| 42 | +indent_size=2 |
| 43 | + |
| 44 | +# XML config files |
| 45 | +[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] |
| 46 | +indent_size=2 |
| 47 | + |
| 48 | +# JSON files |
| 49 | +[*.json] |
| 50 | +indent_size=2 |
| 51 | + |
| 52 | +# Powershell files |
| 53 | +[*.ps1] |
| 54 | +indent_size=2 |
| 55 | + |
| 56 | +# Shell script files |
| 57 | +[*.sh] |
| 58 | +end_of_line=lf |
| 59 | +indent_size=2 |
| 60 | + |
| 61 | +# Dotnet code style settings: |
| 62 | +[*.{cs,vb}] |
| 63 | +# Sort using and Import directives with System.* appearing first |
| 64 | +dotnet_sort_system_directives_first=true |
| 65 | +# Avoid "this." and "Me." if not necessary |
| 66 | +dotnet_style_qualification_for_field=false:refactoring |
| 67 | +dotnet_style_qualification_for_property=false:refactoring |
| 68 | +dotnet_style_qualification_for_method=false:refactoring |
| 69 | +dotnet_style_qualification_for_event=false:refactoring |
| 70 | + |
| 71 | +# Use language keywords instead of framework type names for type references |
| 72 | +dotnet_style_predefined_type_for_locals_parameters_members=true:suggestion |
| 73 | +dotnet_style_predefined_type_for_member_access=true:suggestion |
| 74 | + |
| 75 | +# Suggest more modern language features when available |
| 76 | +dotnet_style_object_initializer=true:suggestion |
| 77 | +dotnet_style_collection_initializer=true:suggestion |
| 78 | +dotnet_style_coalesce_expression=true:suggestion |
| 79 | +dotnet_style_null_propagation=true:suggestion |
| 80 | +dotnet_style_explicit_tuple_names=true:suggestion |
| 81 | + |
| 82 | +# Non-private static fields are PascalCase |
| 83 | +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity=suggestion |
| 84 | +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols=non_private_static_fields |
| 85 | +dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style=non_private_static_field_style |
| 86 | + |
| 87 | +dotnet_naming_symbols.non_private_static_fields.applicable_kinds=field |
| 88 | +dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities=public, protected, internal, protected_internal, private_protected |
| 89 | +dotnet_naming_symbols.non_private_static_fields.required_modifiers=static |
| 90 | + |
| 91 | +dotnet_naming_style.non_private_static_field_style.capitalization=pascal_case |
| 92 | + |
| 93 | +# Non-private readonly fields are PascalCase |
| 94 | +dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity=suggestion |
| 95 | +dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols=non_private_readonly_fields |
| 96 | +dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style=non_private_readonly_field_style |
| 97 | + |
| 98 | +dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds=field |
| 99 | +dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities=public, protected, internal, protected_internal, private_protected |
| 100 | +dotnet_naming_symbols.non_private_readonly_fields.required_modifiers=readonly |
| 101 | + |
| 102 | +dotnet_naming_style.non_private_readonly_field_style.capitalization=pascal_case |
| 103 | + |
| 104 | +# Constants are PascalCase |
| 105 | +dotnet_naming_rule.constants_should_be_pascal_case.severity=suggestion |
| 106 | +dotnet_naming_rule.constants_should_be_pascal_case.symbols=constants |
| 107 | +dotnet_naming_rule.constants_should_be_pascal_case.style=constant_style |
| 108 | + |
| 109 | +dotnet_naming_symbols.constants.applicable_kinds=field, local |
| 110 | +dotnet_naming_symbols.constants.required_modifiers=const |
| 111 | + |
| 112 | +dotnet_naming_style.constant_style.capitalization=pascal_case |
| 113 | + |
| 114 | +# Static fields are PascalCase |
| 115 | +dotnet_naming_rule.static_fields_should_be_camel_case.severity=suggestion |
| 116 | +dotnet_naming_rule.static_fields_should_be_camel_case.symbols=static_fields |
| 117 | +dotnet_naming_rule.static_fields_should_be_camel_case.style=static_field_style |
| 118 | + |
| 119 | +dotnet_naming_symbols.static_fields.applicable_kinds=field |
| 120 | +dotnet_naming_symbols.static_fields.required_modifiers=static |
| 121 | + |
| 122 | +dotnet_naming_style.static_field_style.capitalization=pascal_case |
| 123 | + |
| 124 | +# Instance fields are camelCase and start with _ |
| 125 | +dotnet_naming_rule.instance_fields_should_be_camel_case.severity=suggestion |
| 126 | +dotnet_naming_rule.instance_fields_should_be_camel_case.symbols=instance_fields |
| 127 | +dotnet_naming_rule.instance_fields_should_be_camel_case.style=instance_field_style |
| 128 | + |
| 129 | +dotnet_naming_symbols.instance_fields.applicable_kinds=field |
| 130 | + |
| 131 | +dotnet_naming_style.instance_field_style.capitalization=camel_case |
| 132 | +dotnet_naming_style.instance_field_style.required_prefix=_ |
| 133 | + |
| 134 | +# Locals and parameters are camelCase |
| 135 | +dotnet_naming_rule.locals_should_be_camel_case.severity=suggestion |
| 136 | +dotnet_naming_rule.locals_should_be_camel_case.symbols=locals_and_parameters |
| 137 | +dotnet_naming_rule.locals_should_be_camel_case.style=camel_case_style |
| 138 | + |
| 139 | +dotnet_naming_symbols.locals_and_parameters.applicable_kinds=parameter, local |
| 140 | + |
| 141 | +dotnet_naming_style.camel_case_style.capitalization=camel_case |
| 142 | + |
| 143 | +# Local functions are PascalCase |
| 144 | +dotnet_naming_rule.local_functions_should_be_pascal_case.severity=suggestion |
| 145 | +dotnet_naming_rule.local_functions_should_be_pascal_case.symbols=local_functions |
| 146 | +dotnet_naming_rule.local_functions_should_be_pascal_case.style=local_function_style |
| 147 | + |
| 148 | +dotnet_naming_symbols.local_functions.applicable_kinds=local_function |
| 149 | + |
| 150 | +dotnet_naming_style.local_function_style.capitalization=pascal_case |
| 151 | + |
| 152 | +# By default, name items with PascalCase |
| 153 | +dotnet_naming_rule.members_should_be_pascal_case.severity=suggestion |
| 154 | +dotnet_naming_rule.members_should_be_pascal_case.symbols=all_members |
| 155 | +dotnet_naming_rule.members_should_be_pascal_case.style=pascal_case_style |
| 156 | + |
| 157 | +dotnet_naming_symbols.all_members.applicable_kinds=* |
| 158 | + |
| 159 | +dotnet_naming_style.pascal_case_style.capitalization=pascal_case |
| 160 | + |
| 161 | +# CSharp code style settings: |
| 162 | +[*.cs] |
| 163 | +# Newline settings |
| 164 | +csharp_new_line_before_open_brace=all |
| 165 | +csharp_new_line_before_else=true |
| 166 | +csharp_new_line_before_catch=true |
| 167 | +csharp_new_line_before_finally=true |
| 168 | +csharp_new_line_before_members_in_object_initializers=true |
| 169 | +csharp_new_line_before_members_in_anonymous_types=true |
| 170 | +csharp_new_line_between_query_expression_clauses=true |
| 171 | + |
| 172 | +# Indentation preferences |
| 173 | +csharp_indent_block_contents=true |
| 174 | +csharp_indent_braces=false |
| 175 | +csharp_indent_case_contents=true |
| 176 | +csharp_indent_case_contents_when_block=true |
| 177 | +csharp_indent_switch_labels=true |
| 178 | +csharp_indent_labels=flush_left |
| 179 | + |
| 180 | +# Prefer "var" everywhere |
| 181 | +csharp_style_var_for_built_in_types=true:suggestion |
| 182 | +csharp_style_var_when_type_is_apparent=true:suggestion |
| 183 | +csharp_style_var_elsewhere=true:suggestion |
| 184 | + |
| 185 | +# Prefer method-like constructs to have a block body |
| 186 | +csharp_style_expression_bodied_methods=false:none |
| 187 | +csharp_style_expression_bodied_constructors=false:none |
| 188 | +csharp_style_expression_bodied_operators=false:none |
| 189 | + |
| 190 | +# Prefer property-like constructs to have an expression-body |
| 191 | +csharp_style_expression_bodied_properties=true:none |
| 192 | +csharp_style_expression_bodied_indexers=true:none |
| 193 | +csharp_style_expression_bodied_accessors=true:none |
| 194 | + |
| 195 | +# Suggest more modern language features when available |
| 196 | +csharp_style_pattern_matching_over_is_with_cast_check=true:suggestion |
| 197 | +csharp_style_pattern_matching_over_as_with_null_check=true:suggestion |
| 198 | +csharp_style_inlined_variable_declaration=true:suggestion |
| 199 | +csharp_style_throw_expression=true:suggestion |
| 200 | +csharp_style_conditional_delegate_call=true:suggestion |
| 201 | + |
| 202 | +# Space preferences |
| 203 | +csharp_space_after_cast=false |
| 204 | +csharp_space_after_colon_in_inheritance_clause=true |
| 205 | +csharp_space_after_comma=true |
| 206 | +csharp_space_after_dot=false |
| 207 | +csharp_space_after_keywords_in_control_flow_statements=true |
| 208 | +csharp_space_after_semicolon_in_for_statement=true |
| 209 | +csharp_space_around_binary_operators=before_and_after |
| 210 | +csharp_space_around_declaration_statements=do_not_ignore |
| 211 | +csharp_space_before_colon_in_inheritance_clause=true |
| 212 | +csharp_space_before_comma=false |
| 213 | +csharp_space_before_dot=false |
| 214 | +csharp_space_before_open_square_brackets=false |
| 215 | +csharp_space_before_semicolon_in_for_statement=false |
| 216 | +csharp_space_between_empty_square_brackets=false |
| 217 | +csharp_space_between_method_call_empty_parameter_list_parentheses=false |
| 218 | +csharp_space_between_method_call_name_and_opening_parenthesis=false |
| 219 | +csharp_space_between_method_call_parameter_list_parentheses=false |
| 220 | +csharp_space_between_method_declaration_empty_parameter_list_parentheses=false |
| 221 | +csharp_space_between_method_declaration_name_and_open_parenthesis=false |
| 222 | +csharp_space_between_method_declaration_parameter_list_parentheses=false |
| 223 | +csharp_space_between_parentheses=false |
| 224 | +csharp_space_between_square_brackets=false |
| 225 | + |
| 226 | +# Blocks are allowed |
| 227 | +csharp_prefer_braces=true:silent |
| 228 | +csharp_preserve_single_line_blocks=true |
| 229 | +csharp_preserve_single_line_statements=true |
0 commit comments