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

Incorrect indentation in Method chain inside Initializer #529

Closed
belav opened this issue Dec 22, 2021 · 0 comments · Fixed by #534
Closed

Incorrect indentation in Method chain inside Initializer #529

belav opened this issue Dec 22, 2021 · 0 comments · Fixed by #534
Milestone

Comments

@belav
Copy link
Owner

belav commented Dec 22, 2021

The .Any should be indented

        var docs = new List<Doc>
        {
            node.GetLeadingTrivia()
            .Any(
                o =>
                    o.Kind()
                        is SyntaxKind.SingleLineCommentTrivia
                            or SyntaxKind.MultiLineCommentTrivia
                            or SyntaxKind.SingleLineDocumentationCommentTrivia
                            or SyntaxKind.MultiLineDocumentationCommentTrivia
            )
                ? ExtraNewLines.Print(node)
                : Doc.Null,
            AttributeLists.Print(node, node.AttributeLists),
            Modifiers.Print(node.Modifiers),
            Token.Print(node.Identifier)
        };
@belav belav added this to the 0.13.0 milestone Dec 30, 2021
@belav belav closed this as completed in #534 Jan 3, 2022
belav added a commit that referenced this issue Jan 3, 2022
* Fixing indentation issues with conditionals inside initializers

closes #529

* Fixing an edge case

* Update script
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