@@ -19,14 +19,14 @@ tab_width = 4
1919
2020# New line preferences
2121end_of_line = crlf
22- insert_final_newline = false
22+ insert_final_newline = true
2323
2424# ### .NET Coding Conventions ####
2525[* .{cs,vb} ]
2626
2727# Organize usings
28- dotnet_separate_import_directive_groups = true
29- dotnet_sort_system_directives_first = true
28+ dotnet_separate_import_directive_groups = false
29+ dotnet_sort_system_directives_first = false
3030file_header_template = unset
3131
3232# this. and Me. preferences
@@ -46,7 +46,7 @@ dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
4646dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
4747
4848# Modifier preferences
49- dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
49+ dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
5050
5151# Expression-level preferences
5252dotnet_style_coalesce_expression = true :suggestion
@@ -78,9 +78,9 @@ dotnet_remove_unnecessary_suppression_exclusions = none
7878[* .cs ]
7979
8080# var preferences
81- csharp_style_var_elsewhere = false :silent
82- csharp_style_var_for_built_in_types = false :silent
83- csharp_style_var_when_type_is_apparent = false :silent
81+ csharp_style_var_elsewhere = true :silent
82+ csharp_style_var_for_built_in_types = true :silent
83+ csharp_style_var_when_type_is_apparent = true :silent
8484
8585# Expression-bodied members
8686csharp_style_expression_bodied_accessors = true :silent
@@ -96,7 +96,7 @@ csharp_style_expression_bodied_properties = true:silent
9696csharp_style_pattern_matching_over_as_with_null_check = true :suggestion
9797csharp_style_pattern_matching_over_is_with_cast_check = true :suggestion
9898csharp_style_prefer_not_pattern = true :suggestion
99- csharp_style_prefer_pattern_matching = true :silent
99+ csharp_style_prefer_pattern_matching = true :suggestion
100100csharp_style_prefer_switch_expression = true :suggestion
101101
102102# Null-checking preferences
@@ -108,7 +108,7 @@ csharp_preferred_modifier_order = public,private,protected,internal,static,exter
108108
109109# Code-block preferences
110110csharp_prefer_braces = true :silent
111- csharp_prefer_simple_using_statement = true :suggestion
111+ csharp_prefer_simple_using_statement = true :warning
112112
113113# Expression-level preferences
114114csharp_prefer_simple_default_expression = true :suggestion
@@ -124,6 +124,9 @@ csharp_style_unused_value_expression_statement_preference = discard_variable:sil
124124# 'using' directive preferences
125125csharp_using_directive_placement = outside_namespace:silent
126126
127+ csharp_style_prefer_primary_constructors = true :suggestion
128+ csharp_style_expression_bodied_methods = true :suggestion
129+
127130# ### C# Formatting Rules ####
128131
129132# New line preferences
@@ -169,7 +172,7 @@ csharp_space_between_square_brackets = false
169172
170173# Wrapping preferences
171174csharp_preserve_single_line_blocks = true
172- csharp_preserve_single_line_statements = true
175+ csharp_preserve_single_line_statements = false
173176
174177# ### Naming styles ####
175178[* .{cs,vb} ]
@@ -362,3 +365,10 @@ dotnet_naming_style.s_camelcase.required_suffix =
362365dotnet_naming_style.s_camelcase.word_separator =
363366dotnet_naming_style.s_camelcase.capitalization = camel_case
364367
368+ # More rules
369+ dotnet_diagnostic.IDE0005.severity = error
370+ dotnet_diagnostic.IDE0035.severity = error
371+ dotnet_style_prefer_collection_expression = true
372+
373+ [* .cs ]
374+ csharp_style_namespace_declarations = file_scoped:error
0 commit comments