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 S3872 warning #2111

Merged
merged 4 commits into from
May 15, 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
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ indent_style = space
indent_size = 2
tab_width = 2

# S3872 // Interfaces should not be empty
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't appear to be the right description for what the original change was?

It's better (IMHO) to suppress these in the code with #pragma warning disable/restore pairs at the specific points of usage, rather the hiding it away in the editorconfig.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, in this case we don't have many violations for this rule, so it makes sense to keep it in code. Also, it can serve as a reminder to fix it in the future.

[**/Timeout/{TimeoutSyntax,TimeoutTResultSyntax}.cs]
dotnet_diagnostic.S3872.severity = suggestion

# C# files
[*.cs]

Expand Down
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);S3872;SA1414;S3215</NoWarn>
<NoWarn>$(NoWarn);SA1414;S3215</NoWarn>
<NoWarn>$(NoWarn);IDE1006;CA1062;CA1068;S4039;CA1063;CA1031;CA1051</NoWarn>
<NoWarn>$(NoWarn);CA2211;S2223;CA1032;CA1815;CA1816;S4457;CA1033</NoWarn>
<NoWarn>$(NoWarn);CA1010;CA1064;SA1118</NoWarn>
Expand Down
Loading