Skip to content
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

Improve ConditionalExpression in ReturnStatement formatting #416

Closed
belav opened this issue Aug 23, 2021 · 0 comments · Fixed by #435
Closed

Improve ConditionalExpression in ReturnStatement formatting #416

belav opened this issue Aug 23, 2021 · 0 comments · Fixed by #435
Milestone

Comments

@belav
Copy link
Owner

belav commented Aug 23, 2021

The && lining up with return is a little odd

class ClassName
{
    void MethodName()
    {
        switch (thing)
        {
            case MaterializeCollectionNavigationExpression materializeCollectionNavigationExpression:
                return materializeCollectionNavigationExpression.Navigation
                    is INavigation embeddableNavigation
                && embeddableNavigation.IsEmbedded()
                    ? base.Visit(materializeCollectionNavigationExpression.Subquery)
                    : base.VisitExtension(materializeCollectionNavigationExpression);
        }

        return materializeCollectionNavigationExpression.Navigation
        && embeddableNavigation.IsEmbedded()
            ? base.Visit(materializeCollectionNavigationExpression.Subquery)
            : base.VisitExtension(materializeCollectionNavigationExpression);
    }
}
@belav belav changed the title Binary in return should indent Improve ConditionalExpression in ReturnStatement formatting Sep 11, 2021
@belav belav added this to the 0.9.10 milestone Sep 11, 2021
belav added a commit that referenced this issue Sep 12, 2021
belav added a commit that referenced this issue Sep 20, 2021
* Improving formatting of Conditional in Return

closes #416

* Handling edge case for conditional in return

* More edge cases

* Fix unit test name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant