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

Double/no indentation when closure and parentheses on same line #538

Closed
ChristopherRogers opened this issue Jan 16, 2020 · 2 comments
Closed
Labels
bug fixed in develop bug/feature resolved in the develop branch

Comments

@ChristopherRogers
Copy link

ChristopherRogers commented Jan 16, 2020

The following (formatted) code gets formatted oddly with --disable trailingClosures. The indentation inside of the closure is double indented (one for the parentheses, I assume). The indentation for the last line gets completely ignored.

Tested in 0.44.0

let a = b.flatMap({ e
        in
    e
                                                 })
let a
    = b.flatMap({ e
            in
        e
                                                })
@nicklockwood
Copy link
Owner

@ChristopherRogers this is slightly improved in 0.44.15. Result now looks like:

let a = b.flatMap({ e
        in
    e
})

@nicklockwood nicklockwood added the fixed in develop bug/feature resolved in the develop branch label Aug 9, 2020
@nicklockwood
Copy link
Owner

@ChristopherRogers fixed in 0.45.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fixed in develop bug/feature resolved in the develop branch
Projects
None yet
Development

No branches or pull requests

2 participants