@@ -38,6 +38,13 @@ trim_trailing_whitespace = true
38
38
# Generated code
39
39
[* {_AssemblyInfo.cs,.notsupported.cs,AsmOffsets.cs} ]
40
40
generated_code = true
41
+ dotnet_style_coalesce_expression = true :suggestion
42
+ dotnet_style_null_propagation = true :suggestion
43
+ dotnet_style_prefer_is_null_check_over_reference_equality_method = true :suggestion
44
+ dotnet_style_prefer_auto_properties = true :suggestion
45
+ dotnet_style_object_initializer = true :suggestion
46
+ dotnet_style_operator_placement_when_wrapping = beginning_of_line
47
+ tab_width = 4
41
48
42
49
# C# files
43
50
[* .cs ]
@@ -77,15 +84,15 @@ dotnet_style_predefined_type_for_member_access = true:suggestion
77
84
# name all constant fields using PascalCase
78
85
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
79
86
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
80
- dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
87
+ dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
81
88
dotnet_naming_symbols.constant_fields.applicable_kinds = field
82
89
dotnet_naming_symbols.constant_fields.required_modifiers = const
83
90
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
84
91
85
92
# static fields should have s_ prefix
86
93
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
87
94
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
88
- dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
95
+ dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
89
96
dotnet_naming_symbols.static_fields.applicable_kinds = field
90
97
dotnet_naming_symbols.static_fields.required_modifiers = static
91
98
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
@@ -95,7 +102,7 @@ dotnet_naming_style.static_prefix_style.capitalization = camel_case
95
102
# internal and private fields should be _camelCase
96
103
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
97
104
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
98
- dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
105
+ dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
99
106
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
100
107
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
101
108
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
@@ -177,6 +184,10 @@ csharp_space_between_square_brackets = false
177
184
178
185
# License header
179
186
file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.
187
+ csharp_style_namespace_declarations = block_scoped:silent
188
+ csharp_style_prefer_method_group_conversion = true :silent
189
+ csharp_style_prefer_top_level_statements = true :silent
190
+ csharp_style_prefer_primary_constructors = true :suggestion
180
191
181
192
# C++ Files
182
193
[* .{cpp,h,in} ]
@@ -210,4 +221,4 @@ indent_size = 2
210
221
[* .sh ]
211
222
end_of_line = lf
212
223
[* .{cmd,bat} ]
213
- end_of_line = crlf
224
+ end_of_line = crlf
0 commit comments