From dbb975a5189a990dda708606b40be9c1bf47bcc5 Mon Sep 17 00:00:00 2001 From: Piotr Zajac Date: Thu, 11 Apr 2024 11:29:53 +0200 Subject: [PATCH] Update code style rules --- src/.editorconfig | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/.editorconfig b/src/.editorconfig index da905566..ae65a5ac 100644 --- a/src/.editorconfig +++ b/src/.editorconfig @@ -1345,6 +1345,60 @@ dotnet_diagnostic.IDE0190.severity = warning # IDE0200: Remove unnecessary lambda expression dotnet_diagnostic.IDE0200.severity = warning +# IDE0210: Convert to top-level statements +dotnet_diagnostic.IDE0210.severity = warning + +# IDE0211: Convert to 'Program.Main' style program +dotnet_diagnostic.IDE0211.severity = none + +# IDE0220: Add explicit cast in foreach loop +dotnet_diagnostic.IDE0220.severity = warning + +# IDE0230: Use UTF-8 string literal +dotnet_diagnostic.IDE0230.severity = warning + +# IDE0240: Nullable directive is redundant +dotnet_diagnostic.IDE0240.severity = warning + +# IDE0241: Nullable directive is unnecessary +dotnet_diagnostic.IDE0241.severity = warning + +# IDE0250: Struct can be made 'readonly' +dotnet_diagnostic.IDE0250.severity = warning + +# IDE0251: Member can be made 'readonly' +dotnet_diagnostic.IDE0251.severity = warning + +# IDE0260: Use pattern matching +dotnet_diagnostic.IDE0260.severity = warning + +# IDE0270: Null check can be simplified +dotnet_diagnostic.IDE0270.severity = warning + +# IDE0280: Use 'nameof' +dotnet_diagnostic.IDE0280.severity = warning + +# IDE0290: Use primary constructor +dotnet_diagnostic.IDE0290.severity = none + +# IDE0300: Use collection expression for array +dotnet_diagnostic.IDE0300.severity = suggestion + +# IDE0301: Use collection expression for empty +dotnet_diagnostic.IDE0301.severity = suggestion + +# IDE0302: Use collection expression for stackalloc +dotnet_diagnostic.IDE0302.severity = suggestion + +# IDE0303: Use collection expression for Create() +dotnet_diagnostic.IDE0303.severity = suggestion + +# IDE0304: Use collection expression for builder +dotnet_diagnostic.IDE0304.severity = suggestion + +# IDE0305: Use collection expression for fluent +dotnet_diagnostic.IDE0305.severity = suggestion + # IDE1005: Use conditional delegate call dotnet_diagnostic.IDE1005.severity = warning