|
| 1 | +# editorconfig.org |
| 2 | +root = true |
| 3 | + |
| 4 | +# Don't use tabs for indentation. |
| 5 | +[*] |
| 6 | +indent_style = space |
| 7 | + |
| 8 | +# Code files |
| 9 | +[*.{cs,csx,vb,vbx}] |
| 10 | +indent_size = 4 |
| 11 | +insert_final_newline = true |
| 12 | +charset = utf-8-bom |
| 13 | +trim_trailing_whitespace = true |
| 14 | + |
| 15 | +# Xml project files |
| 16 | +[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] |
| 17 | +indent_size = 2 |
| 18 | + |
| 19 | +# Xml config files |
| 20 | +[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] |
| 21 | +indent_size = 2 |
| 22 | + |
| 23 | +# JSON files |
| 24 | +[*.json] |
| 25 | +indent_size = 2 |
| 26 | + |
| 27 | +# Dotnet code style settings: |
| 28 | +[*.{cs,vb}] |
| 29 | +# Sort using and Import directives with System.* appearing first |
| 30 | +dotnet_sort_system_directives_first = true |
| 31 | +# Avoid "this." and "Me." if not necessary |
| 32 | +dotnet_style_qualification_for_field = false:suggestion |
| 33 | +dotnet_style_qualification_for_property = false:suggestion |
| 34 | +dotnet_style_qualification_for_method = false:suggestion |
| 35 | +dotnet_style_qualification_for_event = false:suggestion |
| 36 | + |
| 37 | +# Use language keywords instead of framework type names for type references |
| 38 | +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion |
| 39 | +dotnet_style_predefined_type_for_member_access = true:suggestion |
| 40 | + |
| 41 | +# Suggest more modern language features when available |
| 42 | +dotnet_style_object_initializer = true:suggestion |
| 43 | +dotnet_style_collection_initializer = true:suggestion |
| 44 | +dotnet_style_coalesce_expression = true:suggestion |
| 45 | +dotnet_style_null_propagation = true:suggestion |
| 46 | +dotnet_style_explicit_tuple_names = true:suggestion |
| 47 | + |
| 48 | +# CSharp code style settings: |
| 49 | +[*.cs] |
| 50 | +# Prefer method-like constructs to have a expression-body |
| 51 | +csharp_style_expression_bodied_methods = true:none |
| 52 | +csharp_style_expression_bodied_constructors = true:none |
| 53 | +csharp_style_expression_bodied_operators = true:none |
| 54 | + |
| 55 | +# Prefer property-like constructs to have an expression-body |
| 56 | +csharp_style_expression_bodied_properties = true:none |
| 57 | +csharp_style_expression_bodied_indexers = true:none |
| 58 | +csharp_style_expression_bodied_accessors = true:none |
| 59 | + |
| 60 | +# Suggest more modern language features when available |
| 61 | +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion |
| 62 | +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion |
| 63 | +csharp_style_inlined_variable_declaration = true:suggestion |
| 64 | +csharp_style_throw_expression = true:suggestion |
| 65 | +csharp_style_conditional_delegate_call = true:suggestion |
| 66 | + |
| 67 | +# Newline settings |
| 68 | +csharp_new_line_before_open_brace = all |
| 69 | +csharp_new_line_before_else = true |
| 70 | +csharp_new_line_before_catch = true |
| 71 | +csharp_new_line_before_finally = true |
| 72 | +csharp_new_line_before_members_in_object_initializers = true |
| 73 | +csharp_new_line_before_members_in_anonymous_types = true |
| 74 | + |
| 75 | +# Space settings |
| 76 | +csharp_space_after_keywords_in_control_flow_statements = true:suggestion |
0 commit comments