|
| 1 | +# EditorConfig for SysDocs |
| 2 | +# https://editorconfig.org |
| 3 | + |
| 4 | +root = true |
| 5 | + |
| 6 | +# All files |
| 7 | +[*] |
| 8 | +charset = utf-8 |
| 9 | +insert_final_newline = true |
| 10 | +trim_trailing_whitespace = true |
| 11 | + |
| 12 | +# Code files |
| 13 | +[*.{cs,csx,vb,vbx}] |
| 14 | +indent_size = 4 |
| 15 | +indent_style = space |
| 16 | + |
| 17 | +# XML project files |
| 18 | +[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] |
| 19 | +indent_size = 2 |
| 20 | +indent_style = space |
| 21 | + |
| 22 | +# XML config files |
| 23 | +[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] |
| 24 | +indent_size = 2 |
| 25 | +indent_style = space |
| 26 | + |
| 27 | +# JSON and YAML files |
| 28 | +[*.{json,yml,yaml}] |
| 29 | +indent_size = 2 |
| 30 | +indent_style = space |
| 31 | + |
| 32 | +# Markdown files |
| 33 | +[*.md] |
| 34 | +trim_trailing_whitespace = false |
| 35 | +indent_size = 2 |
| 36 | +indent_style = space |
| 37 | + |
| 38 | +# Shell scripts |
| 39 | +[*.sh] |
| 40 | +indent_size = 2 |
| 41 | +indent_style = space |
| 42 | +end_of_line = lf |
| 43 | + |
| 44 | +# Nix files |
| 45 | +[*.nix] |
| 46 | +indent_size = 2 |
| 47 | +indent_style = space |
| 48 | + |
| 49 | +# C# coding conventions |
| 50 | +[*.cs] |
| 51 | + |
| 52 | +# Organize usings |
| 53 | +dotnet_sort_system_directives_first = true |
| 54 | +dotnet_separate_import_directive_groups = false |
| 55 | + |
| 56 | +# Language conventions |
| 57 | +dotnet_style_qualification_for_field = false:warning |
| 58 | +dotnet_style_qualification_for_property = false:warning |
| 59 | +dotnet_style_qualification_for_method = false:warning |
| 60 | +dotnet_style_qualification_for_event = false:warning |
| 61 | + |
| 62 | +dotnet_style_predefined_type_for_locals_parameters_members = true:warning |
| 63 | +dotnet_style_predefined_type_for_member_access = true:warning |
| 64 | + |
| 65 | +dotnet_style_require_accessibility_modifiers = always:warning |
| 66 | +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning |
| 67 | + |
| 68 | +dotnet_style_readonly_field = true:warning |
| 69 | +dotnet_style_prefer_auto_properties = true:suggestion |
| 70 | +dotnet_style_prefer_inferred_tuple_names = true:suggestion |
| 71 | +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion |
| 72 | + |
| 73 | +# Expression-level preferences |
| 74 | +dotnet_style_prefer_conditional_expression_over_return = false:silent |
| 75 | +dotnet_style_prefer_conditional_expression_over_assignment = false:silent |
| 76 | +csharp_prefer_simple_default_expression = true:suggestion |
| 77 | + |
| 78 | +# Null checking |
| 79 | +csharp_style_throw_expression = true:suggestion |
| 80 | +csharp_style_conditional_delegate_call = true:suggestion |
| 81 | +dotnet_style_coalesce_expression = true:suggestion |
| 82 | +dotnet_style_null_propagation = true:suggestion |
| 83 | +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion |
| 84 | + |
| 85 | +# Pattern matching |
| 86 | +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion |
| 87 | +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion |
| 88 | +csharp_style_prefer_switch_expression = true:suggestion |
| 89 | +csharp_style_prefer_pattern_matching = true:suggestion |
| 90 | +csharp_style_prefer_not_pattern = true:suggestion |
| 91 | + |
| 92 | +# Code block preferences |
| 93 | +csharp_prefer_braces = true:warning |
| 94 | +csharp_prefer_simple_using_statement = true:suggestion |
| 95 | + |
| 96 | +# Expression preferences |
| 97 | +csharp_style_inlined_variable_declaration = true:suggestion |
| 98 | +csharp_prefer_static_local_function = true:suggestion |
| 99 | + |
| 100 | +# 'using' directive preferences |
| 101 | +csharp_using_directive_placement = outside_namespace:warning |
| 102 | + |
| 103 | +# Namespace preferences |
| 104 | +csharp_style_namespace_declarations = file_scoped:warning |
| 105 | + |
| 106 | +# New line preferences |
| 107 | +csharp_new_line_before_open_brace = all |
| 108 | +csharp_new_line_before_else = true |
| 109 | +csharp_new_line_before_catch = true |
| 110 | +csharp_new_line_before_finally = true |
| 111 | +csharp_new_line_before_members_in_object_initializers = true |
| 112 | +csharp_new_line_before_members_in_anonymous_types = true |
| 113 | +csharp_new_line_between_query_expression_clauses = true |
| 114 | + |
| 115 | +# Indentation preferences |
| 116 | +csharp_indent_case_contents = true |
| 117 | +csharp_indent_switch_labels = true |
| 118 | +csharp_indent_labels = no_change |
| 119 | +csharp_indent_block_contents = true |
| 120 | +csharp_indent_braces = false |
| 121 | +csharp_indent_case_contents_when_block = false |
| 122 | + |
| 123 | +# Space preferences |
| 124 | +csharp_space_after_cast = false |
| 125 | +csharp_space_after_keywords_in_control_flow_statements = true |
| 126 | +csharp_space_between_parentheses = false |
| 127 | +csharp_space_before_colon_in_inheritance_clause = true |
| 128 | +csharp_space_after_colon_in_inheritance_clause = true |
| 129 | +csharp_space_around_binary_operators = before_and_after |
| 130 | +csharp_space_between_method_declaration_parameter_list_parentheses = false |
| 131 | +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false |
| 132 | +csharp_space_between_method_declaration_name_and_open_parenthesis = false |
| 133 | +csharp_space_between_method_call_parameter_list_parentheses = false |
| 134 | +csharp_space_between_method_call_empty_parameter_list_parentheses = false |
| 135 | +csharp_space_between_method_call_name_and_opening_parenthesis = false |
| 136 | +csharp_space_after_comma = true |
| 137 | +csharp_space_before_open_square_brackets = false |
| 138 | + |
| 139 | +# Wrapping |
| 140 | +csharp_preserve_single_line_statements = false |
| 141 | +csharp_preserve_single_line_blocks = true |
| 142 | + |
| 143 | +# Naming conventions |
| 144 | +dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning |
| 145 | +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface |
| 146 | +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i |
| 147 | + |
| 148 | +dotnet_naming_rule.types_should_be_pascal_case.severity = warning |
| 149 | +dotnet_naming_rule.types_should_be_pascal_case.symbols = types |
| 150 | +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case |
| 151 | + |
| 152 | +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = warning |
| 153 | +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members |
| 154 | +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case |
| 155 | + |
| 156 | +# Symbol specifications |
| 157 | +dotnet_naming_symbols.interface.applicable_kinds = interface |
| 158 | +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 159 | +dotnet_naming_symbols.interface.required_modifiers = |
| 160 | + |
| 161 | +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum |
| 162 | +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 163 | +dotnet_naming_symbols.types.required_modifiers = |
| 164 | + |
| 165 | +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method |
| 166 | +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 167 | +dotnet_naming_symbols.non_field_members.required_modifiers = |
| 168 | + |
| 169 | +# Naming styles |
| 170 | +dotnet_naming_style.begins_with_i.required_prefix = I |
| 171 | +dotnet_naming_style.begins_with_i.required_suffix = |
| 172 | +dotnet_naming_style.begins_with_i.word_separator = |
| 173 | +dotnet_naming_style.begins_with_i.capitalization = pascal_case |
| 174 | + |
| 175 | +dotnet_naming_style.pascal_case.required_prefix = |
| 176 | +dotnet_naming_style.pascal_case.required_suffix = |
| 177 | +dotnet_naming_style.pascal_case.word_separator = |
| 178 | +dotnet_naming_style.pascal_case.capitalization = pascal_case |
0 commit comments