From ff43aec3e07f68008677b4a41c0fb0ecda3bf391 Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Thu, 29 Oct 2020 16:15:53 +0000 Subject: [PATCH 1/2] Enable CA1829: Use Length/Count property instead of Count() when available https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1829 --- .globalconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.globalconfig b/.globalconfig index f283635034e..f1cb983b0bd 100644 --- a/.globalconfig +++ b/.globalconfig @@ -298,7 +298,7 @@ dotnet_diagnostic.CA1827.severity = suggestion dotnet_diagnostic.CA1828.severity = suggestion # CA1829: Use Length/Count property instead of Count() when available -dotnet_diagnostic.CA1829.severity = suggestion +dotnet_diagnostic.CA1829.severity = warning # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder dotnet_diagnostic.CA1830.severity = suggestion From e1dcfd45b616c5e2d8cc21e80e1b3f47fb06e001 Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Thu, 29 Oct 2020 18:28:07 +0000 Subject: [PATCH 2/2] Fix CA1829 --- test/tools/WebListener/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tools/WebListener/Program.cs b/test/tools/WebListener/Program.cs index c13fb54e5de..08055965d81 100644 --- a/test/tools/WebListener/Program.cs +++ b/test/tools/WebListener/Program.cs @@ -21,7 +21,7 @@ public class Program { public static void Main(string[] args) { - if (args.Count() != 7) + if (args.Length != 7) { System.Console.WriteLine("Required: "); Environment.Exit(1);