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

Remove CA2211 NoWarn #2316

Merged
merged 1 commit into from
Sep 28, 2024
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 src/Polly/Polly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ProjectType>Library</ProjectType>
<MutationScore>70</MutationScore>
<IncludePollyUsings>true</IncludePollyUsings>
<NoWarn>$(NoWarn);CA1010;CA1031;CA1051;CA1063;CA1064;CA1724;CA1816;CA2211</NoWarn>
<NoWarn>$(NoWarn);CA1010;CA1031;CA1051;CA1063;CA1064;CA1724;CA1816;</NoWarn>
<NoWarn>$(NoWarn);S2223;S3215;S4039</NoWarn>
<!--Public API Analyzers: We do not need to fix these as it would break compatibility with released Polly versions-->
<NoWarn>$(NoWarn);RS0037;</NoWarn>
Expand Down
2 changes: 2 additions & 0 deletions src/Polly/Utilities/SystemClock.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#nullable enable
namespace Polly.Utilities;

#pragma warning disable CA2211 // Non-constant fields should not be visible

/// <summary>
/// Time related delegates used to support different compilation targets and to improve testability of the code.
/// </summary>
Expand Down
2 changes: 2 additions & 0 deletions src/Polly/Utilities/TaskHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ namespace Polly.Utilities;
/// </summary>
public static class TaskHelper
{
#pragma warning disable CA2211 // Non-constant fields should not be visible
/// <summary>
/// Defines a completed Task for use as a completed, empty asynchronous delegate.
/// </summary>
public static Task EmptyTask = Task.CompletedTask;
#pragma warning restore
}