From 6b60ee2967d9bf97f3a5acd117d92f4da6485b43 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Thu, 10 Aug 2023 16:55:03 -0700 Subject: [PATCH 1/3] Make Analyzer crashes a warning --- eng/CodeAnalysis.src.globalconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/CodeAnalysis.src.globalconfig b/eng/CodeAnalysis.src.globalconfig index 896ae294548ab..aee934588b9a2 100644 --- a/eng/CodeAnalysis.src.globalconfig +++ b/eng/CodeAnalysis.src.globalconfig @@ -1,7 +1,7 @@ is_global = true # AD0001: Analyzer threw an exception -dotnet_diagnostic.AD0001.severity = suggestion +dotnet_diagnostic.AD0001.severity = warning # BCL0001: Ensure minimum API surface is respected dotnet_diagnostic.BCL0001.severity = warning From 825c27cf5bc612543ae93c632bedbaa944598f82 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Thu, 10 Aug 2023 18:48:00 -0700 Subject: [PATCH 2/3] Suppress AD0001 where it fails --- .../System.Private.CoreLib/System.Private.CoreLib.csproj | 3 ++- .../src/Microsoft.Extensions.Logging.Abstractions.csproj | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj index f99a2842e7fca..14936ccfa6479 100644 --- a/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj +++ b/src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj @@ -46,7 +46,8 @@ $(ProductVersion) $(ProductVersion) - $(NoWarn),0419,0649,CA2249,CA1830 + + $(NoWarn),0419,0649,CA2249,CA1830;AD0001 enable diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj index 085cade3966b9..db0c78fb49df0 100644 --- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj +++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj @@ -4,6 +4,8 @@ $(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum) true true + + $(NoWarn);AD0001 true Logging abstractions for Microsoft.Extensions.Logging. From 3f3d759f7a34ddf943e92172e64550ca9dbd6b98 Mon Sep 17 00:00:00 2001 From: Eric StJohn Date: Thu, 10 Aug 2023 20:51:10 -0700 Subject: [PATCH 3/3] Suppress AD0001 in other CoreLibs --- .../System.Private.CoreLib/src/System.Private.CoreLib.csproj | 2 ++ src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj b/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj index 13cd0a531e3a2..75b5554a5c1ae 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj @@ -1,6 +1,8 @@ true + + $(NoWarn);AD0001 diff --git a/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj index a8612905085a6..229ae79f7f8cc 100644 --- a/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj +++ b/src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj @@ -33,7 +33,8 @@ $(ProductVersion) $(ProductVersion) - $(NoWarn),0419,0649 + + $(NoWarn),0419,0649,AD0001 enable