From b3248cf3e7359ecb354a025f615a68927f7dcbf2 Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Sun, 15 Nov 2020 05:12:52 +0000 Subject: [PATCH 1/2] Enable CA1000: Do not declare static members on generic types https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/CA1000 --- .globalconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.globalconfig b/.globalconfig index c22cb5a96c8..acd74df0e19 100644 --- a/.globalconfig +++ b/.globalconfig @@ -1,7 +1,7 @@ is_global = true # CA1000: Do not declare static members on generic types -dotnet_diagnostic.CA1000.severity = silent +dotnet_diagnostic.CA1000.severity = warning # CA1001: Types that own disposable fields should be disposable dotnet_diagnostic.CA1001.severity = silent From 4e28528cdcc85ae45e16579133a3288d3c883760 Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Wed, 18 Nov 2020 08:47:54 +0000 Subject: [PATCH 2/2] Configure analyzer to look at all types --- .globalconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/.globalconfig b/.globalconfig index acd74df0e19..47ad6b70bc4 100644 --- a/.globalconfig +++ b/.globalconfig @@ -2,6 +2,7 @@ is_global = true # CA1000: Do not declare static members on generic types dotnet_diagnostic.CA1000.severity = warning +dotnet_code_quality.ca1000.api_surface = all # CA1001: Types that own disposable fields should be disposable dotnet_diagnostic.CA1001.severity = silent