Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

WIP: Don't specify paramName for ArgumentNullException in properties#15720

Closed
xtqqczze wants to merge 2 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
xtqqczze:fix-ArgumentNullException2xtqqczze/PowerShell-PowerShell:fix-ArgumentNullException2Copy head branch name to clipboard
Closed

WIP: Don't specify paramName for ArgumentNullException in properties#15720
xtqqczze wants to merge 2 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
xtqqczze:fix-ArgumentNullException2xtqqczze/PowerShell-PowerShell:fix-ArgumentNullException2Copy head branch name to clipboard

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Jul 5, 2021

Copy link
Copy Markdown
Contributor

Specifying value as a paramName for ArgumentException in properties does not add any value over the stack trace.

Follow-up to #15604 (comment).

@ghost ghost assigned adityapatwardhan Jul 5, 2021
@xtqqczze

xtqqczze commented Jul 5, 2021

Copy link
Copy Markdown
Contributor Author

CodeFactor "complex method" new issues are false positives, issue opened: #15721.

@iSazonov

iSazonov commented Jul 5, 2021

Copy link
Copy Markdown
Collaborator

@xtqqczze Please add more information in the PR description for reviewers why we need the changes..

@xtqqczze

xtqqczze commented Jul 5, 2021

Copy link
Copy Markdown
Contributor Author

However, Framework Design Guidelines (2008) from Addison-Wesley Microsoft Technology Series recommend this pattern:

DO use value for the name of the implicit value parameter of property setters.

https://docs.microsoft.com/dotnet/standard/design-guidelines/using-standard-exception-types#argumentexception-argumentnullexception-and-argumentoutofrangeexception

@xtqqczze

xtqqczze commented Jul 5, 2021

Copy link
Copy Markdown
Contributor Author

Removing the paramName would also violate CA2208: Instantiate argument exceptions correctly.

Issue opened: dotnet/roslyn-analyzers#5209.

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Jul 9, 2021
@xtqqczze xtqqczze changed the title Don't specify paramName for ArgumentNullException in properties WIP: Don't specify paramName for ArgumentNullException in properties Jul 13, 2021
@ghost ghost added the Stale label Jul 28, 2021
@ghost

ghost commented Jul 28, 2021

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment.

@ghost ghost closed this Aug 8, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.