Handle param null check with else clause#59224
Merged
Merged
Conversation
Member
Author
|
@CyrusNajmabadi I believe I have addressed all your review comments. Please let me know if you have any others. |
CyrusNajmabadi
approved these changes
Feb 3, 2022
…UseParameterNullCheckingCodeFixProvider.cs Co-authored-by: CyrusNajmabadi <cyrus.najmabadi@gmail.com>
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? cc @stephentoub |
Contributor
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. |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Related to #36024
Gives a correct fix in a scenario like the following:

cc @CyrusNajmabadi