|
| 1 | +root=true |
| 2 | + |
| 3 | +[*] |
| 4 | +tab_width = 4 |
| 5 | +indent_size = 4 |
| 6 | +end_of_line = crlf |
| 7 | + |
| 8 | +[*.cs] |
| 9 | + |
| 10 | +# Default severity for all analyzer diagnostics |
| 11 | +dotnet_analyzer_diagnostic.severity = none |
| 12 | +csharp_prefer_simple_using_statement = true:suggestion |
| 13 | +csharp_prefer_braces = true:silent |
| 14 | +csharp_style_prefer_method_group_conversion = true:silent |
| 15 | +csharp_style_prefer_top_level_statements = true:silent |
| 16 | +csharp_style_prefer_primary_constructors = true:suggestion |
| 17 | +csharp_style_expression_bodied_methods = false:silent |
| 18 | +csharp_style_expression_bodied_constructors = false:silent |
| 19 | +csharp_style_expression_bodied_operators = false:silent |
| 20 | +csharp_style_expression_bodied_properties = true:silent |
| 21 | +csharp_style_expression_bodied_indexers = true:silent |
| 22 | +csharp_style_expression_bodied_accessors = true:silent |
| 23 | +csharp_style_expression_bodied_lambdas = true:silent |
| 24 | +csharp_style_expression_bodied_local_functions = false:silent |
| 25 | +csharp_indent_labels = one_less_than_current |
| 26 | +csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent |
| 27 | + |
| 28 | +# Newline settings |
| 29 | +dotnet_diagnostic.IDE0055.severity = warning |
| 30 | +csharp_new_line_before_open_brace = all |
| 31 | +csharp_new_line_before_else = true |
| 32 | +csharp_new_line_before_catch = true |
| 33 | +csharp_new_line_before_finally = true |
| 34 | +csharp_new_line_before_members_in_object_initializers = true |
| 35 | +csharp_new_line_before_members_in_anonymous_types = true |
| 36 | + |
| 37 | +# Namespace settings |
| 38 | +dotnet_diagnostic.IDE0160.severity = warning |
| 39 | +csharp_style_namespace_declarations = block_scoped |
| 40 | + |
| 41 | +# unused usings |
| 42 | +dotnet_diagnostic.IDE0005.severity = warning |
| 43 | + |
| 44 | + |
| 45 | +[*.{cs,vb}] |
| 46 | +# using directives |
| 47 | +dotnet_diagnostic.IDE0055.severity = warning |
| 48 | +dotnet_diagnostic.IDE0065.severity = warning |
| 49 | +csharp_using_directive_placement = outside_namespace |
| 50 | +dotnet_sort_system_directives_first = true |
| 51 | +dotnet_separate_import_directive_groups = false |
| 52 | + |
| 53 | +#### Naming styles #### |
| 54 | + |
| 55 | +# Naming rules |
| 56 | + |
| 57 | +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion |
| 58 | +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface |
| 59 | +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i |
| 60 | + |
| 61 | +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion |
| 62 | +dotnet_naming_rule.types_should_be_pascal_case.symbols = types |
| 63 | +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case |
| 64 | + |
| 65 | +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion |
| 66 | +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members |
| 67 | +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case |
| 68 | + |
| 69 | +# Symbol specifications |
| 70 | + |
| 71 | +dotnet_naming_symbols.interface.applicable_kinds = interface |
| 72 | +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 73 | +dotnet_naming_symbols.interface.required_modifiers = |
| 74 | + |
| 75 | +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum |
| 76 | +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 77 | +dotnet_naming_symbols.types.required_modifiers = |
| 78 | + |
| 79 | +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method |
| 80 | +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 81 | +dotnet_naming_symbols.non_field_members.required_modifiers = |
| 82 | + |
| 83 | +# Naming styles |
| 84 | + |
| 85 | +dotnet_naming_style.begins_with_i.required_prefix = I |
| 86 | +dotnet_naming_style.begins_with_i.required_suffix = |
| 87 | +dotnet_naming_style.begins_with_i.word_separator = |
| 88 | +dotnet_naming_style.begins_with_i.capitalization = pascal_case |
| 89 | + |
| 90 | +dotnet_naming_style.pascal_case.required_prefix = |
| 91 | +dotnet_naming_style.pascal_case.required_suffix = |
| 92 | +dotnet_naming_style.pascal_case.word_separator = |
| 93 | +dotnet_naming_style.pascal_case.capitalization = pascal_case |
| 94 | + |
| 95 | +dotnet_naming_style.pascal_case.required_prefix = |
| 96 | +dotnet_naming_style.pascal_case.required_suffix = |
| 97 | +dotnet_naming_style.pascal_case.word_separator = |
| 98 | +dotnet_naming_style.pascal_case.capitalization = pascal_case |
| 99 | +dotnet_style_coalesce_expression = true:suggestion |
| 100 | +dotnet_style_null_propagation = true:suggestion |
| 101 | +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion |
| 102 | +dotnet_style_prefer_auto_properties = true:silent |
| 103 | +dotnet_style_object_initializer = true:suggestion |
| 104 | +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion |
| 105 | +dotnet_style_prefer_conditional_expression_over_assignment = true:silent |
| 106 | +dotnet_style_prefer_conditional_expression_over_return = true:silent |
| 107 | +dotnet_style_explicit_tuple_names = true:suggestion |
| 108 | +dotnet_style_prefer_inferred_tuple_names = true:suggestion |
| 109 | +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion |
| 110 | +dotnet_style_prefer_compound_assignment = true:suggestion |
| 111 | +dotnet_style_prefer_simplified_interpolation = true:suggestion |
| 112 | +dotnet_style_namespace_match_folder = true:suggestion |
| 113 | +dotnet_style_operator_placement_when_wrapping = beginning_of_line |
| 114 | + |
| 115 | +# Collections |
| 116 | +dotnet_diagnostic.IDE0028.severity = suggestion |
| 117 | +dotnet_style_prefer_collection_expression = true |
| 118 | +dotnet_style_collection_initializer = true |
| 119 | + |
| 120 | +# remove Migrations files from Analyzer |
| 121 | +[**/Migrations/*.cs] |
| 122 | +dotnet_diagnostic.IDE0005.severity = silent |
| 123 | +# doesn't work on VS Code apparently |
| 124 | +generated_code = true |
0 commit comments