App-vNext / Polly

Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.
https://www.thepollyproject.org
BSD 3-Clause "New" or "Revised" License
13.35k stars 1.22k forks source link

Remove CA1816 NoWarn #2317

Closed gabidabet closed 3 days ago

gabidabet commented 4 days ago

Pull Request

The issue or feature being addressed

https://github.com/App-vNext/Polly/issues/1290

Details on the issue fix or feature implementation

File Fix introduced
TimeLock The warning exists only in a Debug section so I preferred a local suppression
AsyncBulkheadPolicy Add GC.SuppressFinalize(this); at the end f Dispose
BulkheadPolicy Add GC.SuppressFinalize(this); at the end f Dispose

Confirm the following

codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.39%. Comparing base (856bfdf) to head (0aba298). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2317 +/- ## ======================================= Coverage 85.38% 85.39% ======================================= Files 313 313 Lines 7457 7461 +4 Branches 1126 1126 ======================================= + Hits 6367 6371 +4 Misses 745 745 Partials 345 345 ``` | [Flag](https://app.codecov.io/gh/App-vNext/Polly/pull/2317/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=App-vNext) | Coverage Δ | | |---|---|---| | [linux](https://app.codecov.io/gh/App-vNext/Polly/pull/2317/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=App-vNext) | `85.36% <100.00%> (+<0.01%)` | :arrow_up: | | [macos](https://app.codecov.io/gh/App-vNext/Polly/pull/2317/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=App-vNext) | `85.39% <100.00%> (+<0.01%)` | :arrow_up: | | [windows](https://app.codecov.io/gh/App-vNext/Polly/pull/2317/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=App-vNext) | `85.36% <100.00%> (-0.02%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=App-vNext#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

gabidabet commented 4 days ago

Reading multiple blogs, I don't know if adding GC.SuppressFinalize(this); at the end of Dispose is a good approach.