|
| 1 | +root = true |
| 2 | + |
| 3 | +[*] |
| 4 | +charset = utf-8 |
| 5 | +end_of_line = lf |
| 6 | +indent_style = space |
| 7 | +indent_size = 4 |
| 8 | +trim_trailing_whitespace = true |
| 9 | +insert_final_newline = true |
| 10 | +keep_existing_linebreaks = true |
| 11 | +max_line_length = off |
| 12 | + |
| 13 | +[*.{json,xml,yml,yaml,htm,html,js,ts,css,scss,less}] |
| 14 | +indent_size = 2 |
| 15 | + |
| 16 | +[*.{*proj,resx,config,ruleset,cd,props,targets,nuspec}] |
| 17 | +end_of_line = crlf |
| 18 | +indent_size = 2 |
| 19 | + |
| 20 | +[*.{txt,cs,ps1,psd1,manifest}] |
| 21 | +end_of_line = crlf |
| 22 | + |
| 23 | +[*.{bat,cmd}] |
| 24 | +charset = latin1 |
| 25 | +end_of_line = crlf |
| 26 | + |
| 27 | +[*.sln] |
| 28 | +end_of_line = crlf |
| 29 | +indent_style = tab |
| 30 | + |
| 31 | +[*.{md,resx,Designer.*}] |
| 32 | +trim_trailing_whitespace = false |
| 33 | + |
| 34 | +[*.cs] |
| 35 | +# Indentation |
| 36 | +csharp_indent_block_contents = true |
| 37 | +csharp_indent_braces = false |
| 38 | +csharp_indent_case_contents = true |
| 39 | +csharp_indent_switch_labels = true |
| 40 | +csharp_outdent_binary_ops = true |
| 41 | +csharp_outdent_dots = true |
| 42 | +csharp_align_linq_query = true |
| 43 | +csharp_align_multiline_parameter = true |
| 44 | +csharp_align_multiline_calls_chain = true |
| 45 | +csharp_align_multiline_binary_expressions_chain = true |
| 46 | +csharp_align_multiline_array_and_object_initializer = false |
| 47 | + |
| 48 | +# Line breaks |
| 49 | +csharp_new_line_before_catch = true |
| 50 | +csharp_new_line_before_else = true |
| 51 | +csharp_new_line_before_finally = true |
| 52 | +csharp_new_line_before_members_in_object_initializers = false |
| 53 | +csharp_new_line_before_open_brace = all |
| 54 | +csharp_blank_lines_around_single_line_field = 0 |
| 55 | +csharp_blank_lines_inside_region = 0 |
| 56 | +csharp_blank_lines_around_region = 0 |
| 57 | +csharp_blank_lines_after_block_statements = 0 |
| 58 | +csharp_empty_block_style = together |
| 59 | +csharp_place_simple_blocks_on_single_line = true |
| 60 | +csharp_place_simple_initializer_on_single_line = true |
| 61 | +csharp_place_attribute_on_same_line = if_owner_is_single_line |
| 62 | +csharp_place_expr_method_on_single_line = true |
| 63 | +csharp_place_constructor_initializer_on_same_line = false |
| 64 | +csharp_wrap_object_and_collection_initializer_style = chop_if_long |
| 65 | +csharp_wrap_array_initializer_style = chop_if_long |
| 66 | +csharp_wrap_parameters_style = chop_if_long |
| 67 | +csharp_preserve_single_line_blocks = true |
| 68 | +csharp_keep_existing_arrangement = true |
| 69 | + |
| 70 | +# Spacing |
| 71 | +csharp_space_after_cast = false |
| 72 | +csharp_space_after_colon_in_inheritance_clause = true |
| 73 | +csharp_space_after_comma = true |
| 74 | +csharp_space_after_dot = false |
| 75 | +csharp_space_after_keywords_in_control_flow_statements = true |
| 76 | +csharp_space_after_semicolon_in_for_statement = true |
| 77 | +csharp_space_around_binary_operators = before_and_after |
| 78 | +csharp_space_before_colon_in_inheritance_clause = true |
| 79 | +csharp_space_before_comma = false |
| 80 | +csharp_space_before_dot = false |
| 81 | +csharp_space_before_semicolon_in_for_statement = false |
| 82 | +csharp_space_before_open_square_brackets = false |
| 83 | +csharp_space_between_empty_square_brackets = false |
| 84 | +csharp_space_between_method_declaration_name_and_open_parenthesis = false |
| 85 | +csharp_space_between_method_declaration_parameter_list_parentheses = false |
| 86 | +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false |
| 87 | +csharp_space_between_method_call_name_and_opening_parenthesis = false |
| 88 | +csharp_space_between_method_call_parameter_list_parentheses = false |
| 89 | +csharp_space_between_method_call_empty_parameter_list_parentheses = false |
| 90 | +csharp_space_between_square_brackets = false |
| 91 | +csharp_space_within_empty_braces = false |
| 92 | + |
| 93 | +# Object creation |
| 94 | +csharp_object_creation_when_type_evident = target_typed |
| 95 | +csharp_object_creation_when_type_not_evident = explicitly_typed |
| 96 | + |
| 97 | +# Style |
| 98 | +csharp_parentheses_redundancy_style = remove_if_not_clarifies_precedence |
| 99 | +csharp_allow_comment_after_lbrace = true |
| 100 | +csharp_braces_for_ifelse = required_for_multiline |
| 101 | +csharp_braces_for_for = required_for_multiline |
| 102 | +csharp_braces_for_foreach = required_for_multiline |
| 103 | +csharp_braces_for_while = required_for_multiline |
| 104 | +csharp_braces_for_using = required_for_multiline |
| 105 | +csharp_braces_for_lock = required_for_multiline |
| 106 | +csharp_braces_for_fixed = required_for_multiline |
| 107 | +csharp_style_var_for_built_in_types = false |
| 108 | +csharp_style_var_when_type_is_apparent = true |
| 109 | +csharp_style_expression_bodied_constructors = false |
| 110 | +csharp_style_expression_bodied_accessors = true |
| 111 | +csharp_style_expression_bodied_methods = true |
| 112 | +csharp_style_expression_bodied_properties = true |
| 113 | +csharp_local_function_body = expression_body |
| 114 | +csharp_style_qualification_for_event = false |
| 115 | +csharp_style_qualification_for_field = false |
| 116 | +csharp_style_qualification_for_method = false |
| 117 | +csharp_style_qualification_for_property = false |
| 118 | +csharp_style_pattern_matching_over_as_with_null_check = true |
| 119 | +csharp_style_pattern_matching_over_is_with_cast_check = true |
| 120 | +csharp_style_object_initializer = true |
| 121 | +csharp_style_collection_initializer = true |
| 122 | +csharp_style_explicit_tuple_names = true |
| 123 | +csharp_style_null_propagation = true |
| 124 | +csharp_style_coalesce_expression = true |
| 125 | +csharp_style_conditional_delegate_call = true |
| 126 | +csharp_style_throw_expression = true |
| 127 | +csharp_style_predefined_type_for_locals_parameters_members = true |
| 128 | +csharp_style_predefined_type_for_member_access = true |
| 129 | +csharp_style_namespace_declarations = file_scoped:error |
| 130 | + |
| 131 | +# Analyzer |
| 132 | +dotnet_analyzer_diagnostic.category-style.severity = warning |
| 133 | + |
| 134 | +#IDE |
| 135 | +dotnet_diagnostic.CA1707.severity = none |
| 136 | + |
| 137 | +# IDE0055: Fix formatting |
| 138 | +dotnet_diagnostic.ide0055.severity = none |
| 139 | + |
| 140 | +# IDE0021: Use block body for constructor |
| 141 | +dotnet_diagnostic.ide0021.severity = none |
| 142 | + |
| 143 | +# IDE0011: Add braces to 'if' statement |
| 144 | +dotnet_diagnostic.ide0011.severity = none |
| 145 | + |
| 146 | +# IDE0024: Use expression body for operator |
| 147 | +dotnet_diagnostic.ide0024.severity = none |
| 148 | + |
| 149 | +# IDE0058: Expression value is never used |
| 150 | +dotnet_diagnostic.ide0058.severity = none |
| 151 | + |
| 152 | +# SA1615: Element return value should be documented. |
| 153 | +dotnet_diagnostic.sa1615.severity = none |
| 154 | + |
| 155 | +# CA1 |
| 156 | + |
| 157 | +# SA1611: Element parameters must be documented. |
| 158 | +dotnet_diagnostic.sa1611.severity = none |
| 159 | + |
| 160 | +# SA1633: File must have header. |
| 161 | +dotnet_diagnostic.sa1633.severity = none |
| 162 | + |
| 163 | +# SA1633: Generic type parameters must be documented. |
| 164 | +dotnet_diagnostic.sa1618.severity = none |
| 165 | + |
| 166 | +# SA1133: Each attribute should be placed in its own set of square brackets. |
| 167 | +dotnet_diagnostic.sa1133.severity = none |
| 168 | + |
| 169 | +# SA1600: Elements must be documented. |
| 170 | +dotnet_diagnostic.sa1600.severity = none |
| 171 | + |
| 172 | +# SA1601: Partial elementes should be documented. |
| 173 | +dotnet_diagnostic.sa1601.severity = none |
| 174 | + |
| 175 | +# SA1201: A constructor should not follow a property |
| 176 | +dotnet_diagnostic.sa1201.severity = none |
| 177 | + |
| 178 | +# SA1101: Prefix local calls with this |
| 179 | +dotnet_diagnostic.sa1101.severity = none |
| 180 | + |
| 181 | +# SA1009: Closing parenthesis should be followed by a space. |
| 182 | +dotnet_diagnostic.sa1009.severity = none |
| 183 | + |
| 184 | +# SA1000: The keyword 'new' should be followed by a space. |
| 185 | +dotnet_diagnostic.sa1000.severity = none |
| 186 | + |
| 187 | +# SA1013: Closing brace should be preceded by a space |
| 188 | +dotnet_diagnostic.sa1013.severity = none |
| 189 | + |
| 190 | +# SA1012: Opening brace should be followed by a space |
| 191 | +dotnet_diagnostic.sa1012.severity = none |
| 192 | + |
| 193 | +# SA1502: Element should not be on a single line |
| 194 | +dotnet_diagnostic.sa1502.severity = none |
| 195 | + |
| 196 | +# SA1202: 'public' members should come before 'protected' members |
| 197 | +dotnet_diagnostic.sa1202.severity = none |
| 198 | + |
| 199 | +# SA1516: Elements should be separated by blank line |
| 200 | +dotnet_diagnostic.sa1516.severity = none |
| 201 | + |
| 202 | +# SA1204: Static members should appear before non-static members |
| 203 | +dotnet_diagnostic.sa1204.severity = none |
| 204 | + |
| 205 | +# SA1413: Use trailing comma in multi-line initializers |
| 206 | +dotnet_diagnostic.sa1413.severity = none |
| 207 | + |
| 208 | +# SA1200: Using directive should appear within a namespace declaration |
| 209 | +dotnet_diagnostic.sa1200.severity = none |
| 210 | + |
| 211 | +# SA1309: Field '_versions' should not begin with an underscore |
| 212 | +dotnet_diagnostic.sa1309.severity = none |
| 213 | + |
| 214 | +# SA1503: Braces should not be omitted |
| 215 | +dotnet_diagnostic.sa1503.severity = none |
| 216 | + |
| 217 | +# SA1313: Parameter 'PackageName' should begin with lower-case letter |
| 218 | +dotnet_diagnostic.sa1313.severity = none |
| 219 | + |
| 220 | +# SA1513: Closing brace should be followed by blank line |
| 221 | +dotnet_diagnostic.sa1513.severity = none |
| 222 | + |
| 223 | +# CS1591 : Missing XML comment for publicly visible type or member |
| 224 | +dotnet_diagnostic.cs1591.severity = none |
| 225 | + |
| 226 | +# SA1642: Constructor summary documentation should begin with standard text |
| 227 | +dotnet_diagnostic.sa1642.severity = none |
| 228 | + |
| 229 | +# SA1629 : Documentation text should end with a period |
| 230 | +dotnet_diagnostic.sa1629.severity = none |
| 231 | + |
| 232 | +# IDE0160 : Convert to block scoped namespace |
| 233 | +dotnet_diagnostic.ide0160.severity = none |
| 234 | + |
| 235 | +# SA1623: The property's documentation summary text should begin with: 'Gets' |
| 236 | +dotnet_diagnostic.sa1623.severity = none |
| 237 | + |
| 238 | +# SA1310 : Field should not contain an underscore |
| 239 | +dotnet_diagnostic.sa1310.severity = none |
| 240 | + |
| 241 | +# SA1602 : Enumeration items should be documented |
| 242 | +dotnet_diagnostic.sa1602.severity = none |
| 243 | + |
| 244 | +# SA1011 : Closing square bracket should be followed by a space |
| 245 | +dotnet_diagnostic.sa1011.severity = none |
| 246 | + |
| 247 | +# IDE0010: Populate switch |
| 248 | +dotnet_diagnostic.ide0010.severity = none |
| 249 | + |
| 250 | +# SA1203: Constant fields should appear before non-constant fields |
| 251 | +dotnet_diagnostic.sa1203.severity = none |
| 252 | + |
| 253 | +# IDE0023: Use block body for operators |
| 254 | +csharp_style_expression_bodied_operators = when_on_single_line |
| 255 | + |
| 256 | +# CA1848: Use LoggerMessage delegates |
| 257 | +dotnet_diagnostic.CA1848.severity = suggestion |
0 commit comments