|
| 1 | +root = true |
| 2 | + |
| 3 | +[*] |
| 4 | +indent_style = space |
| 5 | +indent_size = 4 |
| 6 | +end_of_line = lf |
| 7 | +charset = utf-8 |
| 8 | +trim_trailing_whitespace = true |
| 9 | +insert_final_newline = true |
| 10 | + |
| 11 | +[*.md] |
| 12 | +trim_trailing_whitespace = false |
| 13 | + |
| 14 | +[*.{yml,yaml}] |
| 15 | +indent_size = 2 |
| 16 | + |
| 17 | +[*.{csproj,props,targets,slnx}] |
| 18 | +indent_size = 2 |
| 19 | + |
| 20 | +[*.cs] |
| 21 | +# Organize usings |
| 22 | +dotnet_sort_system_directives_first = true |
| 23 | +dotnet_separate_import_directive_groups = false |
| 24 | + |
| 25 | +# Namespace |
| 26 | +csharp_style_namespace_declarations = file_scoped:suggestion |
| 27 | + |
| 28 | +# var preferences |
| 29 | +csharp_style_var_for_built_in_types = true:suggestion |
| 30 | +csharp_style_var_when_type_is_apparent = true:suggestion |
| 31 | +csharp_style_var_elsewhere = true:suggestion |
| 32 | + |
| 33 | +# Expression-bodied members |
| 34 | +csharp_style_expression_bodied_methods = when_on_single_line:suggestion |
| 35 | +csharp_style_expression_bodied_properties = true:suggestion |
| 36 | +csharp_style_expression_bodied_accessors = true:suggestion |
| 37 | + |
| 38 | +# Pattern matching |
| 39 | +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion |
| 40 | +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion |
| 41 | + |
| 42 | +# Null checking |
| 43 | +csharp_style_throw_expression = true:suggestion |
| 44 | +csharp_style_conditional_delegate_call = true:suggestion |
| 45 | + |
| 46 | +# New line preferences |
| 47 | +csharp_new_line_before_open_brace = all |
| 48 | +csharp_new_line_before_else = true |
| 49 | +csharp_new_line_before_catch = true |
| 50 | +csharp_new_line_before_finally = true |
| 51 | + |
| 52 | +# Naming conventions |
| 53 | +dotnet_naming_rule.async_methods_end_in_async.severity = suggestion |
| 54 | +dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods |
| 55 | +dotnet_naming_rule.async_methods_end_in_async.style = end_in_async |
| 56 | + |
| 57 | +dotnet_naming_symbols.any_async_methods.applicable_kinds = method |
| 58 | +dotnet_naming_symbols.any_async_methods.applicable_accessibilities = * |
| 59 | +dotnet_naming_symbols.any_async_methods.required_modifiers = async |
| 60 | + |
| 61 | +dotnet_naming_style.end_in_async.required_suffix = Async |
| 62 | +dotnet_naming_style.end_in_async.capitalization = pascal_case |
0 commit comments