Skip to content

Commit

Permalink
Turn off var preferences (#1700)
Browse files Browse the repository at this point in the history
Turn off var idea preferences.
  • Loading branch information
cmeyertons authored Oct 16, 2023
1 parent b169f88 commit e869fe8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
6 changes: 5 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
dotnet_naming_style.static_prefix_style.required_prefix =
dotnet_naming_style.static_prefix_style.capitalization = pascal_case
dotnet_naming_style.static_prefix_style.capitalization = pascal_case

# don't have var preferences
dotnet_diagnostic.IDE0007.severity = none
dotnet_diagnostic.IDE0008.severity = none
1 change: 0 additions & 1 deletion src/Polly.Core/Hedging/HedgingResilienceStrategy.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using Polly.Hedging.Controller;
using Polly.Hedging.Utils;
using Polly.Telemetry;

Expand Down
1 change: 0 additions & 1 deletion src/Polly.Core/Registry/ResiliencePipelineRegistry.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using Polly.Utils.Pipeline;

namespace Polly.Registry;

Expand Down
2 changes: 2 additions & 0 deletions src/Polly.Core/Retry/RetryHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ private static TimeSpan DecorrelatedJitterBackoffV2(int attempt, TimeSpan baseDe
return TimeSpan.FromTicks((long)Math.Min(formulaIntrinsicValue * RpScalingFactor * targetTicksFirstDelay, maxTimeSpanDouble));
}

#pragma warning disable IDE0047 // Remove unnecessary parentheses which offer less mental gymnastics
private static TimeSpan ApplyJitter(TimeSpan delay, Func<double> randomizer)
{
var offset = (delay.TotalMilliseconds * JitterFactor) / 2;
Expand All @@ -120,4 +121,5 @@ private static TimeSpan ApplyJitter(TimeSpan delay, Func<double> randomizer)

return TimeSpan.FromMilliseconds(newDelay);
}
#pragma warning restore IDE0047 // Remove unnecessary parentheses which offer less mental gymnastics
}
5 changes: 1 addition & 4 deletions src/Polly.Core/Utils/Pipeline/ExternalComponent.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Threading.Tasks;

namespace Polly.Utils.Pipeline;
namespace Polly.Utils.Pipeline;

[DebuggerDisplay("{Component}")]
internal class ExternalComponent : PipelineComponent
Expand Down
4 changes: 1 addition & 3 deletions src/Polly.Core/Utils/Pipeline/PipelineComponentFactory.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using Polly.Telemetry;
using Polly.Telemetry;

namespace Polly.Utils.Pipeline;

Expand Down

0 comments on commit e869fe8

Please sign in to comment.