Skip to content

Conversation

@stephentoub
Copy link
Member

Based on additional false positives discovered while enabling the rules in dotnet/runtime:

  • We don't want to warn to use ObjectDisposedException.ThrowIf when inside of a struct, as doing so is likely to lead to additional costs (e.g. boxing).
  • We don't want to warn to use ArgumentXxException.ThrowIfXx when the code to compute the argument name is more complicated than just a literal / nameof, e.g. a method call that determines what parameter name should be employed.

Based on additional false positives discovered while enabling the rules in dotnet/runtime:
- We don't want to warn to use ObjectDisposedException.ThrowIf when inside of a struct, as doing so is likely to lead to additional costs (e.g. boxing).
- We don't want to warn to use ArgumentXxException.ThrowIfXx when the code to compute the argument name is more complicated than just a literal / nameof, e.g. a method call that determines what parameter name should be employed.
@codecov
Copy link

codecov bot commented Jan 3, 2023

Codecov Report

Merging #6396 (14bc4de) into main (b7bb138) will increase coverage by 0.00%.
The diff coverage is 97.18%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6396   +/-   ##
=======================================
  Coverage   96.11%   96.11%           
=======================================
  Files        1361     1361           
  Lines      316031   316051   +20     
  Branches    10195    10185   -10     
=======================================
+ Hits       303738   303766   +28     
+ Misses       9861     9855    -6     
+ Partials     2432     2430    -2     

@stephentoub
Copy link
Member Author

Thanks for the reviews.

@stephentoub stephentoub merged commit e378446 into dotnet:main Jan 3, 2023
@stephentoub stephentoub deleted the twomoreexceptionissues branch January 3, 2023 14:32
@github-actions github-actions bot added this to the vNext milestone Jan 3, 2023
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.

3 participants