Suppress S2094 warning#2765
Conversation
martincostello
commented
Oct 11, 2025
- Suppress S2094 warning on empty marker class.
- Remove extraneous space.
- Use target-typed new.
Suppress S2094 warning on empty marker class.
- Remove extraneous space. - Use target-typed new.
There was a problem hiding this comment.
Pull Request Overview
This PR makes minor code improvements to suppress a SonarQube warning about empty classes and applies C# 12 syntax modernizations. The changes focus on code quality and consistency without altering functionality.
- Suppress S2094 SonarQube warning for intentionally empty marker class
- Apply target-typed new expression for improved code conciseness
- Use primary constructor syntax for empty class declaration
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Polly.Core/ResiliencePipelineBuilderBase.cs | Uses target-typed new expression to simplify object instantiation |
| src/Polly.Core/ResilienceContext.cs | Suppresses S2094 warning and converts empty class to primary constructor syntax |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2765 +/- ##
=======================================
Coverage 96.15% 96.15%
=======================================
Files 309 309
Lines 7123 7123
Branches 1005 1005
=======================================
Hits 6849 6849
Misses 221 221
Partials 53 53
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |