Skip to content

Commit

Permalink
Enable CA1063
Browse files Browse the repository at this point in the history
- Suppress extant occurrences of CA1063.
- Re-enable CA1063.
  • Loading branch information
martincostello committed Jan 28, 2025
1 parent 1d4d496 commit 474f8e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Polly/Bulkhead/AsyncBulkheadPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ namespace Polly.Bulkhead;
/// <summary>
/// A bulkhead-isolation policy which can be applied to delegates.
/// </summary>
#pragma warning disable CA1063
public class AsyncBulkheadPolicy : AsyncPolicy, IBulkheadPolicy
#pragma warning restore CA1063
{
private readonly SemaphoreSlim _maxParallelizationSemaphore;
private readonly SemaphoreSlim _maxQueuedActionsSemaphore;
Expand Down Expand Up @@ -68,7 +70,9 @@ public void Dispose()
/// A bulkhead-isolation policy which can be applied to delegates.
/// </summary>
/// <typeparam name="TResult">The return type of delegates which may be executed through the policy.</typeparam>
#pragma warning disable CA1063
public class AsyncBulkheadPolicy<TResult> : AsyncPolicy<TResult>, IBulkheadPolicy<TResult>
#pragma warning restore CA1063
{
private readonly SemaphoreSlim _maxParallelizationSemaphore;
private readonly SemaphoreSlim _maxQueuedActionsSemaphore;
Expand Down
4 changes: 4 additions & 0 deletions src/Polly/Bulkhead/BulkheadPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ namespace Polly.Bulkhead;
/// <summary>
/// A bulkhead-isolation policy which can be applied to delegates.
/// </summary>
#pragma warning disable CA1063
public class BulkheadPolicy : Policy, IBulkheadPolicy
#pragma warning restore CA1063
{
private readonly SemaphoreSlim _maxParallelizationSemaphore;
private readonly SemaphoreSlim _maxQueuedActionsSemaphore;
Expand Down Expand Up @@ -66,7 +68,9 @@ public void Dispose()
/// A bulkhead-isolation policy which can be applied to delegates returning a value of type <typeparamref name="TResult"/>.
/// </summary>
/// <typeparam name="TResult">The type of the result.</typeparam>
#pragma warning disable CA1063
public class BulkheadPolicy<TResult> : Policy<TResult>, IBulkheadPolicy<TResult>
#pragma warning restore CA1063
{
private readonly SemaphoreSlim _maxParallelizationSemaphore;
private readonly SemaphoreSlim _maxQueuedActionsSemaphore;
Expand Down
3 changes: 1 addition & 2 deletions src/Polly/Polly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<ProjectType>Library</ProjectType>
<MutationScore>70</MutationScore>
<IncludePollyUsings>true</IncludePollyUsings>
<NoWarn>$(NoWarn);CA1063</NoWarn>
<!--Public API Analyzers: We do not need to fix these as it would break compatibility with released Polly versions-->
<!-- We do not plan on enabling nullable annotations for Polly -->
<NoWarn>$(NoWarn);RS0037</NoWarn>
</PropertyGroup>

Expand Down

0 comments on commit 474f8e8

Please sign in to comment.