-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.editorconfig
232 lines (172 loc) · 12.1 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
# Rules in this file were initially inferred by Visual Studio IntelliCode from the C:\Users\Pawe� Gaw�da\source\repos\2020\PrismApp\CalcPC_PrismCoreApp_Solution codebase based on best match to current usage at 25.08.2020
# 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
[**.{xaml,xml}]
indent_style = space
indent_size = 4
charset = utf-8-bom
insert_final_newline = true
trim_trailing_whitespace = false
end_of_line = crlf
[*.cs]
#Core editorconfig formatting - indentation
#use soft tabs (spaces) for indentation
indent_style = space
#Formatting - new line options
#require braces to be on a new line for methods and types (also known as "Allman" style)
csharp_new_line_before_open_brace = methods, properties, control_blocks, types
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
#Formatting - organize using options
#do not place System.* using directives before other using directives
dotnet_sort_system_directives_first = true
#Formatting - spacing options
# Space preferences
csharp_space_after_cast = false
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = 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 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 separate lines
csharp_preserve_single_line_blocks = true
#Style - expression bodied member options
#prefer block bodies for accessors
csharp_style_expression_bodied_accessors = true : warning
#prefer block bodies for constructors
csharp_style_expression_bodied_constructors = false : suggestion
#prefer block bodies for methods
csharp_style_expression_bodied_methods = true : warning
#prefer block bodies for properties
csharp_style_expression_bodied_properties = true : warning
# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_indexers = true : warning
# Suggest more modern language features when available
csharp_style_pattern_matching_over_is_with_cast_check = true : warning
csharp_style_pattern_matching_over_as_with_null_check = true : warning
csharp_style_inlined_variable_declaration = true : warning
# Null checking preferences
csharp_style_throw_expression = true : warning
csharp_style_conditional_delegate_call = true : warning
#Style - implicit and explicit types
# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true : warning
#prefer var over explicit type in all cases, unless overridden by another code style rule
csharp_style_var_elsewhere = true : warning
#prefer var when the type is already mentioned on the right-hand side of a declaration expression
csharp_style_var_when_type_is_apparent = true : warning
#Style - language keyword and framework type options
#prefer the language keyword for local variables, method parameters, and class members, instead of the type name, for types that have a keyword to represent them
dotnet_style_predefined_type_for_locals_parameters_members = true : warning
dotnet_style_predefined_type_for_member_access = true : warning
#Style - modifier options
#prefer accessibility modifiers to be declared except for public interface members. This will currently not differ from always and will act as future proofing for if C# adds default interface methods.
dotnet_style_require_accessibility_modifiers = for_non_interface_members : warning
#Style - Modifier preferences
#when this rule is set to a list of modifiers, prefer the specified ordering.
csharp_preferred_modifier_order = public,protected,private,virtual,override,static,abstract,readonly : warning
#Style - qualification options
#prefer fields not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_field = false : warning
#prefer properties not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_property = false : warning
dotnet_style_qualification_for_method = false : warning
dotnet_style_qualification_for_event = false : warning
# Suggest more modern language features when available
dotnet_style_object_initializer = true : warning
dotnet_style_collection_initializer = true : warning
dotnet_style_explicit_tuple_names = true : warning
dotnet_style_coalesce_expression = true : warning
dotnet_style_null_propagation = true : warning
# Naming Convention
# name all constant fields using PascalCase
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# internal and private fields should be _camelCase
dotnet_naming_rule.camel_case_for_private_fields.severity = warning
dotnet_naming_rule.camel_case_for_private_fields.symbols = private_fields
dotnet_naming_rule.camel_case_for_private_fields.style = camel_case_underscore_style
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
# Example: public members must be capitalized
dotnet_naming_rule.public_members_must_be_capitalized.severity = warning
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_symbols.public_symbols.applicable_kinds = property,method,field,event,delegate
dotnet_naming_symbols.public_symbols.applicable_accessibilities = public,internal,protected
dotnet_naming_style.first_word_upper_case_style.capitalization = first_word_upper
# Example: Name interface should have I prefix
dotnet_naming_rule.name_interface_should_have_prefix.severity = warning
dotnet_naming_rule.name_interface_should_have_prefix.symbols = name_interface
dotnet_naming_rule.name_interface_should_have_prefix.style = name_interface_style
dotnet_naming_symbols.name_interface.applicable_kinds = interface
dotnet_naming_style.name_interface_style.capitalization = first_word_upper
dotnet_naming_style.name_interface_style.required_prefix = I
# RCS1159: Use EventHandler<T>.
dotnet_diagnostic.RCS1159.severity = none
# RCS1079: Throwing of new NotImplementedException.
dotnet_diagnostic.RCS1079.severity = none
# RCS1202: Avoid NullReferenceException.
dotnet_diagnostic.RCS1202.severity = none
# RCS1158: Static member in generic type should use a type parameter.
dotnet_diagnostic.RCS1158.severity = none
# RCS1163: Unused parameter.
dotnet_diagnostic.RCS1163.severity = none
# CS8618: Non-nullable field is uninitialized. Consider declaring as nullable.
dotnet_diagnostic.CS8618.severity = none
# CS8632
dotnet_diagnostic.CS8632.severity = none
# CS8602
dotnet_diagnostic.CS8602.severity = none
# CS8603
dotnet_diagnostic.CS8603.severity = none
# CS8769
dotnet_diagnostic.CS8769.severity = none
# CS8622
dotnet_diagnostic.CS8622.severity = none
# CS8625
dotnet_diagnostic.CS8625.severity = none
# CS8612
dotnet_diagnostic.CS8612.severity = none
# CS8615
dotnet_diagnostic.CS8615.severity = none
# CS8619
dotnet_diagnostic.CS8619.severity = none
# CS8620
dotnet_diagnostic.CS8620.severity = none
# CS8604
dotnet_diagnostic.CS8604.severity = none