@@ -10,9 +10,11 @@ indent_style = space
10
10
11
11
# Code files
12
12
[* .{cs,csx,vb,vbx} ]
13
+ file_header_template = " Copyright (c) Jacob Viau. All rights reserved.\n Licensed under the Apache License 2.0. See LICENSE file in the project root for full license information."
13
14
indent_size = 4
14
15
insert_final_newline = true
15
16
charset = utf-8-bom
17
+ trim_trailing_whitespace = true
16
18
17
19
[* .xaml ]
18
20
indent_size = 4
@@ -123,6 +125,9 @@ dotnet_naming_style.pascal_case_and_prefix_with_I_style.capitalization
123
125
# CSharp code style settings:
124
126
[* .cs ]
125
127
128
+ # Modifier preferences
129
+ csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:warning
130
+
126
131
# Prefer "var" only when the type is apparent
127
132
csharp_style_var_for_built_in_types = false :suggestion
128
133
csharp_style_var_when_type_is_apparent = true :suggestion
@@ -157,6 +162,9 @@ dotnet_style_prefer_conditional_expression_over_return = false
157
162
dotnet_style_prefer_conditional_expression_over_assignment = false
158
163
dotnet_style_prefer_auto_properties = false
159
164
165
+ # 'using' directive preferences
166
+ csharp_using_directive_placement = outside_namespace:warning
167
+
160
168
# Newline settings
161
169
csharp_new_line_before_open_brace = all
162
170
csharp_new_line_before_else = true
@@ -170,7 +178,7 @@ csharp_new_line_between_query_expression_clauses = true
170
178
csharp_indent_case_contents = true
171
179
csharp_indent_case_contents_when_block = false
172
180
csharp_indent_switch_labels = true
173
- csharp_indent_labels = no_change
181
+ csharp_indent_labels = one_less_than_current
174
182
csharp_indent_block_contents = true
175
183
csharp_indent_braces = false
176
184
@@ -242,15 +250,6 @@ dotnet_diagnostic.CA2007.severity = none # Consider calling ConfigureAwait on th
242
250
dotnet_diagnostic.CA2326.severity = none # Do not use TypeNameHandling values other than None
243
251
dotnet_diagnostic.CA2327.severity = none # Do not use insecure JsonSerializerSettings
244
252
245
- # StyleCop rules
246
- dotnet_diagnostic.SA1101.severity = none # Prefix local calls with this
247
- dotnet_diagnostic.SA1308.severity = none # Variable names should not be prefixed
248
- dotnet_diagnostic.SA1309.severity = none # Field names should not begin with underscore
249
- dotnet_diagnostic.SA1311.severity = none # Static readonly fields should begin with upper-case letter
250
- dotnet_diagnostic.SX1101.severity = error # Do not prefix local calls with ' this.'
251
- dotnet_diagnostic.SX1309.severity = error # Field names should begin with underscore
252
- dotnet_diagnostic.SX1309S.severity = none # Static field names should begin with underscore
253
-
254
253
[** /* Tests/** /* .cs ]
255
254
# We allow usage of "var" inside tests as it reduces churn as we remove/rename types
256
255
csharp_style_var_for_built_in_types = true :none
0 commit comments