@@ -39,7 +39,7 @@ dotnet_style_parentheses_in_other_operators = never_if_unnecessary
3939dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
4040
4141# Modifier preferences
42- dotnet_style_require_accessibility_modifiers = for_non_interface_members
42+ dotnet_style_require_accessibility_modifiers = never
4343
4444# Expression-level preferences
4545dotnet_style_coalesce_expression = true
@@ -76,17 +76,17 @@ dotnet_style_allow_statement_immediately_after_block_experimental = true
7676# ### C# Coding Conventions ####
7777
7878# var preferences
79- csharp_style_var_elsewhere = false
80- csharp_style_var_for_built_in_types = false
81- csharp_style_var_when_type_is_apparent = false
79+ csharp_style_var_elsewhere = true
80+ csharp_style_var_for_built_in_types = true
81+ csharp_style_var_when_type_is_apparent = true
8282
8383# Expression-bodied members
8484csharp_style_expression_bodied_accessors = true
8585csharp_style_expression_bodied_constructors = false
8686csharp_style_expression_bodied_indexers = true
8787csharp_style_expression_bodied_lambdas = true
8888csharp_style_expression_bodied_local_functions = false
89- csharp_style_expression_bodied_methods = false
89+ csharp_style_expression_bodied_methods = when_on_single_line
9090csharp_style_expression_bodied_operators = false
9191csharp_style_expression_bodied_properties = true
9292
@@ -108,7 +108,7 @@ csharp_preferred_modifier_order = public,private,protected,internal,static,exter
108108# Code-block preferences
109109csharp_prefer_braces = true
110110csharp_prefer_simple_using_statement = true
111- csharp_style_namespace_declarations = block_scoped
111+ csharp_style_namespace_declarations = file_scoped
112112csharp_style_prefer_method_group_conversion = true
113113csharp_style_prefer_top_level_statements = true
114114
@@ -223,3 +223,44 @@ dotnet_naming_style.begins_with_i.required_prefix = I
223223dotnet_naming_style.begins_with_i.required_suffix =
224224dotnet_naming_style.begins_with_i.word_separator =
225225dotnet_naming_style.begins_with_i.capitalization = pascal_case
226+
227+ # Do not catch general exception types
228+ dotnet_diagnostic.CA1031.severity = none
229+ # URI parameters should not be strings
230+ dotnet_diagnostic.CA1054.severity = none
231+ # URI properties should not be strings
232+ dotnet_diagnostic.CA1056.severity = none
233+ # Do not pass literals as localized parameters
234+ dotnet_diagnostic.CA1303.severity = none
235+ # Normalize strings to uppercase
236+ dotnet_diagnostic.CA1308.severity = none
237+ # Avoid uninstantiated internal classes
238+ dotnet_diagnostic.CA1812.severity = none
239+ # Use the LoggerMessage delegates
240+ dotnet_diagnostic.CA1848.severity = none
241+ # Possible multiple enumerations of IEnumerable collection
242+ dotnet_diagnostic.CA1851.severity = none
243+ # Do not directly await a Task
244+ dotnet_diagnostic.CA2007.severity = none
245+ # Pass System.Uri objects instead of strings
246+ dotnet_diagnostic.CA2234.severity = none
247+ # Do not use insecure randomness
248+ dotnet_diagnostic.CA5394.severity = none
249+ # IDE0005: Using directive is unnecessary
250+ dotnet_diagnostic.IDE0005.severity = warning
251+ # Use expression body for methods
252+ dotnet_diagnostic.IDE0022.severity = none
253+ # Use conditional expression for assignment
254+ dotnet_diagnostic.IDE0045.severity = none
255+ # Use conditional expression for return
256+ dotnet_diagnostic.IDE0046.severity = none
257+ # Use GeneratedRegexAttribute to generate the regular expression implementation at compile time.
258+ dotnet_diagnostic.SYSLIB1045.severity = none
259+ # Implement internal logic asynchronously
260+ dotnet_diagnostic.VSTHRD102.severity = none
261+ # Offer async option
262+ dotnet_diagnostic.VSTHRD104.severity = none
263+ # Add .ConfigureAwait(bool) to your await expression
264+ dotnet_diagnostic.VSTHRD111.severity = none
265+
266+ dotnet_analyzer_diagnostic.severity = warning
0 commit comments