@@ -41,7 +41,7 @@ csharp_indent_labels = flush_left
4141
4242# Modifier preferences
4343csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion
44- dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
44+ dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
4545
4646# this. preferences
4747dotnet_style_qualification_for_field = true :suggestion
@@ -53,8 +53,8 @@ dotnet_style_qualification_for_event = true:suggestion
5353csharp_style_var_for_built_in_types = true :silent
5454csharp_style_var_when_type_is_apparent = true :silent
5555csharp_style_var_elsewhere = true :silent
56- dotnet_style_predefined_type_for_locals_parameters_members = true :silent
57- dotnet_style_predefined_type_for_member_access = true :silent
56+ dotnet_style_predefined_type_for_locals_parameters_members = true :suggestion
57+ dotnet_style_predefined_type_for_member_access = true :suggestion
5858
5959# name all constant fields using PascalCase
6060dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
@@ -75,28 +75,31 @@ dotnet_style_readonly_field = true:suggestion
7575csharp_style_implicit_object_creation_when_type_is_apparent = true :suggestion
7676dotnet_style_prefer_simplified_interpolation = true :suggestion
7777dotnet_style_object_initializer = true :suggestion
78+ csharp_style_prefer_primary_constructors = false :none
7879
7980# Expression-level preferences
8081dotnet_style_object_initializer = true :suggestion
8182dotnet_style_collection_initializer = true :suggestion
8283dotnet_style_explicit_tuple_names = true :suggestion
8384dotnet_style_coalesce_expression = true :suggestion
8485dotnet_style_null_propagation = true :suggestion
85- dotnet_style_prefer_is_null_check_over_reference_equality_method = true :silent
86+ dotnet_style_prefer_is_null_check_over_reference_equality_method = true :suggestion
8687dotnet_style_prefer_inferred_tuple_names = true :suggestion
8788dotnet_style_prefer_inferred_anonymous_type_member_names = true :suggestion
88- dotnet_style_prefer_auto_properties = true :silent
89- dotnet_style_prefer_conditional_expression_over_assignment = true :silent
90- dotnet_style_prefer_conditional_expression_over_return = true :silent
89+ dotnet_style_prefer_auto_properties = true :suggestion
90+ dotnet_style_prefer_conditional_expression_over_assignment = true :suggestion
91+ dotnet_style_prefer_conditional_expression_over_return = true :suggestion
9192csharp_prefer_simple_default_expression = true :suggestion
93+ csharp_style_unused_value_expression_statement_preference = discard_variable:none
9294
9395# Expression-bodied members
94- csharp_style_expression_bodied_methods = false :silent
95- csharp_style_expression_bodied_constructors = false :silent
96- csharp_style_expression_bodied_operators = false :silent
97- csharp_style_expression_bodied_properties = true :silent
98- csharp_style_expression_bodied_indexers = true :silent
99- csharp_style_expression_bodied_accessors = true :silent
96+ csharp_style_expression_bodied_methods = true :suggestion
97+ dotnet_diagnostic.IDE0022.severity = suggestion # dotnet format doesn't respect the suggestion in the line above
98+ csharp_style_expression_bodied_constructors = false :warning
99+ csharp_style_expression_bodied_operators = true :suggestion
100+ csharp_style_expression_bodied_properties = true :suggestion
101+ csharp_style_expression_bodied_indexers = true :suggestion
102+ csharp_style_expression_bodied_accessors = true :suggestion
100103
101104# Pattern matching
102105csharp_style_pattern_matching_over_is_with_cast_check = true :suggestion
@@ -113,6 +116,7 @@ csharp_style_prefer_range_operator = false:none
113116csharp_style_pattern_local_over_anonymous_function = true :suggestion
114117csharp_style_deconstructed_variable_declaration = true :suggestion
115118csharp_style_namespace_declarations = file_scoped:warning
119+ dotnet_style_namespace_match_folder = false :none
116120
117121# Space preferences
118122csharp_space_after_cast = false
@@ -128,10 +132,10 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false
128132csharp_space_between_parentheses = false
129133
130134# Parentheses preferences
131- dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
132- dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
133- dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
134- dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
135+ dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
136+ dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
137+ dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
138+ dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
135139
136140# Code analyzers
137141# CA1031: Do not catch general exception types
0 commit comments