Throw ArgumentNullException with nameof(param), not "param" - #15604
Conversation
There was a problem hiding this comment.
I believe this was a copy-paste mistake.
|
Konstantin Gukov (@gukoff) Thanks for your contribution! Code under Microsoft.Management.UI.Internal is frozen and shouldn't be changed. The same for remoting code (WinRM). |
|
See also stale PR: #13875 |
8ca1bdd to
484508a
Compare
Removed
If It looks like the overlap with #13875 is minimal - only in To me, it makes sense to merge this one and then return to #13875 where a lot of similar work has been done. |
|
CodeFactor "Complex Method" new issues are false positives. |
There was a problem hiding this comment.
Microsoft.PowerShell.ScheduledJob is not compiled in the repo and we can not accept the changes.
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
It's not clear why the error view tests would fail. Re-run the corresponding jobs to see if it's intermittent. |
|
ConciseView test fails. |
ab3435b to
7e7ef2b
Compare
7e7ef2b to
a2a4f5b
Compare
|
|
Dongbo Wang (daxian-dbw)
left a comment
There was a problem hiding this comment.
I'm fine keeping the change as is. The fact that a few ConciseView tests failed after changing to use new ArgumentNullException() in properties indicates that change could be breaking (though it shouldn't ...).
xtqqczze If you are interested, please go ahead making that change for the properties, and see if ConciseView has an unexpected dependency somehow.
|
LGTM |
|
As a side note - don't you want add a PR check that there's no diff in |
|
🎉 Handy links: |
PR Summary
Refactoring of ArgumentNullException-s.
It covers a few files but not the whole solution.
Similar effort in the past: #13875
PR Context
Follow the best practice of throwing argument exceptions: https://www.jetbrains.com/help/resharper/UseNameofExpression.html
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).