Skip to content

Single-line if statements with parentheses won't be formatted #3064

@FooIbar

Description

@FooIbar
fun foo() {
    if (true)(0)
    if (true)(0)else 1
}

Expected Behavior

fun foo() {
    if (true) (0)
    if (true) (0) else 1
}

Observed Behavior

Not formatted

Your Environment

  • Version of ktlint used: 1.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions