I just noticed that the opening brace following a multiline if-let-condition is moved to the next line although the allman option is set to false.
Example:
let var1: Int?
let var2: Int?
if let var1 = var1,
let var2 = var2 {
printf("\(var1 + var2)")
}
turns into
let var1: Int?
let var2: Int?
if let var1 = var1,
let var2 = var2
{
printf("\(var1 + var2)")
}
I'm not sure if it is intended that way, but it contradicts the opening_brace rule of SwiftLint and I didn't find a workaround except for either deactivating the SwiftFormat braces rule or the SwiftLint opening_brace rule.
Of course the if let in the given example could be written in one line but I had several cases in my code where one line was not enough.
This happens with Xcode 15.3 and both the Xcode extension and the Swift Package Manager plugin of version 0.53.7.
Hi there,
I just noticed that the opening brace following a multiline if-let-condition is moved to the next line although the allman option is set to false.
Example:
turns into
I'm not sure if it is intended that way, but it contradicts the opening_brace rule of SwiftLint and I didn't find a workaround except for either deactivating the SwiftFormat braces rule or the SwiftLint opening_brace rule.
Of course the if let in the given example could be written in one line but I had several cases in my code where one line was not enough.
This happens with Xcode 15.3 and both the Xcode extension and the Swift Package Manager plugin of version 0.53.7.
Thanks and best regards Chris