-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a couple of issues in UseExceptionThrowHelpers (#6396)
* Fix a couple of issues in UseExceptionThrowHelpers 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. * Address PR feedback
- Loading branch information
1 parent
fad2bc6
commit e378446
Showing
2 changed files
with
71 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters