From 37d201ed58af2f78504b75412c96f2dcf9b4a80e Mon Sep 17 00:00:00 2001 From: Caleb Bredlow Date: Mon, 25 Mar 2024 22:15:00 -0700 Subject: [PATCH] Clearing out the only 1805 violation using the method listed here: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1805#how-to-fix-violations --- src/Polly/Polly.csproj | 1 - src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Polly/Polly.csproj b/src/Polly/Polly.csproj index e128b592ed9..089d67caf48 100644 --- a/src/Polly/Polly.csproj +++ b/src/Polly/Polly.csproj @@ -12,7 +12,6 @@ $(NoWarn);CA2211;S2223;CA1032;CA1815;CA1816;S4457;SA1615;SA1618;CA1033 $(NoWarn);S4023;CA1010;S3442;CA1064;SA1649;SA1625;SA1623;SA1118 $(NoWarn);S3253;S3971;S6605;CA1724;CA1716;SA1108;CA1710;S4049;S3246 - $(NoWarn);CA1805 $(NoWarn);RS0037; diff --git a/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs b/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs index 22057a9a051..e584811d96d 100644 --- a/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs +++ b/src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs @@ -15,7 +15,7 @@ internal sealed class LockFreeTokenBucketRateLimiter : IRateLimiter private long addNextTokenAtTicks; #if !NETSTANDARD2_0 - private SpinWait spinner = default; + private static SpinWait spinner => default; #endif ///