Skip to content

Conversation

@xtqqczze
Copy link
Contributor

@xtqqczze xtqqczze commented Jul 5, 2021

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
Copy link
Contributor Author

xtqqczze commented Jul 5, 2021

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

@iSazonov
Copy link
Collaborator

iSazonov commented Jul 5, 2021

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

@xtqqczze
Copy link
Contributor Author

xtqqczze commented Jul 5, 2021

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
Copy link
Contributor Author

xtqqczze commented Jul 5, 2021

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
Copy link

ghost commented Jul 28, 2021

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