nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.92k stars 639 forks source link

Regression of tabbing in compiler #if conditionals #1418

Closed gregcotten closed 1 year ago

gregcotten commented 1 year ago

After updating from 0.51.2 to 0.51.5, the tabbing of #if conditionals seems incorrect:

Before update:

    static let current: Platform = {
        #if os(macOS)
            .mac
        #elseif os(Linux)
            .linux
        #elseif os(Windows)
            .windows
        #else
            fatalError("Unknown OS not supported")
        #endif
    }()

After update to 0.51.5:

    static let current: Platform = {
        #if os(macOS)
            .mac
        #elseif os(Linux)
                .linux
        #elseif os(Windows)
                .windows
        #else
            fatalError("Unknown OS not supported")
        #endif
    }()
nicklockwood commented 1 year ago

@gregcotten fixed in 0.51.6