-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy path.editorconfig
315 lines (219 loc) · 9.45 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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
root = true
# Steamcore .NET library editorconfig
# dotnet_library_editorconfig_version = 19
[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
[*.{config,csproj,props,targets}]
indent_style = space
indent_size = 2
[*.{json,yml}]
indent_style = space
indent_size = 2
[*.{ps1,psm1}]
indent_style = space
indent_size = 4
[*.cs]
indent_style = tab
indent_size = 4
# Microsoft reference documentation
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference?view=vs-2019
#### .NET Coding Conventions ####
# Organize usings
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
# this. and Me. preferences
dotnet_style_qualification_for_event = false:warning
dotnet_style_qualification_for_field = false:warning
dotnet_style_qualification_for_method = false:warning
dotnet_style_qualification_for_property = false:warning
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = true:warning
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:suggestion
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:suggestion
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:suggestion
# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
# Expression-level preferences
csharp_style_inlined_variable_declaration = true:warning
csharp_style_throw_expression = true:warning
dotnet_style_coalesce_expression = true:warning
dotnet_style_collection_initializer = true:warning
dotnet_style_explicit_tuple_names = true:warning
dotnet_style_null_propagation = true:warning
dotnet_style_prefer_conditional_expression_over_assignment = true:warning
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
# Field preferences
dotnet_style_readonly_field = true:warning
# Parameter preferences
dotnet_code_quality_unused_parameters = all:warning
#### C# Coding Conventions ####
# Namespace preferences
csharp_style_namespace_declarations = file_scoped:warning
# var preferences
csharp_style_var_elsewhere = true:warning
csharp_style_var_for_built_in_types = true:warning
csharp_style_var_when_type_is_apparent = true:warning
# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true:warning
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
csharp_style_prefer_switch_expression = true:warning
# Modifier preferences
csharp_prefer_static_local_function = true:warning
# Code-block preferences
csharp_prefer_braces = true:silent
csharp_prefer_simple_using_statement = true:warning
# Expression-level preferences
csharp_style_pattern_local_over_anonymous_function = true:warning
# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:warning
# Use 'System.Threading.Lock'
csharp_prefer_system_threading_lock = true
#### C# Formatting Rules ####
# Wrapping preferences
csharp_preserve_single_line_statements = false
#### Naming styles ####
# Naming rules
dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
dotnet_naming_rule.types_should_be_pascal_case.severity = warning
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = warning
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
#### Roslynator Options ####
roslynator_accessibility_modifiers = explicit
# Prefer explicit/implicit object creation
roslynator_object_creation_type_style = implicit_when_type_is_obvious
# Use collection expression for array/collection creation
roslynator_use_collection_expression = true
#### Analyzer Rules ####
# <EnableNETAnalyzers>true</EnableNETAnalyzers>
# <AnalysisMode>All</AnalysisMode>
# <AnalysisLevel>9.0</AnalysisLevel>
# CA1031: Do not catch general exception types
dotnet_diagnostic.CA1031.severity = none
# CA1040: Avoid empty interfaces
dotnet_diagnostic.CA1040.severity = none
# CA1062: Validate arguments of public methods
dotnet_diagnostic.CA1062.severity = warning
# CA1303: Do not pass literals as localized parameters
dotnet_diagnostic.CA1303.severity = none
# CA1308: Normalize strings to uppercase
dotnet_diagnostic.CA1308.severity = none
# CA1508: Avoid dead conditional code (buggy)
dotnet_diagnostic.CA1508.severity = none
# CA1515: Consider making public types internal
dotnet_diagnostic.CA1515.severity = none
# CA1711: Identifiers should not have incorrect suffix
dotnet_diagnostic.CA1711.severity = none
# CA1716: Identifiers should not match keywords
dotnet_diagnostic.CA1716.severity = none
# CA1727: Use PascalCase for named placeholders
dotnet_diagnostic.CA1727.severity = none
# CA1852: Seal internal types
dotnet_diagnostic.CA1852.severity = warning
# CA2007: Do not directly await a Task
dotnet_diagnostic.CA2007.severity = none
# CA2229: Implement serialization constructors
dotnet_diagnostic.CA2229.severity = none
# CA5394: Do not use insecure randomness
dotnet_diagnostic.CA5394.severity = none
# IDE0005: Remove unnecessary import
dotnet_diagnostic.IDE0005.severity = warning
# IDE0007: Use 'var' instead of explicit type
dotnet_diagnostic.IDE0007.severity = suggestion
# IDE0008: Use explicit type instead of 'var'
dotnet_diagnostic.IDE0008.severity = none
# IDE0010: Add missing cases
dotnet_diagnostic.IDE0010.severity = none
# IDE0022: Use expression body for methods
dotnet_diagnostic.IDE0022.severity = none
# IDE0028: Use collection initializers
dotnet_diagnostic.IDE0028.severity = warning
# IDE0035: Remove unreachable code
dotnet_diagnostic.IDE0035.severity = warning
# IDE0046: Convert to conditional expression
dotnet_diagnostic.IDE0046.severity = none
# IDE0051: Remove unused private member
dotnet_diagnostic.IDE0051.severity = warning
# IDE0052: Remove unread private member
dotnet_diagnostic.IDE0052.severity = warning
# IDE0058: Remove unnecessary expression value
dotnet_diagnostic.IDE0058.severity = none
# IDE0072: Add missing cases
dotnet_diagnostic.IDE0072.severity = none
# IDE0079: Remove unnecessary suppression
dotnet_diagnostic.IDE0079.severity = none
# IDE0080: Remove unnecessary suppression operator
dotnet_diagnostic.IDE0080.severity = warning
# IDE0130: Namespace does not match folder structure
dotnet_diagnostic.IDE0130.severity = warning
# IDE0300: Collection initialization can be simplified
dotnet_diagnostic.IDE0300.severity = warning
# IDE0301: Collection initialization can be simplified
dotnet_diagnostic.IDE0301.severity = warning
# IDE0305: Collection initialization can be simplified
dotnet_diagnostic.IDE0305.severity = warning
# IDE0330: Use 'System.Threading.Lock'
dotnet_diagnostic.IDE0330.severity = warning
# RCS1018: Add default access modifier
dotnet_diagnostic.RCS1018.severity = warning
# RCS1021: Convert lambda expression body to expression-body
dotnet_diagnostic.RCS1021.severity = none
# RCS1036: Remove redundant empty line
dotnet_diagnostic.RCS1036.severity = warning
# RCS1037: Remove trailing white-space
dotnet_diagnostic.RCS1037.severity = warning
# RCS1047: Non-asynchronous method name should not end with 'Async'
dotnet_diagnostic.RCS1047.severity = none
# RCS1077: Optimize LINQ method call
dotnet_diagnostic.RCS1077.severity = warning
# RCS1080: Use 'Count/Length' property instead of 'Any' method
dotnet_diagnostic.RCS1080.severity = warning
# RCS1123: Add parentheses according to operator precedence
dotnet_diagnostic.RCS1123.severity = none
# RCS1146: Use conditional access
dotnet_diagnostic.RCS1146.severity = warning
# RCS1163: Unused parameter
dotnet_diagnostic.RCS1163.severity = none
# RCS1168: Parameter name differs from base name
dotnet_diagnostic.RCS1168.severity = warning
# RCS1169: Make field read-only
dotnet_diagnostic.RCS1169.severity = warning
# RCS1174: Remove redundant async/await
dotnet_diagnostic.RCS1174.severity = warning
# RCS1192: Use regular string literal instead of verbatim string literal
dotnet_diagnostic.RCS1192.severity = none
# RCS1250: Use implicit/explicit object creation
dotnet_diagnostic.RCS1250.severity = none
# VSTHRD002: Avoid problematic synchronous waits
dotnet_diagnostic.VSTHRD002.severity = none
# VSTHRD003: Avoid awaiting foreign Tasks
dotnet_diagnostic.VSTHRD003.severity = none
# VSTHRD012: Provide JoinableTaskFactory where allowed
dotnet_diagnostic.VSTHRD012.severity = none
[*.Tests.cs]
# CA1054: URI-like parameters should not be strings
dotnet_diagnostic.CA1054.severity = none
# CA1062: Validate arguments of public methods
dotnet_diagnostic.CA1062.severity = none
# CA1707: Identifiers should not contain underscores
dotnet_diagnostic.CA1707.severity = none
# CA2234: Pass system uri objects instead of strings
dotnet_diagnostic.CA2234.severity = none
[*Configuration.cs]
# IDE0130: Namespace does not match folder structure
dotnet_diagnostic.IDE0130.severity = none
[*Extensions.cs]
# IDE0130: Namespace does not match folder structure
dotnet_diagnostic.IDE0130.severity = none
[Program.cs]
# CA1852: Seal internal types
dotnet_diagnostic.CA1852.severity = none