diff --git a/src/Polly/Polly.csproj b/src/Polly/Polly.csproj index 16284081229..98edd3925a1 100644 --- a/src/Polly/Polly.csproj +++ b/src/Polly/Polly.csproj @@ -7,7 +7,7 @@ Library 70 true - $(NoWarn);CA1010;CA1031;CA1051;CA1063;CA1064;CA1724;CA1816;CA2211 + $(NoWarn);CA1010;CA1031;CA1051;CA1063;CA1064;CA1724;CA1816; $(NoWarn);S2223;S3215;S4039 $(NoWarn);RS0037; diff --git a/src/Polly/Utilities/SystemClock.cs b/src/Polly/Utilities/SystemClock.cs index abcadc847e7..8631b41ba16 100644 --- a/src/Polly/Utilities/SystemClock.cs +++ b/src/Polly/Utilities/SystemClock.cs @@ -1,6 +1,8 @@ #nullable enable namespace Polly.Utilities; +#pragma warning disable CA2211 // Non-constant fields should not be visible + /// /// Time related delegates used to support different compilation targets and to improve testability of the code. /// diff --git a/src/Polly/Utilities/TaskHelper.cs b/src/Polly/Utilities/TaskHelper.cs index 7f8832c64d7..a79dc8166c4 100644 --- a/src/Polly/Utilities/TaskHelper.cs +++ b/src/Polly/Utilities/TaskHelper.cs @@ -6,8 +6,10 @@ namespace Polly.Utilities; /// public static class TaskHelper { +#pragma warning disable CA2211 // Non-constant fields should not be visible /// /// Defines a completed Task for use as a completed, empty asynchronous delegate. /// public static Task EmptyTask = Task.CompletedTask; +#pragma warning restore }