-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.editorconfig
254 lines (184 loc) · 9.13 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
# You can modify the rules from these initially generated values to suit your own policies
# You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
root = true
[*.props]
indent_style = space
[*.i18n.json]
indent_style = tab
[*.{csproj, config.development, config}]
indent_style = space
indent_size = 2
[*.cs]
max_line_length = 130
charset=utf-8
# end_of_line=crlf - git manages line endings based on current checkout platform. See more details at https://github.com/dotnet/roslyn/issues/55526
insert_final_newline=false
indent_style = tab
trim_trailing_whitespace = true
# CA1024 Use properties where appropriate
dotnet_diagnostic.CA1024.severity = suggestion
# There are false-positives. Reevaluate after 28.01.2024
# CA1508 Avoid dead conditional code
dotnet_diagnostic.CA1508.severity = none
# URI-like parameters should not be strings
dotnet_diagnostic.CA1054.severity = suggestion
#csharp_style_namespace_declarations = file_scoped
dotnet_diagnostic.IDE0160.severity = none
# CA2007: Consider calling ConfigureAwait on the awaited task
dotnet_diagnostic.CA2007.severity = none
# CA1031: Do not catch general exception types
dotnet_diagnostic.CA1031.severity = none
# CA1032: Implement standard exception constructors
dotnet_diagnostic.CA1032.severity = none
# CA2227: Collection properties should be read only
dotnet_diagnostic.CA2227.severity = none
# CA1055: Change from string to Uri
dotnet_diagnostic.CA1055.severity = none
# CA1056: Change from string to Uri
dotnet_diagnostic.CA1056.severity = none
# CA1062: Validate arguments of public methods
dotnet_diagnostic.CA1062.severity = none
# CA2254: Template should be a static expression
dotnet_diagnostic.CA2254.severity = none
# CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
dotnet_diagnostic.CS1591.severity = none
# CA1848 Use the LoggerMessage delegates
dotnet_diagnostic.CA1848.severity = none
# CS1998 Async method lacks await and will run synchronously
dotnet_diagnostic.CS1998.severity = none
# Warning for all style and code quality rules (IDEXXXX rules)
# Then remove IDEXXXX rules that don't comply with company rules
dotnet_analyzer_diagnostic.category-Style.severity = warning
dotnet_analyzer_diagnostic.category-CodeQuality.severity = warning
# IDE0008 Use explicit type instead of var
dotnet_diagnostic.IDE0008.severity = none
# IDE0009 Add this or Me qualification
dotnet_diagnostic.IDE0009.severity = none
# IDE0010 Populate switch
dotnet_diagnostic.IDE0010.severity = none
# IDE0011 Add braces '{}'
dotnet_diagnostic.IDE0011.severity = none
# IDE0021 Use expression body for constructors
dotnet_diagnostic.IDE0021.severity = none
# IDE0022 Use expression body for methods
dotnet_diagnostic.IDE0022.severity = none
# IDE0023 Use expression body for conversion operators
dotnet_diagnostic.IDE0023.severity = none
# IDE0024 Use expression body for operators
dotnet_diagnostic.IDE0024.severity = none
# IDE0025 Use expression body for properties
dotnet_diagnostic.IDE0025.severity = none
# IDE0026 Use expression body for indexers
dotnet_diagnostic.IDE0026.severity = none
# IDE0027 Use expression body for accessors
dotnet_diagnostic.IDE0027.severity = none
# IDE0037 Use inferred member name
dotnet_diagnostic.IDE0037.severity = none
# IDE0039 Use local functions
dotnet_diagnostic.IDE0039.severity = none
# IDE0042 Deconstruct variable declaration
dotnet_diagnostic.IDE0042.severity = none
# IDE0045 If statement can be simplified
dotnet_diagnostic.IDE0045.severity = none
# IDE0046 If statement can be simplified
dotnet_diagnostic.IDE0046.severity = none
# IDE0047 Remove unnecessary parentheses
dotnet_diagnostic.IDE0047.severity = none
# IDE0048 Add parentheses for clarity
dotnet_diagnostic.IDE0048.severity = none
# IDE0050 Convert anonymous type to tuple
dotnet_diagnostic.IDE0050.severity = none
# IDE0054 Use compound assignment
dotnet_diagnostic.IDE0054.severity = none
# IDE0055 Fix formatting
dotnet_diagnostic.IDE0055.severity = suggestion
# IDE0058 Remove unnecessary expression value
dotnet_diagnostic.IDE0058.severity = none
# IDE0060 For rule IDE0060
dotnet_code_quality_unused_parameters = non_public
# IDE0061 Use block body for local functions
dotnet_diagnostic.IDE0061.severity = none
# IDE0066 Use switch expression
dotnet_diagnostic.IDE0066.severity = none
# IDE0072 Populate switch
dotnet_diagnostic.IDE0072.severity = none
# IDE0074 Use coalesce compound assignment
dotnet_diagnostic.IDE0074.severity = none
# IDE0078 Use pattern mathcing
dotnet_diagnostic.IDE0078.severity = none
# IDE0083 Use pattern mathcing
dotnet_diagnostic.IDE0083.severity = none
# IDE0130 Namespace {0} does not match folder structure, expected "{1}" based on directory structure
dotnet_diagnostic.IDE0130.severity = none
# IDE0220 'foreach' statement implicitly converts 'object' to '{1}'. Add an explicit cast to make intent clearer, as it may fail at runtime
dotnet_diagnostic.IDE0220.severity = none
dotnet_diagnostic.IDE0251.severity = none
# IDE0270 Null check can be simplified
dotnet_diagnostic.IDE0270.severity = none
# JSON002 Enable json support
dotnet_diagnostic.JSON002.severity = none
# IDE0200 Lambda expressions
dotnet_diagnostic.IDE0200.severity = silent
# CA1311 Specify culture
dotnet_diagnostic.CA1311.severity = silent
# Naming convention - Private and internal fields should start with _ and be camelCased
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private
dotnet_naming_style.require_underscore_prefix_and_camel_case.required_prefix = _
dotnet_naming_style.require_underscore_prefix_and_camel_case.capitalization = camel_case
dotnet_naming_rule.private_internal_fields.symbols = private_internal_fields
dotnet_naming_rule.private_internal_fields.style = require_underscore_prefix_and_camel_case
dotnet_naming_rule.private_internal_fields.severity = warning
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const
dotnet_naming_style.const_pascal_case.capitalization = pascal_case
dotnet_naming_rule.constant_fields.symbols = constant_fields
dotnet_naming_rule.constant_fields.style = const_pascal_case
dotnet_naming_rule.constant_fields.severity = warning
#Formatting - new line options
#place catch statements on a new line
csharp_new_line_before_catch = true
#require members of anonymous types to be on the same line
csharp_new_line_before_members_in_anonymous_types = false
#require members of object intializers to be on separate lines
csharp_new_line_before_members_in_object_initializers = false
#require braces to be on a new line, also known as "Allman" style
csharp_new_line_before_open_brace = all
#Formatting - organize using options
#sort System.* using directives alphabetically, and place them before other usings
dotnet_sort_system_directives_first = true
#Formatting - spacing options
#require NO space between a cast and the value
csharp_space_after_cast = false
#require a space before the colon for bases or interfaces in a type declaration
csharp_space_after_colon_in_inheritance_clause = true
#require a space after a keyword in a control flow statement such as a for loop
csharp_space_after_keywords_in_control_flow_statements = true
#require a space before the colon for bases or interfaces in a type declaration
csharp_space_before_colon_in_inheritance_clause = true
#remove space within empty argument list parentheses
csharp_space_between_method_call_empty_parameter_list_parentheses = false
#remove space between method call name and opening parenthesis
csharp_space_between_method_call_name_and_opening_parenthesis = false
#do not place space characters after the opening parenthesis and before the closing parenthesis of a method call
csharp_space_between_method_call_parameter_list_parentheses = false
#remove space within empty parameter list parentheses for a method declaration
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
#place a space character after the opening parenthesis and before the closing parenthesis of a method declaration parameter list.
csharp_space_between_method_declaration_parameter_list_parentheses = false
#Formatting - wrapping options
#leave code block on single line
csharp_preserve_single_line_blocks = true
#Style - Modifier preferences
#when this rule is set to a list of modifiers, prefer the specified ordering.
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
# ReSharper properties
resharper_csharp_wrap_after_declaration_lpar = true
resharper_csharp_wrap_parameters_style = chop_if_long
# Threading
dotnet_diagnostic.VSTHDR003.severity = none
[*Test{s.cs,.cs,sBase.cs,Base.cs}]
dotnet_diagnostic.VSTHRD200.severity = none
dotnet_diagnostic.CA1707.severity = none
[*Controller.cs]
dotnet_diagnostic.VSTHRD200.severity = none