-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Use 'is' operator instead of 'as' operator #13287
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
Conversation
|
@iSazonov I am planning work with these analyzers too:
Would you prefer seperate PRs or to add commits here?
|
src/System.Management.Automation/engine/remoting/commands/NewPSSessionConfigurationFile.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/remoting/commands/NewPSSessionConfigurationFile.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/remoting/fanin/InitialSessionStateProvider.cs
Outdated
Show resolved
Hide resolved
I am unlike this. It is not add readability. Please skip. Good! I am unlike this. It is not add readability. Please skip. Good! Good but we should replace "!(... is ...)" with "is not" on second pass.
Please pull new PR for every change - this simplify a code review.
|
vexx32
left a comment
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.
I think we can simplify a couple of these a little further, but everything else looks good. Nice work!
...Microsoft.PowerShell.Commands.Utility/commands/utility/ShowCommand/ShowCommandCommandInfo.cs
Outdated
Show resolved
Hide resolved
...t.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs
Outdated
Show resolved
Hide resolved
|
@xtqqczze Please rebase to pass CIs. |
Co-authored-by: Ilya <darpa@yandex.ru>
Co-authored-by: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
|
rebased to restart CI |
|
🎉 Handy links: |
PR Summary
https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1172.md
PR Context
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.