Skip to content

Commit 7bc9f6b

Browse files
authored
Make Analyzer crashes a warning (#90358)
* Make Analyzer crashes a warning * Suppress AD0001 where it fails * Suppress AD0001 in other CoreLibs
1 parent c6db89c commit 7bc9f6b

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

eng/CodeAnalysis.src.globalconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
is_global = true
22

33
# AD0001: Analyzer threw an exception
4-
dotnet_diagnostic.AD0001.severity = suggestion
4+
dotnet_diagnostic.AD0001.severity = warning
55

66
# BCL0001: Ensure minimum API surface is respected
77
dotnet_diagnostic.BCL0001.severity = warning

src/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
<!-- Override InformationalVersion during servicing as it's returned via public api. -->
4747
<InformationalVersion Condition="'$(PreReleaseVersionLabel)' == 'servicing'">$(ProductVersion)</InformationalVersion>
4848
<InformationalVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion)</InformationalVersion>
49-
<NoWarn>$(NoWarn),0419,0649,CA2249,CA1830</NoWarn>
49+
<!-- AD0001 : https://github.com/dotnet/runtime/issues/90356 -->
50+
<NoWarn>$(NoWarn),0419,0649,CA2249,CA1830;AD0001</NoWarn>
5051
<Nullable>enable</Nullable>
5152

5253
<!-- Ignore all previous constants since SPCL is sensitive to what is defined and the Sdk adds some by default -->

src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
4+
<!-- AD0001 : https://github.com/dotnet/runtime/issues/90356 -->
5+
<NoWarn>$(NoWarn);AD0001</NoWarn>
46
</PropertyGroup>
57

68
<ItemGroup>

src/libraries/Microsoft.Extensions.Logging.Abstractions/src/Microsoft.Extensions.Logging.Abstractions.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
55
<EnableDefaultItems>true</EnableDefaultItems>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
7+
<!-- AD0001 : https://github.com/dotnet/runtime/issues/90357 -->
8+
<NoWarn>$(NoWarn);AD0001</NoWarn>
79
<IsPackable>true</IsPackable>
810
<PackageDescription>Logging abstractions for Microsoft.Extensions.Logging.
911

src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
<!-- Override InformationalVersion during servicing as it's returned via public api. -->
3434
<InformationalVersion Condition="'$(PreReleaseVersionLabel)' == 'servicing'">$(ProductVersion)</InformationalVersion>
3535
<InformationalVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion)</InformationalVersion>
36-
<NoWarn>$(NoWarn),0419,0649</NoWarn>
36+
<!-- AD0001 : https://github.com/dotnet/runtime/issues/90356 -->
37+
<NoWarn>$(NoWarn),0419,0649,AD0001</NoWarn>
3738
<Nullable>enable</Nullable>
3839

3940
<!-- Ignore all previous constants since SPCL is sensitive to what is defined and the Sdk adds some by default -->

0 commit comments

Comments
 (0)