@@ -10,6 +10,9 @@ trim_trailing_whitespace = true
1010[* .{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj} ]
1111indent_size  = 2 
1212
13+ [* .Build.{props,targets} ]
14+ indent_size  = 2 
15+ 
1316[* .{sln} ]
1417indent_style  = tab 
1518
@@ -23,28 +26,33 @@ indent_size = 4
2326max_line_length  = 100 
2427
2528[* .cs ]
29+ dotnet_analyzer_diagnostic.category-Style.severity  = warning 
30+ 
31+ #  IDE0022: Use expression/block body for methods
32+ dotnet_diagnostic.IDE0022.severity  = suggestion 
33+ 
2634#  Prefer "var" everywhere
27- csharp_style_var_for_built_in_types  = true : suggestion 
28- csharp_style_var_when_type_is_apparent  = true : suggestion 
29- csharp_style_var_elsewhere  = true : suggestion 
35+ csharp_style_var_for_built_in_types  = true 
36+ csharp_style_var_when_type_is_apparent  = true 
37+ csharp_style_var_elsewhere  = true 
3038
3139#  Prefer method-like constructs to have a block body
32- csharp_style_expression_bodied_methods  = false : none 
33- csharp_style_expression_bodied_constructors  = false : none 
34- csharp_style_expression_bodied_operators  = false : none 
40+ csharp_style_expression_bodied_methods  = true 
41+ csharp_style_expression_bodied_constructors  = true 
42+ csharp_style_expression_bodied_operators  = true 
3543
3644#  Prefer property-like constructs to have an expression-body
37- csharp_style_expression_bodied_properties  = true : none 
38- csharp_style_expression_bodied_indexers  = true : none 
39- csharp_style_expression_bodied_accessors  = true : none 
45+ csharp_style_expression_bodied_properties  = true 
46+ csharp_style_expression_bodied_indexers  = true 
47+ csharp_style_expression_bodied_accessors  = true 
4048
4149#  Suggest more modern language features when available
42- csharp_style_pattern_matching_over_is_with_cast_check  = true : suggestion 
43- csharp_style_pattern_matching_over_as_with_null_check  = true : suggestion 
44- csharp_style_inlined_variable_declaration  = true : suggestion 
45- csharp_style_throw_expression  = true : suggestion 
46- csharp_style_conditional_delegate_call  = true : suggestion 
47- csharp_prefer_simple_default_expression  = true : suggestion 
50+ csharp_style_pattern_matching_over_is_with_cast_check  = true 
51+ csharp_style_pattern_matching_over_as_with_null_check  = true 
52+ csharp_style_inlined_variable_declaration  = true 
53+ csharp_style_throw_expression  = true 
54+ csharp_style_conditional_delegate_call  = true 
55+ csharp_prefer_simple_default_expression  = true 
4856
4957#  Spacing
5058csharp_space_after_cast  = false 
@@ -54,3 +62,27 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false
5462#  Wrapping
5563csharp_preserve_single_line_statements  = true 
5664csharp_preserve_single_line_blocks  = true 
65+ 
66+ #  Indentation
67+ csharp_indent_case_contents_when_block  = false 
68+ 
69+ #  Modifier preferences
70+ dotnet_style_require_accessibility_modifiers  = omit_if_default 
71+ 
72+ #  IDE0011: Add braces
73+ csharp_prefer_braces  = when_multiline 
74+ 
75+ #  IDE0061: Use block body for local functions
76+ csharp_style_expression_bodied_local_functions  = true 
77+ 
78+ #  IDE0065: Misplaced using directive
79+ csharp_using_directive_placement  = inside_namespace 
80+ 
81+ #  IDE0048: Add parentheses for clarity
82+ dotnet_diagnostic.IDE0048.severity  = suggestion 
83+ 
84+ #  IDE0055: Fix formatting
85+ dotnet_diagnostic.IDE0055.severity  = suggestion 
86+ 
87+ #  IDE0046: Convert to conditional expression
88+ dotnet_diagnostic.IDE0046.severity  = suggestion 
0 commit comments