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

Indent IS_EXPRESSION and PREFIX_EXPRESSION #2094

Closed
paul-dingemans opened this issue Jun 27, 2023 · 0 comments · Fixed by #2125
Closed

Indent IS_EXPRESSION and PREFIX_EXPRESSION #2094

paul-dingemans opened this issue Jun 27, 2023 · 0 comments · Fixed by #2125

Comments

@paul-dingemans
Copy link
Collaborator

paul-dingemans commented Jun 27, 2023

A multiline IS_EXPRESSION like below:

fun foo(any: Any) = any is
        Foo

is formatted by ktlint 0.49.x to:

fun foo(any: Any) =
    any is
    Foo

while below was expected:

fun foo(any: Any) =
    any is
        Foo

Same for PREFIX_EXPRESSION:

fun foo(any: Int) = ++
    42
@paul-dingemans paul-dingemans changed the title Indent IS_EXPRESSION Indent IS_EXPRESSION and PREFIX_EXPRESSION Jun 27, 2023
@paul-dingemans paul-dingemans self-assigned this Jul 12, 2023
paul-dingemans added a commit that referenced this issue Jul 12, 2023
… in case it contains a linebreak `indent`

Closes #2094
paul-dingemans added a commit that referenced this issue Jul 16, 2023
… in case it contains a linebreak `indent` (#2125)

Closes #2094
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