Use 'is' operator instead of 'as' operator#13287
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.
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.