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

Fix warning CA1716 #2212

Merged
merged 4 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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;CA1062;CA1063;CA1064;CA1710;CA1716;CA1724;CA1805;CA1815;CA1816;CA2211</NoWarn>
<NoWarn>$(NoWarn);CA1010;CA1031;CA1051;CA1062;CA1063;CA1064;CA1710;CA1724;CA1805;CA1815;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
2 changes: 2 additions & 0 deletions src/Polly/Registry/IReadOnlyPolicyRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/// <exception cref="ArgumentNullException">Thrown when <paramref name="key"/> is <see langword="null"/>.</exception>
/// <exception cref="KeyNotFoundException">The given key was not present in the dictionary.</exception>
/// <returns>The value associated with the specified key.</returns>
IsPolicy this[TKey key] { get; }

Check failure on line 17 in src/Polly/Registry/IReadOnlyPolicyRegistry.cs

View workflow job for this annotation

GitHub Actions / windows-latest

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 17 in src/Polly/Registry/IReadOnlyPolicyRegistry.cs

View workflow job for this annotation

GitHub Actions / windows-latest

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 17 in src/Polly/Registry/IReadOnlyPolicyRegistry.cs

View workflow job for this annotation

GitHub Actions / windows-latest

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 17 in src/Polly/Registry/IReadOnlyPolicyRegistry.cs

View workflow job for this annotation

GitHub Actions / windows-latest

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 17 in src/Polly/Registry/IReadOnlyPolicyRegistry.cs

View workflow job for this annotation

GitHub Actions / windows-latest

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 17 in src/Polly/Registry/IReadOnlyPolicyRegistry.cs

View workflow job for this annotation

GitHub Actions / windows-latest

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 17 in src/Polly/Registry/IReadOnlyPolicyRegistry.cs

View workflow job for this annotation

GitHub Actions / windows-latest

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check failure on line 17 in src/Polly/Registry/IReadOnlyPolicyRegistry.cs

View workflow job for this annotation

GitHub Actions / windows-latest

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

/// <summary>
/// Gets the policy stored under the provided key, casting to <typeparamref name="TPolicy"/>.
Expand All @@ -23,8 +23,10 @@
/// <typeparam name="TPolicy">The type of Policy.</typeparam>
/// <returns>The policy stored in the registry under the given key.</returns>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="key"/> is <see langword="null"/>.</exception>
#pragma warning disable CA1716 // Identifiers should not match keywords
TPolicy Get<TPolicy>(TKey key)
where TPolicy : IsPolicy;
#pragma warning restore CA1716

/// <summary>
/// Gets the policy stored under the provided key, casting to <typeparamref name="TPolicy"/>.
Expand Down
Loading