Skip to content

Handle param null check with else clause#59224

Merged
RikkiGibson merged 6 commits into
dotnet:mainfrom
RikkiGibson:pnc-else
Feb 3, 2022
Merged

Handle param null check with else clause#59224
RikkiGibson merged 6 commits into
dotnet:mainfrom
RikkiGibson:pnc-else

Conversation

@RikkiGibson
Copy link
Copy Markdown
Member

Related to #36024

Gives a correct fix in a scenario like the following:
MicrosoftTeams-image (3)

cc @CyrusNajmabadi

@RikkiGibson RikkiGibson requested a review from a team as a code owner February 2, 2022 20:06
@ghost ghost added the Area-IDE label Feb 2, 2022
@RikkiGibson
Copy link
Copy Markdown
Member Author

@CyrusNajmabadi I believe I have addressed all your review comments. Please let me know if you have any others.

…UseParameterNullCheckingCodeFixProvider.cs

Co-authored-by: CyrusNajmabadi <cyrus.najmabadi@gmail.com>
@RikkiGibson
Copy link
Copy Markdown
Member Author

@CyrusNajmabadi is there a need to handle indent depth of new lines within statements of the else clause? (i.e. by adding elastic trivia) in a scenario like the following?

MicrosoftTeams-image (7)

MicrosoftTeams-image (8)

cc @stephentoub

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

@CyrusNajmabadi is there a need to handle indent depth of new lines within statements of the else clause? (i.e. by adding elastic trivia) in a scenario like the following?

Yup, that's the same issue i had you open. This is why we need a general "dedent/indent construct to appropriate level" annotation, which only does that work and no other formatting.

@RikkiGibson
Copy link
Copy Markdown
Member Author

#59228

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants