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

Warning Suppression CA1062 #2216

Merged
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
1 change: 1 addition & 0 deletions src/Polly/Bulkhead/AsyncBulkheadPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Polly.Bulkhead;
/// <summary>
/// A bulkhead-isolation policy which can be applied to delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class AsyncBulkheadPolicy : AsyncPolicy, IBulkheadPolicy
{
private readonly SemaphoreSlim _maxParallelizationSemaphore;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Bulkhead/BulkheadPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Polly.Bulkhead;
/// <summary>
/// A bulkhead-isolation policy which can be applied to delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class BulkheadPolicy : Policy, IBulkheadPolicy
{
private readonly SemaphoreSlim _maxParallelizationSemaphore;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Caching/AsyncCachePolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Polly.Caching;
/// <summary>
/// A cache policy that can be applied to the results of delegate executions.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class AsyncCachePolicy : AsyncPolicy
{
private readonly IAsyncCacheProvider _asyncCacheProvider;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Caching/AsyncCacheSyntax.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#nullable enable
namespace Polly;

#pragma warning disable CA1062 // Validate arguments of public methods
public partial class Policy
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Caching/AsyncCacheTResultSyntax.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#nullable enable
namespace Polly;

#pragma warning disable CA1062 // Validate arguments of public methods
public partial class Policy
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Caching/CachePolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Polly.Caching;
/// <summary>
/// A cache policy that can be applied to the results of delegate executions.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class CachePolicy : Policy, ICachePolicy
{
private readonly ISyncCacheProvider _syncCacheProvider;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Caching/CacheSyntax.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#nullable enable
namespace Polly;

#pragma warning disable CA1062 // Validate arguments of public methods
public partial class Policy
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Caching/CacheTResultSyntax.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#nullable enable
namespace Polly;

#pragma warning disable CA1062 // Validate arguments of public methods
public partial class Policy
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Caching/ContextualTtl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Polly.Caching;
/// <summary>
/// Defines a ttl strategy which will cache items for a TimeSpan which may be influenced by data in the execution context.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class ContextualTtl : ITtlStrategy
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Caching/DefaultCacheKeyStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Polly.Caching;
/// <summary>
/// The default cache key strategy for <see cref="CachePolicy"/>. Returns the property <see cref="Context.OperationKey"/>.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class DefaultCacheKeyStrategy : ICacheKeyStrategy
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/Polly/CircuitBreaker/AsyncCircuitBreakerPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/// <summary>
/// A circuit-breaker policy that can be applied to async delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class AsyncCircuitBreakerPolicy : AsyncPolicy, ICircuitBreakerPolicy
{
internal readonly ICircuitController<EmptyStruct> BreakerController;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/CircuitBreaker/CircuitBreakerPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/// <summary>
/// A circuit-breaker policy that can be applied to delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class CircuitBreakerPolicy : Policy, ICircuitBreakerPolicy
{
internal readonly ICircuitController<EmptyStruct> BreakerController;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Fallback/AsyncFallbackPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Polly.Fallback;
/// <summary>
/// A fallback policy that can be applied to asynchronous delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class AsyncFallbackPolicy : AsyncPolicy, IFallbackPolicy
{
private readonly Func<Exception, Context, Task> _onFallbackAsync;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Fallback/FallbackPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Polly.Fallback;
/// <summary>
/// A fallback policy that can be applied to delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class FallbackPolicy : Policy, IFallbackPolicy
{
private readonly Action<Exception, Context> _onFallback;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/NoOp/AsyncNoOpPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Polly.NoOp;
/// <summary>
/// A noop policy that can be applied to asynchronous delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class AsyncNoOpPolicy : AsyncPolicy, INoOpPolicy
{
internal AsyncNoOpPolicy()
Expand Down
1 change: 1 addition & 0 deletions src/Polly/NoOp/NoOpPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Polly.NoOp;
/// <summary>
/// A no op policy that can be applied to delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class NoOpPolicy : Policy, INoOpPolicy
{
internal NoOpPolicy()
Expand Down
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;CA1062;CA1063;CA1064;CA1724;CA1805;CA1816;CA2211</NoWarn>
<NoWarn>$(NoWarn);CA1010;CA1031;CA1051;CA1063;CA1064;CA1724;CA1805;CA1816;CA2211</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
1 change: 1 addition & 0 deletions src/Polly/RateLimit/AsyncRateLimitPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Polly.RateLimit;
/// <summary>
/// A rate-limit policy that can be applied to asynchronous delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class AsyncRateLimitPolicy : AsyncPolicy, IRateLimitPolicy
{
private readonly IRateLimiter _rateLimiter;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/RateLimit/RateLimitPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Polly.RateLimit;
/// <summary>
/// A rate-limit policy that can be applied to synchronous delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class RateLimitPolicy : Policy, IRateLimitPolicy
{
private readonly IRateLimiter _rateLimiter;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Retry/AsyncRetryPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/// <summary>
/// A retry policy that can be applied to asynchronous delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class AsyncRetryPolicy : AsyncPolicy, IRetryPolicy
{
private readonly Func<Exception, TimeSpan, int, Context, Task> _onRetryAsync;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Retry/RetryPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Polly.Retry;
/// <summary>
/// A retry policy that can be applied to synchronous delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class RetryPolicy : Policy, IRetryPolicy
{
private readonly Action<Exception, TimeSpan, int, Context> _onRetry;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Timeout/AsyncTimeoutPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/// <summary>
/// A timeout policy which can be applied to async delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class AsyncTimeoutPolicy : AsyncPolicy, ITimeoutPolicy
{
private readonly Func<Context, TimeSpan> _timeoutProvider;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Timeout/TimeoutPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/// <summary>
/// A timeout policy which can be applied to delegates.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public class TimeoutPolicy : Policy, ITimeoutPolicy
{
private readonly TimeoutStrategy _timeoutStrategy;
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Wrap/IAsyncPolicyPolicyWrapExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/// <summary>
/// Defines extensions for configuring <see cref="PolicyWrap"/> instances on an <see cref="IAsyncPolicy"/> or <see cref="IAsyncPolicy{TResult}"/>.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public static class IAsyncPolicyPolicyWrapExtensions
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Wrap/IPolicyWrapExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/// <summary>
/// Extension methods for IPolicyWrap.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public static class IPolicyWrapExtension
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions src/Polly/Wrap/ISyncPolicyPolicyWrapExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/// <summary>
/// Defines extensions for configuring <see cref="PolicyWrap"/> instances on an <see cref="ISyncPolicy"/> or <see cref="ISyncPolicy{TResult}"/>.
/// </summary>
#pragma warning disable CA1062 // Validate arguments of public methods
public static class ISyncPolicyPolicyWrapExtensions
{
/// <summary>
Expand Down