-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.editorconfig
207 lines (162 loc) · 8.25 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# Suppress: EC112
# top-most EditorConfig file
root = true
# Default settings:
# A newline ending every file
# Use 4 spaces as indentation
[*]
insert_final_newline = false
indent_style = space
indent_size = 4
# Code files
[*.{cs,csx,vb,vbx}]
indent_style = tab
indent_size = 4
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 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:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:warning
dotnet_style_prefer_conditional_expression_over_return = true:none
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:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
# Code files
# IDE0046: Convert to conditional expression
dotnet_diagnostic.IDE0046.severity = none
dotnet_style_prefer_collection_expression = true:suggestion
[*.sln]
indent_size = 4
# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2
# Xml config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
# JSON files
[*.json]
indent_size = 2
# XML files
[*.xml]
indent_size = 2
[*.cs]
# Organize usings
dotnet_sort_system_directives_first = true
# IDE0160: Use file scoped namespace
csharp_style_namespace_declarations = file_scoped:error
# CS4014: Because this call is not awaited, execution of the current method continues before the call is completed
dotnet_diagnostic.CS4014.severity = error
# Remove explicit default access modifiers
dotnet_style_require_accessibility_modifiers = omit_if_default:error
# CA1063: Implement IDisposable Correctly
dotnet_diagnostic.CA1063.severity = error
# Add braces (IDE0011)
csharp_prefer_braces = true:silent
dotnet_diagnostic.IDE0011.severity = error
# Pattern matching
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method=true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestions
# Naming rules
dotnet_diagnostic.IDE1006.severity = error
## Public Fields are kept Pascal Case
dotnet_naming_symbols.public_symbols.applicable_kinds = field
dotnet_naming_symbols.public_symbols.applicable_accessibilities = public
dotnet_naming_style.first_word_upper_case_style.capitalization = first_word_upper
dotnet_naming_rule.public_members_must_be_capitalized.symbols = public_symbols
dotnet_naming_rule.public_members_must_be_capitalized.style = first_word_upper_case_style
dotnet_naming_rule.public_members_must_be_capitalized.severity = suggestion
## Instance fields are camelCase
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = error
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
dotnet_naming_symbols.instance_fields.applicable_kinds = field
dotnet_naming_style.instance_field_style.capitalization = camel_case
dotnet_naming_style.instance_field_style.required_prefix =
## Static fields are camelCase
dotnet_naming_rule.static_fields_should_be_camel_case.severity = error
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
dotnet_naming_rule.static_fields_should_be_camel_case.style = instance_field_style
dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static
dotnet_naming_symbols.static_fields.applicable_accessibilities = internal, private, protected, protected_internal, private_protected
dotnet_naming_style.static_field_style.capitalization = camel_case
dotnet_naming_style.static_field_style.required_prefix =
## Private fields
dotnet_naming_rule.private_members_with_underscore.symbols = private_fields
dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore
dotnet_naming_rule.private_members_with_underscore.severity = suggestion
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
dotnet_naming_style.prefix_underscore.capitalization = camel_case
dotnet_naming_style.prefix_underscore.required_prefix = _
# Modifier preferences
csharp_prefer_static_local_function = true:suggestion
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:error
csharp_indent_labels = one_less_than_current
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = 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_space_around_binary_operators = before_and_after
# CA1826: Do not use Enumerable methods on indexable collections
dotnet_diagnostic.CA1826.severity = silent
# CA1711: Identifiers should not have incorrect suffix
dotnet_diagnostic.CA1711.severity = none
# RCS1161: Enum should declare explicit values.
dotnet_diagnostic.RCS1161.severity = none
# S2344: Enumeration type names should not have "Flags" or "Enum" suffixes
dotnet_diagnostic.S2344.severity = none
# S1643: Strings should not be concatenated using '+' in a loop
dotnet_diagnostic.S1643.severity = silent
# CA1822: Member does not access instance data and can be marked as static
dotnet_diagnostic.CA1822.severity = error
# CA1050: Declare types in namespaces
dotnet_diagnostic.CA1050.severity = error
# CA2016: Forward the 'cancellationToken' parameter methods that take one
dotnet_diagnostic.CA2016.severity = error
# CA2208: Method passes parameter as the paramName argument to a ArgumentNullException constructor. Replace this argument with one of the method's parameter names. Note that the provided parameter name should have the exact casing as declared on the method.
dotnet_diagnostic.CA2208.severity = error
# CA1834: Use 'StringBuilder.Append(char)' instead of 'StringBuilder.Append(string)' when the input is a constant unit string
dotnet_diagnostic.CA1834.severity = error
# IDE0220: Add explicit cast
dotnet_diagnostic.IDE0220.severity = error
csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
# RCS1075: Avoid empty catch clause that catches System.Exception.
dotnet_diagnostic.RCS1075.severity = none
csharp_style_prefer_local_over_anonymous_function = true:suggestion
dotnet_diagnostic.S3358.severity = silent
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
dotnet_diagnostic.S112.severity = silent
dotnet_diagnostic.S1135.severity = suggestion
csharp_style_prefer_primary_constructors = false:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = false:suggestion
csharp_style_var_elsewhere = false:suggestion