Skip to content

Commit 4e87a51

Browse files
committed
Update editor config file
1 parent 35c8a70 commit 4e87a51

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.editorconfig

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ trim_trailing_whitespace = true
3838
# Generated code
3939
[*{_AssemblyInfo.cs,.notsupported.cs,AsmOffsets.cs}]
4040
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
4148

4249
# C# files
4350
[*.cs]
@@ -77,15 +84,15 @@ dotnet_style_predefined_type_for_member_access = true:suggestion
7784
# name all constant fields using PascalCase
7885
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
7986
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
8188
dotnet_naming_symbols.constant_fields.applicable_kinds = field
8289
dotnet_naming_symbols.constant_fields.required_modifiers = const
8390
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
8491

8592
# static fields should have s_ prefix
8693
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
8794
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
8996
dotnet_naming_symbols.static_fields.applicable_kinds = field
9097
dotnet_naming_symbols.static_fields.required_modifiers = static
9198
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
@@ -95,7 +102,7 @@ dotnet_naming_style.static_prefix_style.capitalization = camel_case
95102
# internal and private fields should be _camelCase
96103
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
97104
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
99106
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
100107
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
101108
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
@@ -177,6 +184,10 @@ csharp_space_between_square_brackets = false
177184

178185
# License header
179186
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
180191

181192
# C++ Files
182193
[*.{cpp,h,in}]
@@ -210,4 +221,4 @@ indent_size = 2
210221
[*.sh]
211222
end_of_line = lf
212223
[*.{cmd,bat}]
213-
end_of_line = crlf
224+
end_of_line = crlf

0 commit comments

Comments
 (0)