8000 Enable IDE0031: Null check can be simplified by xtqqczze · Pull Request #13548 · PowerShell/PowerShell · GitHub 8000
[go: up one dir, main page]

Skip to content

Conversation

@xtqqczze
Copy link
Contributor
@xtqqczze xtqqczze commented Aug 30, 2020

PR Summary

Use C# 6.0 null propagation:

  • (result == null) ? null : result.Instance -> result?.Instance
  • (result != null) ? result.Instance : null -> result?.Instance

https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0031

PR Context

PR Checklist

@iSazonov
Copy link
Collaborator

My personal feeling is that it doesn't add to readability. I would prefer that we move the CodeFactor index to the green area.

8000 @iSazonov iSazonov added the Review - Maintainer The PR/issue needs a review from the PowerShell repo Maintainers label Sep 2, 2020
@ghost ghost added the Review - Needed The PR is being reviewed label Sep 9, 2020
@ghost
Copy link
ghost commented Sep 9, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@daxian-dbw
Copy link
Member

@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.

@ghost ghost removed the Review - Needed The PR is being reviewed label Sep 15, 2020
@daxian-dbw daxian-dbw removed the Review - Maintainer The PR/issue needs a review from the PowerShell repo Maintainers label Sep 15, 2020
@iSazonov iSazonov marked this pull request as draft September 16, 2020 13:58
@iSazonov
Copy link
Collaborator
iSazonov commented Sep 16, 2020

Convert to draft until 7.1 RC1.

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Sep 19, 2020
@ghost ghost added the Stale label Oct 4, 2020
@ghost
Copy link
ghost commented Oct 4, 2020

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.

@xtqqczze xtqqczze marked this pull request as ready for review October 13, 2020 00:01
@ghost ghost removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept Stale labels Oct 13, 2020
@xtqqczze
Copy link
Contributor Author

needs triage

@ghost ghost added the Review - Needed The PR is being reviewed label Oct 20, 2020
@ghost
Copy link
ghost commented Oct 20, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@xtqqczze
Copy link
Contributor Author

updated PR description

@xtqqczze
Copy link
Contributor Author

@daxian-dbw Can you review?

@iSazonov iSazonov added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Oct 21, 2020
@xtqqczze
Copy link
Contributor Author

rebased

Copy link
Member
@TravisEz13 TravisEz13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed 13/42

@TravisEz13
Copy link
Member

@PoshChan Please remind me in 7 days

@ghost ghost removed the Review - Needed The PR is being reviewed label Oct 25, 2020
@xtqqczze xtqqczze changed the title Fix IDE0031: Null check can be simplified Enable IDE0031: Null check can be simplified Oct 26, 2020
@ghost ghost added the Review - Needed The PR is being reviewed label Nov 3, 2020
@ghost
Copy link
ghost commented Nov 3, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@ghost ghost removed the Review - Needed The PR is being reviewed label Nov 5, 2020
@iSazonov
Copy link
Collaborator
iSazonov commented Nov 5, 2020

@xtqqczze Please resolve merge conflicts.

@xtqqczze
Copy link
Contributor Author
xtqqczze commented Nov 5, 2020

Resolved merge conflicts.

@iSazonov
Copy link
Collaborator
iSazonov commented Nov 5, 2020

@TravisEz13 Do you want to continue the code review?

@ghost ghost added the Review - Needed The PR is being reviewed label Nov 13, 2020
@ghost
Copy link
ghost commented Nov 13, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@iSazonov iSazonov merged commit 9e28529 into PowerShell:master Nov 20, 2020
@ghost ghost removed the Review - Needed The PR is being reviewed label Nov 20, 2020
@iSazonov iSazonov added this to the 7.2.0-preview.2 milestone Nov 20, 2020
@xtqqczze xtqqczze deleted the IDE0031 branch November 20, 2020 08:41
@ghost
Copy link
ghost commented Dec 15, 2020

🎉v7.2.0-preview.2 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0