-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.editorconfig
180 lines (143 loc) · 6.91 KB
/
.editorconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# Suppress: EC102
root = true
# common styles for C#
[*.cs]
max_line_length = 65
indent_style = space
dotnet_naming_rule.privcamel.symbols = private_members
dotnet_naming_rule.privcamel.severity = error
dotnet_naming_rule.privcamel.style = camelcase
dotnet_naming_style.camelcase.capitalization = camel_case
dotnet_naming_symbols.private_members.applicable_accessibilities = private
dotnet_naming_symbols.private_members.applicable_kinds = property,method,field
# the examples occasionally use skeleton code that doesn't
# have any tied up implementation so we disable the warnings
# about how the parameters we created are unused.
# IDE0060: Remove unused parameter
dotnet_code_quality_unused_parameters = all:none
# CS0649: Field 'xx' is never assigned to, and will always have its default value null
dotnet_diagnostic.CS0649.severity = none
# IDE0058: Expression value is never used
dotnet_diagnostic.IDE0058.severity = none
# IDE0046: Convert to conditional expression
dotnet_diagnostic.IDE0046.severity = none
# CA1050: Declare types in namespaces
dotnet_diagnostic.CA1050.severity = none
# CS8524: The switch expression does not handle some values of its input type (it is not exhaustive) involving an unnamed enum value.
dotnet_diagnostic.CS8524.severity = none
# IDE0044: Add readonly modifier
dotnet_diagnostic.IDE0044.severity = silent
# IDE0090: Use new(...) syntax
dotnet_diagnostic.IDE0090.severity = silent
# actual nice code formatting rules (Allman style)
[*.cs]
csharp_new_line_before_open_brace = all
indent_size = 4
csharp_using_directive_placement = outside_namespace:suggestion
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_throw_expression = true:suggestion
csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
csharp_style_prefer_tuple_swap = true:suggestion
csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_indent_labels = one_less_than_current
csharp_style_inlined_variable_declaration = true:suggestion
# book formatting rules (K&R) to save space
# IDE0290: Use primary constructor
dotnet_diagnostic.IDE0290.severity = silent
# IDE0063: Use simple 'using' statement
dotnet_diagnostic.IDE0063.severity = none
# IDE0057: Use range operator
dotnet_diagnostic.IDE0057.severity = none
# IDE0051: Remove unused private members
dotnet_diagnostic.IDE0051.severity = none
# CA1822: Mark members as static
dotnet_diagnostic.CA1822.severity = none
# CA1842: Do not use 'WhenAll' with a single task
dotnet_diagnostic.CA1842.severity = none
# CA1861: Avoid constant arrays as arguments
dotnet_diagnostic.CA1861.severity = none
# IDE0052: Remove unread private members
dotnet_diagnostic.IDE0052.severity = none
# CA1859: Use concrete types when possible for improved performance
dotnet_diagnostic.CA1859.severity = none
# CA2211: Non-constant fields should not be visible
dotnet_diagnostic.CA2211.severity = none
# IDE0078: Use pattern matching
dotnet_diagnostic.IDE0078.severity = none
# CA1512: Use ArgumentOutOfRangeException throw helper
dotnet_diagnostic.CA1512.severity = none
# CA1510: Use ArgumentNullException throw helper
dotnet_diagnostic.CA1510.severity = none
# SYSLIB1045: Convert to 'GeneratedRegexAttribute'.
dotnet_diagnostic.SYSLIB1045.severity = none
# IDE0251: Make member 'readonly'
dotnet_diagnostic.IDE0251.severity = none
# CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
dotnet_diagnostic.CA1835.severity = none
# IDE0059: Unnecessary assignment of a value
dotnet_diagnostic.IDE0059.severity = none
[*.csxx]
csharp_new_line_before_open_brace = none
indent_size = 2
[*.{cs,vb}]
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
indent_size = 4
end_of_line = crlf
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:error
dotnet_style_object_initializer = true:suggestion
dotnet_style_prefer_collection_expression = true:none
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:none
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_readonly_field = true:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_predefined_type_for_member_access = true:silent
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
dotnet_code_quality_unused_parameters = all:none
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent
# IDE0074: Use compound assignment
dotnet_diagnostic.IDE0074.severity = none
# IDE0028: Simplify collection initialization
dotnet_diagnostic.IDE0028.severity = none
# IDE0300: Simplify collection initialization
dotnet_diagnostic.IDE0300.severity = none
# IDE0045: Convert to conditional expression
dotnet_diagnostic.IDE0045.severity = silent