|
1 |
| -# To learn more about .editorconfig see https://aka.ms/editorconfigdocs |
2 |
| -############################### |
3 |
| -# Core EditorConfig Options # |
4 |
| -############################### |
5 |
| -# All files |
| 1 | +# editorconfig.org |
| 2 | +root = true |
| 3 | + |
6 | 4 | [*]
|
| 5 | +charset = utf-8 |
7 | 6 | end_of_line = lf
|
| 7 | +indent_size = 2 |
8 | 8 | indent_style = space
|
9 | 9 | insert_final_newline = true
|
10 |
| -indent_size = 2 |
11 | 10 | trim_trailing_whitespace = true
|
12 | 11 |
|
13 |
| -# XML project files |
14 |
| -[*.{csproj,proj,projitems,shproj}] |
15 |
| -indent_size = 2 |
16 |
| - |
17 |
| -# XML config files |
18 |
| -[*.{props,targets,ruleset,config,nuspec,resx}] |
19 |
| -indent_size = 2 |
| 12 | +file_header_template = SPDX-FileCopyrightText: 2023 Demerzel Solutions Limited\nSPDX-License-Identifier: LGPL-3.0-only |
20 | 13 |
|
21 |
| -# Code files |
22 |
| -[*.{cs,csx}] |
23 |
| -indent_size = 4 |
24 |
| -insert_final_newline = true |
25 |
| -charset = utf-8-bom |
26 |
| -############################### |
27 |
| -# .NET Coding Conventions # |
28 |
| -############################### |
29 | 14 | [*.cs]
|
30 |
| -# Organize usings |
31 |
| -dotnet_sort_system_directives_first = true |
32 |
| -# this. preferences |
33 |
| -dotnet_style_qualification_for_field = false:silent |
34 |
| -dotnet_style_qualification_for_property = false:silent |
35 |
| -dotnet_style_qualification_for_method = false:silent |
36 |
| -dotnet_style_qualification_for_event = false:silent |
37 |
| -# Language keywords vs BCL types preferences |
38 |
| -dotnet_style_predefined_type_for_locals_parameters_members = true:silent |
39 |
| -dotnet_style_predefined_type_for_member_access = true:silent |
40 |
| -# Parentheses preferences |
41 |
| -dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent |
42 |
| -dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent |
43 |
| -dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent |
44 |
| -dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent |
45 |
| -# Modifier preferences |
46 |
| -dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent |
47 |
| -dotnet_style_readonly_field = true:suggestion |
48 |
| -# Expression-level preferences |
49 |
| -dotnet_style_object_initializer = true:suggestion |
50 |
| -dotnet_style_collection_initializer = true:suggestion |
51 |
| -dotnet_style_explicit_tuple_names = true:suggestion |
52 |
| -dotnet_style_null_propagation = true:suggestion |
| 15 | +indent_size = 4 |
| 16 | + |
| 17 | +#### Naming styles #### |
| 18 | + |
| 19 | +# Naming rules |
| 20 | + |
| 21 | +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion |
| 22 | +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface |
| 23 | +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i |
| 24 | + |
| 25 | +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion |
| 26 | +dotnet_naming_rule.types_should_be_pascal_case.symbols = types |
| 27 | +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case |
| 28 | + |
| 29 | +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion |
| 30 | +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members |
| 31 | +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case |
| 32 | + |
| 33 | +# Symbol specifications |
| 34 | + |
| 35 | +dotnet_naming_symbols.interface.applicable_kinds = interface |
| 36 | +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 37 | +dotnet_naming_symbols.interface.required_modifiers = |
| 38 | + |
| 39 | +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum |
| 40 | +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 41 | +dotnet_naming_symbols.types.required_modifiers = |
| 42 | + |
| 43 | +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method |
| 44 | +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 45 | +dotnet_naming_symbols.non_field_members.required_modifiers = |
| 46 | + |
| 47 | +# Naming styles |
| 48 | + |
| 49 | +dotnet_naming_style.begins_with_i.required_prefix = I |
| 50 | +dotnet_naming_style.begins_with_i.required_suffix = |
| 51 | +dotnet_naming_style.begins_with_i.word_separator = |
| 52 | +dotnet_naming_style.begins_with_i.capitalization = pascal_case |
| 53 | + |
| 54 | +dotnet_naming_style.pascal_case.required_prefix = |
| 55 | +dotnet_naming_style.pascal_case.required_suffix = |
| 56 | +dotnet_naming_style.pascal_case.word_separator = |
| 57 | +dotnet_naming_style.pascal_case.capitalization = pascal_case |
| 58 | + |
| 59 | +dotnet_naming_style.pascal_case.required_prefix = |
| 60 | +dotnet_naming_style.pascal_case.required_suffix = |
| 61 | +dotnet_naming_style.pascal_case.word_separator = |
| 62 | +dotnet_naming_style.pascal_case.capitalization = pascal_case |
| 63 | +dotnet_style_operator_placement_when_wrapping = beginning_of_line |
53 | 64 | dotnet_style_coalesce_expression = true:suggestion
|
54 |
| -dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent |
55 |
| -dotnet_style_prefer_inferred_tuple_names = true:suggestion |
56 |
| -dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion |
| 65 | +dotnet_style_null_propagation = true:suggestion |
| 66 | +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion |
57 | 67 | dotnet_style_prefer_auto_properties = true:silent
|
58 |
| -dotnet_style_prefer_conditional_expression_over_assignment = true:silent |
59 |
| -dotnet_style_prefer_conditional_expression_over_return = true:silent |
60 |
| -############################### |
61 |
| -# Naming Conventions # |
62 |
| -############################### |
63 |
| -# Style Definitions |
64 |
| -dotnet_naming_style.pascal_case_style.capitalization = pascal_case |
65 |
| -# Use PascalCase for constant fields |
66 |
| -dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion |
67 |
| -dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields |
68 |
| -dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style |
69 |
| -dotnet_naming_symbols.constant_fields.applicable_kinds = field |
70 |
| -dotnet_naming_symbols.constant_fields.applicable_accessibilities = * |
71 |
| -dotnet_naming_symbols.constant_fields.required_modifiers = const |
72 |
| -############################### |
73 |
| -# C# Coding Conventions # |
74 |
| -############################### |
75 |
| -# var preferences |
76 |
| -csharp_style_var_for_built_in_types = true:silent |
77 |
| -csharp_style_var_when_type_is_apparent = true:silent |
78 |
| -csharp_style_var_elsewhere = true:silent |
79 |
| -# Expression-bodied members |
| 68 | +dotnet_style_object_initializer = true:suggestion |
| 69 | +dotnet_style_prefer_collection_expression = true:suggestion |
| 70 | +dotnet_style_collection_initializer = true:suggestion |
| 71 | +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion |
| 72 | + |
| 73 | +csharp_indent_labels = one_less_than_current |
| 74 | +csharp_using_directive_placement = outside_namespace:silent |
| 75 | +csharp_prefer_simple_using_statement = true:suggestion |
| 76 | +csharp_prefer_braces = when_multiline:suggestion |
| 77 | +csharp_style_namespace_declarations = file_scoped:suggestion |
| 78 | +csharp_style_prefer_method_group_conversion = true:silent |
| 79 | +csharp_style_prefer_top_level_statements = true:silent |
| 80 | +csharp_style_prefer_primary_constructors = true:suggestion |
80 | 81 | csharp_style_expression_bodied_methods = false:silent
|
81 | 82 | csharp_style_expression_bodied_constructors = false:silent
|
82 | 83 | csharp_style_expression_bodied_operators = false:silent
|
83 | 84 | csharp_style_expression_bodied_properties = true:silent
|
84 | 85 | csharp_style_expression_bodied_indexers = true:silent
|
85 | 86 | csharp_style_expression_bodied_accessors = true:silent
|
86 |
| -# Pattern matching preferences |
87 |
| -csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion |
88 |
| -csharp_style_pattern_matching_over_as_with_null_check = true:suggestion |
89 |
| -# Null-checking preferences |
90 |
| -csharp_style_throw_expression = true:suggestion |
91 |
| -csharp_style_conditional_delegate_call = true:suggestion |
92 |
| -# Modifier preferences |
93 |
| -csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion |
94 |
| -# Expression-level preferences |
95 |
| -csharp_prefer_braces = true:silent |
96 |
| -csharp_style_deconstructed_variable_declaration = true:suggestion |
97 |
| -csharp_prefer_simple_default_expression = true:suggestion |
98 |
| -csharp_style_pattern_local_over_anonymous_function = true:suggestion |
99 |
| -csharp_style_inlined_variable_declaration = true:suggestion |
100 |
| -############################### |
101 |
| -# C# Formatting Rules # |
102 |
| -############################### |
103 |
| -# New line preferences |
104 |
| -csharp_new_line_before_open_brace = all |
105 |
| -csharp_new_line_before_else = true |
106 |
| -csharp_new_line_before_catch = true |
107 |
| -csharp_new_line_before_finally = true |
108 |
| -csharp_new_line_before_members_in_object_initializers = true |
109 |
| -csharp_new_line_before_members_in_anonymous_types = true |
110 |
| -csharp_new_line_between_query_expression_clauses = true |
111 |
| -# Indentation preferences |
112 |
| -csharp_indent_case_contents = true |
113 |
| -csharp_indent_switch_labels = true |
114 |
| -csharp_indent_labels = flush_left |
115 |
| -# Space preferences |
116 |
| -csharp_space_after_cast = false |
117 |
| -csharp_space_after_keywords_in_control_flow_statements = true |
118 |
| -csharp_space_between_method_call_parameter_list_parentheses = false |
119 |
| -csharp_space_between_method_declaration_parameter_list_parentheses = false |
120 |
| -csharp_space_between_parentheses = false |
121 |
| -csharp_space_before_colon_in_inheritance_clause = true |
122 |
| -csharp_space_after_colon_in_inheritance_clause = true |
123 |
| -csharp_space_around_binary_operators = before_and_after |
124 |
| -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false |
125 |
| -csharp_space_between_method_call_name_and_opening_parenthesis = false |
126 |
| -csharp_space_between_method_call_empty_parameter_list_parentheses = false |
127 |
| -# Wrapping preferences |
128 |
| -csharp_preserve_single_line_statements = true |
129 |
| -csharp_preserve_single_line_blocks = true |
| 87 | +csharp_style_expression_bodied_lambdas = true:silent |
| 88 | +csharp_style_expression_bodied_local_functions = false:silent |
| 89 | +csharp_style_var_for_built_in_types = true:silent |
| 90 | +csharp_style_var_when_type_is_apparent = true:suggestion |
| 91 | +csharp_style_var_elsewhere = false:suggestion |
0 commit comments