@@ -52,13 +52,16 @@ dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
52
52
dotnet_style_coalesce_expression = true :suggestion
53
53
dotnet_style_collection_initializer = true :suggestion
54
54
dotnet_style_explicit_tuple_names = true :suggestion
55
+ dotnet_style_namespace_match_folder = true :suggestion
55
56
dotnet_style_null_propagation = true :suggestion
56
57
dotnet_style_object_initializer = true :suggestion
57
58
dotnet_style_operator_placement_when_wrapping = beginning_of_line
58
59
dotnet_style_prefer_auto_properties = true :suggestion
60
+ dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
59
61
dotnet_style_prefer_compound_assignment = true :suggestion
60
62
dotnet_style_prefer_conditional_expression_over_assignment = true :suggestion
61
63
dotnet_style_prefer_conditional_expression_over_return = true :suggestion
64
+ dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed:suggestion
62
65
dotnet_style_prefer_inferred_anonymous_type_member_names = true :suggestion
63
66
dotnet_style_prefer_inferred_tuple_names = true :suggestion
64
67
dotnet_style_prefer_is_null_check_over_reference_equality_method = true :suggestion
@@ -77,9 +80,6 @@ dotnet_remove_unnecessary_suppression_exclusions = none
77
80
# ### C# Coding Conventions ####
78
81
[* .cs ]
79
82
80
- # namespace style
81
- csharp_style_namespace_declarations =file_scoped:suggestion
82
-
83
83
# var preferences
84
84
csharp_style_var_elsewhere = false :silent
85
85
csharp_style_var_for_built_in_types = false :silent
@@ -98,6 +98,7 @@ csharp_style_expression_bodied_properties = true:silent
98
98
# Pattern matching preferences
99
99
csharp_style_pattern_matching_over_as_with_null_check = true :suggestion
100
100
csharp_style_pattern_matching_over_is_with_cast_check = true :suggestion
101
+ csharp_style_prefer_extended_property_pattern = true :suggestion
101
102
csharp_style_prefer_not_pattern = true :suggestion
102
103
csharp_style_prefer_pattern_matching = true :silent
103
104
csharp_style_prefer_switch_expression = true :suggestion
@@ -106,20 +107,31 @@ csharp_style_prefer_switch_expression = true:suggestion
106
107
csharp_style_conditional_delegate_call = true :suggestion
107
108
108
109
# Modifier preferences
110
+ csharp_prefer_static_anonymous_function = true :suggestion
109
111
csharp_prefer_static_local_function = true :warning
110
112
csharp_preferred_modifier_order = public,private,protected,internal,file,const,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion
113
+ csharp_style_prefer_readonly_struct = true :suggestion
114
+ csharp_style_prefer_readonly_struct_member = true :suggestion
111
115
112
116
# Code-block preferences
113
117
csharp_prefer_braces = true :silent
114
118
csharp_prefer_simple_using_statement = true :suggestion
119
+ csharp_style_namespace_declarations = file_scoped:suggestion
120
+ csharp_style_prefer_method_group_conversion = true :silent
121
+ csharp_style_prefer_primary_constructors = true :suggestion
122
+ csharp_style_prefer_top_level_statements = true :silent
115
123
116
124
# Expression-level preferences
117
125
csharp_prefer_simple_default_expression = true :suggestion
118
126
csharp_style_deconstructed_variable_declaration = true :suggestion
127
+ csharp_style_implicit_object_creation_when_type_is_apparent = true :suggestion
119
128
csharp_style_inlined_variable_declaration = true :suggestion
120
- csharp_style_pattern_local_over_anonymous_function = true :suggestion
121
129
csharp_style_prefer_index_operator = true :suggestion
130
+ csharp_style_prefer_local_over_anonymous_function = true :suggestion
131
+ csharp_style_prefer_null_check_over_type_check = true :suggestion
122
132
csharp_style_prefer_range_operator = true :suggestion
133
+ csharp_style_prefer_tuple_swap = true :suggestion
134
+ csharp_style_prefer_utf8_string_literals = true :suggestion
123
135
csharp_style_throw_expression = true :suggestion
124
136
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
125
137
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
0 commit comments