Throw ArgumentNullException with nameof(param), not "param"#15604
Throw ArgumentNullException with nameof(param), not "param"#15604daxian-dbw merged 1 commit intoPowerShell:masterfrom
Conversation
There was a problem hiding this comment.
I believe this was a copy-paste mistake.
|
@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. |
...t.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.PowerShell.CoreCLR.Eventing/DotNetCode/Eventing/EventProvider.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Microsoft.PowerShell.ScheduledJob is not compiled in the repo and we can not accept the changes.
src/Microsoft.PowerShell.CoreCLR.Eventing/DotNetCode/Eventing/EventProviderTraceListener.cs
Outdated
Show resolved
Hide resolved
|
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
|
|
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).