From 6f80211fd234e66c6f305c70fcc1bb314ac42e6e Mon Sep 17 00:00:00 2001 From: Riccardo De Agostini Date: Mon, 13 Sep 2021 11:14:22 +0200 Subject: [PATCH] Update code style configuration in .editorconfig --- .editorconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.editorconfig b/.editorconfig index 3a4fd68..f51c00f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -102,6 +102,7 @@ csharp_style_expression_bodied_properties = true:suggestion csharp_style_pattern_matching_over_as_with_null_check = true:suggestion csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion csharp_style_prefer_switch_expression = true:suggestion +csharp_style_prefer_not_pattern = true:suggestion # Null-checking preferences csharp_style_conditional_delegate_call = true:suggestion @@ -219,8 +220,13 @@ dotnet_naming_style.begins_with_i.capitalization = pascal_case ### Code analysis configuration +# Extension methods: null check may be skipped on "this" parameter dotnet_code_quality.CA1062.exclude_extension_method_this_parameter = true +# Disposables passed to a constructor must be disposed by the constructed object dotnet_code_quality.dispose_ownership_transfer_at_constructor = true +# CA1303: Do not pass literals as localized parameters +dotnet_diagnostic.CA1303.severity = none +dotnet_code_quality.CA1303.use_naming_heuristic = false ### StyleCop configuration for rules not affected by stylecop.json @@ -232,3 +238,5 @@ dotnet_diagnostic.SX1101.severity = warning dotnet_diagnostic.SA1309.severity = none # SX1309: Private instance field names must begin with underscore dotnet_diagnostic.SX1309.severity = warning +# SA1407: Arithmetic expressions must declare precedence +dotnet_diagnostic.SA1407.severity = none