You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func test() {
let result = newValue.withContiguousStorageIfAvailable {
setNewValue($0)
} ?? setNewValue(newValue)
}
For some reason, swift-format decides it would be better with a newline and if everything was indented:
func test() {
let result =
newValue.withContiguousStorageIfAvailable {
setNewValue($0)
} ?? setNewValue(newValue)
}
But I think this looks quite a lot worse. The actual body, involving wCSIA and the optional chaining, seems to be kept intact... it's just a bit lower and to the side. I'm not sure how that helps anything.
I'm not sure which rule is causing this or how to disable it, but I'd really like if swift-format could stop doing it. It's not a line-length issue: my max length is set at 120 and the original doesn't get anywhere near that.
The text was updated successfully, but these errors were encountered:
Environment
swift-format 0.50300.0
Additional Detail from JIRA
md5: 2f04a8858227c6ebd6c94f80e9e6a07e
Issue Description:
Given this input:
For some reason, swift-format decides it would be better with a newline and if everything was indented:
But I think this looks quite a lot worse. The actual body, involving wCSIA and the optional chaining, seems to be kept intact... it's just a bit lower and to the side. I'm not sure how that helps anything.
I'm not sure which rule is causing this or how to disable it, but I'd really like if swift-format could stop doing it. It's not a line-length issue: my max length is set at 120 and the original doesn't get anywhere near that.
The text was updated successfully, but these errors were encountered: