-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Cleanup webrequestpscmdlet.common.cs #18596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup webrequestpscmdlet.common.cs #18596
Conversation
|
Should I remove redundant brackets ? (example: |
|
@CarloToso You could look CodeFactor issues reported for the file and fix some ones. |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
...t.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs
Outdated
Show resolved
Hide resolved
...t.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs
Outdated
Show resolved
Hide resolved
...t.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs
Outdated
Show resolved
Hide resolved
|
@CarloToso Please squash last commits after "revert =0" - difficult to review last changes. |
== -> is remove useless return; fixed errors revert
b893b60 to
e803d64
Compare
|
Squashed |
| } | ||
|
|
||
| if (Authentication != WebAuthenticationType.None && Token != null && Credential != null) | ||
| if (Authentication is not WebAuthenticationType.None && Token is not null && Credential is not null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert patterns like Authentication is not WebAuthenticationType.None. Let's limit the PR only to is null and is not null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or better move this in follow PR after we merge that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
...t.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs
Outdated
Show resolved
Hide resolved
| if (xmlNode is null) | ||
| return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (xmlNode is null) | |
| return 0; | |
| if (xmlNode is null) | |
| { | |
| return 0; | |
| } |
…Cmdlet/Common/WebRequestPSCmdlet.Common.cs
…Cmdlet/Common/WebRequestPSCmdlet.Common.cs
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
🎉 Handy links: |
PR Summary
Small cleanup for better readibility