Skip to content

Formatting tweaks#3017

Merged
martincostello merged 1 commit intomainfrom
formatting-tweaks
Apr 3, 2026
Merged

Formatting tweaks#3017
martincostello merged 1 commit intomainfrom
formatting-tweaks

Conversation

@martincostello
Copy link
Copy Markdown
Member

  • Fix-up some formatting.
  • Fix warning about using Lock for .NET 10+.

- Fix-up some formatting.
- Fix warning about using `Lock` for .NET 10+.
Copilot AI review requested due to automatic review settings April 3, 2026 11:32
@martincostello martincostello enabled auto-merge (squash) April 3, 2026 11:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on small C# formatting cleanups in test utilities and tests, and introduces a conditional Lock type usage in FakeTelemetryListener to address .NET 10+ locking guidance/warnings while keeping older TFMs compatible.

Changes:

  • Use target-typed new(...) construction in TestUtilities.AsObjectArguments.
  • Add conditional Lock aliasing for non-.NET10 TFMs and update _syncRoot type accordingly.
  • Add trailing commas in a few switch expressions / collection-like initializers to match formatting conventions.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/Polly.TestUtils/TestUtilities.cs Minor formatting change to use target-typed new when constructing telemetry arguments.
test/Polly.TestUtils/FakeTelemetryListener.cs Introduces conditional Lock usage for .NET 10+ and adjusts sync root type.
test/Polly.Core.Tests/Issues/IssuesTests.HandleMultipleResults_898.cs Formatting tweak (adds trailing comma).
test/Polly.Core.Tests/Hedging/Controller/TaskExecutionTests.cs Formatting tweak (adds trailing comma).
test/Polly.Core.Tests/Hedging/Controller/HedgingExecutionContextTests.cs Formatting tweak (adds trailing comma).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.15%. Comparing base (dbe4eb7) to head (9cbdd16).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3017   +/-   ##
=======================================
  Coverage   96.15%   96.15%           
=======================================
  Files         310      310           
  Lines        7135     7135           
  Branches     1005     1005           
=======================================
  Hits         6861     6861           
  Misses        221      221           
  Partials       53       53           
Flag Coverage Δ
linux 96.15% <ø> (ø)
macos 96.15% <ø> (ø)
windows 96.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martincostello martincostello merged commit 8fd8fc0 into main Apr 3, 2026
32 checks passed
@martincostello martincostello deleted the formatting-tweaks branch April 3, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants