Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Analyzer crashes a warning #90358

Merged
merged 3 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/CodeAnalysis.src.globalconfig
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
<!-- Override InformationalVersion during servicing as it's returned via public api. -->
<InformationalVersion Condition="'$(PreReleaseVersionLabel)' == 'servicing'">$(ProductVersion)</InformationalVersion>
<InformationalVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion)</InformationalVersion>
<NoWarn>$(NoWarn),0419,0649,CA2249,CA1830</NoWarn>
<!-- AD0001 : https://github.com/dotnet/runtime/issues/90356 -->
<NoWarn>$(NoWarn),0419,0649,CA2249,CA1830;AD0001</NoWarn>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered it but the generator was referenced in each project and it made more sense to put this in the same spot the generator was referenced.

<Nullable>enable</Nullable>

<!-- Ignore all previous constants since SPCL is sensitive to what is defined and the Sdk adds some by default -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<!-- AD0001 : https://github.com/dotnet/runtime/issues/90356 -->
<NoWarn>$(NoWarn);AD0001</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
<EnableDefaultItems>true</EnableDefaultItems>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- AD0001 : https://github.com/dotnet/runtime/issues/90357 -->
<NoWarn>$(NoWarn);AD0001</NoWarn>
<IsPackable>true</IsPackable>
<PackageDescription>Logging abstractions for Microsoft.Extensions.Logging.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
<!-- Override InformationalVersion during servicing as it's returned via public api. -->
<InformationalVersion Condition="'$(PreReleaseVersionLabel)' == 'servicing'">$(ProductVersion)</InformationalVersion>
<InformationalVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion)</InformationalVersion>
<NoWarn>$(NoWarn),0419,0649</NoWarn>
<!-- AD0001 : https://github.com/dotnet/runtime/issues/90356 -->
<NoWarn>$(NoWarn),0419,0649,AD0001</NoWarn>
<Nullable>enable</Nullable>

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