|
| 1 | +root = true |
| 2 | + |
| 3 | +[*] |
| 4 | +charset = utf-8 |
| 5 | +end_of_line = lf |
| 6 | +indent_size = 2 |
| 7 | +indent_style = space |
| 8 | +insert_final_newline = true |
| 9 | +trim_trailing_whitespace = true |
| 10 | + |
| 11 | +[*.md] |
| 12 | +trim_trailing_whitespace = false |
| 13 | + |
| 14 | +# CSharp code style settings: |
| 15 | +[*.cs]root = true |
| 16 | + |
| 17 | +# C# or VB files |
| 18 | +[*.{cs,vb}] |
| 19 | +guidelines = 80, 100 |
| 20 | + |
| 21 | +[*] |
| 22 | +charset = utf-8 |
| 23 | +end_of_line = lf |
| 24 | +indent_size = 2 |
| 25 | +indent_style = space |
| 26 | +insert_final_newline = true |
| 27 | +trim_trailing_whitespace = true |
| 28 | + |
| 29 | +[*.md] |
| 30 | +trim_trailing_whitespace = false |
| 31 | + |
| 32 | +# Cake build code style settings: |
| 33 | +[*.cake] |
| 34 | +indent_size = 4 |
| 35 | + |
| 36 | +# CSharp code style settings: |
| 37 | +[*.cs] |
| 38 | +indent_size = 4 |
| 39 | + |
| 40 | +# Avoid "this." and "Me." if not necessary |
| 41 | +dotnet_style_qualification_for_field = false:suggestion |
| 42 | +dotnet_style_qualification_for_property = false:suggestion |
| 43 | +dotnet_style_qualification_for_method = false:suggestion |
| 44 | +dotnet_style_qualification_for_event = false:suggestion |
| 45 | + |
| 46 | +# Use language keywords instead of framework type names for type references |
| 47 | +dotnet_style_predefined_type_for_locals_parameters_members = true:error |
| 48 | +dotnet_style_predefined_type_for_member_access = true:error |
| 49 | + |
| 50 | +# Modifier preferences |
| 51 | +dotnet_style_require_accessibility_modifiers = always |
| 52 | +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async |
| 53 | + |
| 54 | +# Suggest more modern language features when available |
| 55 | +dotnet_style_object_initializer = true:suggestion |
| 56 | +dotnet_style_collection_initializer = true:suggestion |
| 57 | +dotnet_style_explicit_tuple_names = true:error |
| 58 | +dotnet_style_prefer_inferred_tuple_names = true:suggestion |
| 59 | +dotnet_prefer_inferred_anonymous_type_member_names = true:suggestion |
| 60 | +dotnet_style_coalesce_expression = true:suggestion |
| 61 | +dotnet_style_null_propagation = true:suggestion |
| 62 | + |
| 63 | +# Prefer "var" everywhere |
| 64 | +csharp_style_var_for_built_in_types = true:suggestion |
| 65 | +csharp_style_var_when_type_is_apparent = true:suggestion |
| 66 | +csharp_style_var_elsewhere = false:error |
| 67 | + |
| 68 | +# Prefer method-like constructs to have a block body |
| 69 | +csharp_style_expression_bodied_methods = false:none |
| 70 | +csharp_style_expression_bodied_constructors = false:none |
| 71 | +csharp_style_expression_bodied_operators = false:none |
| 72 | + |
| 73 | +# Prefer property-like constructs to have an expression-body |
| 74 | +csharp_style_expression_bodied_properties = true:none |
| 75 | +csharp_style_expression_bodied_indexers = true:none |
| 76 | +csharp_style_expression_bodied_accessors = true:none |
| 77 | + |
| 78 | +# Suggest more modern language features when available |
| 79 | +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion |
| 80 | +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion |
| 81 | +csharp_style_inlined_variable_declaration = true:suggestion |
| 82 | +csharp_style_throw_expression = false:error |
| 83 | +csharp_style_conditional_delegate_call = true:suggestion |
| 84 | + |
| 85 | +# Expression-level preferences |
| 86 | +csharp_prefer_simple_default_expression = true:error |
| 87 | +csharp_style_deconstructed_variable_declaration = false:none |
| 88 | +csharp_style_pattern_local_over_anonymous_function = true:none |
| 89 | + |
| 90 | +# Sort using and Import directives with System.* appearing first |
| 91 | +dotnet_sort_system_directives_first = true |
| 92 | + |
| 93 | +# Newline settings |
| 94 | +csharp_new_line_before_open_brace = all |
| 95 | +csharp_new_line_before_else = true |
| 96 | +csharp_new_line_before_catch = true |
| 97 | +csharp_new_line_before_finally = true |
| 98 | +csharp_new_line_before_members_in_anonymous_types = true |
| 99 | +csharp_new_line_between_query_expression_clauses = true |
| 100 | +csharp_new_line_before_members_in_object_initializers = true |
| 101 | + |
| 102 | +# Indentation options |
| 103 | +csharp_indent_case_contents = true |
| 104 | +csharp_indent_switch_labels = true |
| 105 | +csharp_indent_labels = flush_left |
| 106 | + |
| 107 | +# Spacing options |
| 108 | +csharp_space_after_cast = false |
| 109 | +csharp_space_after_keywords_in_control_flow_statements = true |
| 110 | +csharp_space_between_method_declaration_parameter_list_parentheses = false |
| 111 | +csharp_space_between_method_call_parameter_list_parentheses = false |
| 112 | +csharp_space_between_parentheses = false |
| 113 | + |
| 114 | +# Wrapping options |
| 115 | +csharp_preserve_single_line_statements = false |
| 116 | +csharp_preserve_single_line_blocks = true |
| 117 | + |
| 118 | +indent_size = 4 |
| 119 | + |
| 120 | +# Sort using and Import directives with System.* appearing first |
| 121 | +dotnet_sort_system_directives_first = true |
| 122 | + |
| 123 | +# Avoid "this." and "Me." if not necessary |
| 124 | +dotnet_style_qualification_for_field = false:suggestion |
| 125 | +dotnet_style_qualification_for_property = false:suggestion |
| 126 | +dotnet_style_qualification_for_method = false:suggestion |
| 127 | +dotnet_style_qualification_for_event = false:suggestion |
| 128 | + |
| 129 | +# Use language keywords instead of framework type names for type references |
| 130 | +dotnet_style_predefined_type_for_locals_parameters_members = true:error |
| 131 | +dotnet_style_predefined_type_for_member_access = true:error |
| 132 | + |
| 133 | +# Suggest more modern language features when available |
| 134 | +dotnet_style_object_initializer = true:suggestion |
| 135 | +dotnet_style_collection_initializer = true:suggestion |
| 136 | +dotnet_style_coalesce_expression = true:suggestion |
| 137 | +dotnet_style_null_propagation = true:suggestion |
| 138 | +dotnet_style_explicit_tuple_names = true:suggestion |
| 139 | + |
| 140 | +# Prefer "var" everywhere |
| 141 | +csharp_style_var_for_built_in_types = true:suggestion |
| 142 | +csharp_style_var_when_type_is_apparent = true:suggestion |
| 143 | +csharp_style_var_elsewhere = false:error |
| 144 | + |
| 145 | +# Prefer method-like constructs to have a block body |
| 146 | +csharp_style_expression_bodied_methods = false:none |
| 147 | +csharp_style_expression_bodied_constructors = false:none |
| 148 | +csharp_style_expression_bodied_operators = false:none |
| 149 | + |
| 150 | +# Prefer property-like constructs to have an expression-body |
| 151 | +csharp_style_expression_bodied_properties = true:none |
| 152 | +csharp_style_expression_bodied_indexers = true:none |
| 153 | +csharp_style_expression_bodied_accessors = true:none |
| 154 | + |
| 155 | +# Suggest more modern language features when available |
| 156 | +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion |
| 157 | +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion |
| 158 | +csharp_style_inlined_variable_declaration = true:suggestion |
| 159 | +csharp_style_throw_expression = true:suggestion |
| 160 | +csharp_style_conditional_delegate_call = true:suggestion |
| 161 | + |
| 162 | +# Newline settings |
| 163 | +csharp_new_line_before_open_brace = all |
| 164 | +csharp_new_line_before_else = true |
| 165 | +csharp_new_line_before_catch = true |
| 166 | +csharp_new_line_before_finally = true |
| 167 | +csharp_new_line_before_members_in_object_initializers = true |
| 168 | +csharp_new_line_before_members_in_anonymous_types = true |
| 169 | + |
| 170 | +dotnet_style_require_accessibility_modifiers = always |
0 commit comments