Skip to content

Commit

Permalink
Enable S4049 (#2195)
Browse files Browse the repository at this point in the history
Enable and suppress two violations.
  • Loading branch information
Zombach committed Jul 12, 2024
1 parent 40562a9 commit c90c0f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Polly/PolicyBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public override bool Equals(object obj) =>
public override int GetHashCode() =>
base.GetHashCode();

#pragma warning disable S4049 //Consider making method a property
/// <summary>
/// Gets the <see cref="System.Type" /> of the current instance.
/// </summary>
Expand All @@ -60,6 +61,7 @@ public override int GetHashCode() =>
[EditorBrowsable(EditorBrowsableState.Never)]
public new Type GetType() =>
base.GetType();
#pragma warning restore S4049

#endregion
}
Expand Down Expand Up @@ -129,6 +131,7 @@ public override bool Equals(object obj) =>
public override int GetHashCode() =>
base.GetHashCode();

#pragma warning disable S4049 //Consider making method a property
/// <summary>
/// Gets the <see cref="System.Type" /> of the current instance.
/// </summary>
Expand All @@ -138,6 +141,7 @@ public override int GetHashCode() =>
[EditorBrowsable(EditorBrowsableState.Never)]
public new Type GetType() =>
base.GetType();
#pragma warning restore S4049

#endregion
}
2 changes: 1 addition & 1 deletion src/Polly/Polly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<MutationScore>70</MutationScore>
<IncludePollyUsings>true</IncludePollyUsings>
<NoWarn>$(NoWarn);CA1010;CA1031;CA1032;CA1051;CA1062;CA1063;CA1064;CA1710;CA1716;CA1724;CA1805;CA1815;CA1816;CA2211</NoWarn>
<NoWarn>$(NoWarn);S2223;S3215;S3246;S3971;S4039;S4049;S4457</NoWarn>
<NoWarn>$(NoWarn);S2223;S3215;S3246;S3971;S4039;S4457</NoWarn>
<!--Public API Analyzers: We do not need to fix these as it would break compatibility with released Polly versions-->
<NoWarn>$(NoWarn);RS0037;</NoWarn>
</PropertyGroup>
Expand Down

0 comments on commit c90c0f6

Please sign in to comment.