realm / SwiftLint

A tool to enforce Swift style and conventions.
https://realm.github.io/SwiftLint
MIT License
18.46k stars 2.2k forks source link

`opening_brace` fix is broken #5598

Open kapitoshka438 opened 1 month ago

kapitoshka438 commented 1 month ago

New Issue Checklist

Describe the bug

Source file:

func foo() {
    if q1, q2
    {
        do1()
    } else if q3, q4
    {
        do2()
    }
}

swiftlint --fix

Expected result:

func foo() {
    if q1, q2 {
        do1()
    } else if q3, q4 {
        do2()
    }
}

Actual result:

func foo() {
    if q1, q2 {
        do1()
    } else if q3, q4
          do2()
    }
}

Environment