-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Enable IDE0031: Null check can be simplified #13548
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
|
My personal feeling is that it doesn't add to readability. I would prefer that we move the CodeFactor index to the green area. |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@PowerShell/powershell-maintainers reviewed this PR and agreed to accept it. But please delay merging the PR until after the 7.1.0-RC.1 release branch is created. |
|
Convert to draft until 7.1 RC1. |
|
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment. |
|
needs triage |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
updated PR description |
|
@daxian-dbw Can you review? |
|
rebased |
TravisEz13
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.
reviewed 13/42
|
@PoshChan Please remind me in 7 days |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@xtqqczze Please resolve merge conflicts. |
|
Resolved merge conflicts. |
|
@TravisEz13 Do you want to continue the code review? |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
🎉 Handy links: |
PR Summary
Use C# 6.0 null propagation:
(result == null) ? null : result.Instance->result?.Instance(result != null) ? result.Instance : null->result?.Instancehttps://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0031
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.