The following input (reduced from generated code, don't blame me)
struct Outer {
func test() {
let ffiStructKeepAlive: (FixedByteArrayConverter<FixedByteArrayHelper15>.KeepAlive?, IdentityConverter<Int32>.KeepAlive?, )? = (media_id_keepalive != nil || cdn_keepalive != nil || false) ? (media_id_keepalive, cdn_keepalive,) : nil
}
}
formats to
struct Outer {
func test() {
let ffiStructKeepAlive:
(FixedByteArrayConverter<FixedByteArrayHelper15>.KeepAlive?, IdentityConverter<Int32>.KeepAlive?, )? =
(media_id_keepalive != nil || cdn_keepalive != nil || false) ? (media_id_keepalive, cdn_keepalive,)
: nil
}
}
but if you run it through the formatter again you get
struct Outer {
func test() {
let ffiStructKeepAlive:
(FixedByteArrayConverter<FixedByteArrayHelper15>.KeepAlive?, IdentityConverter<Int32>.KeepAlive?, )? =
(media_id_keepalive != nil || cdn_keepalive != nil || false)
? (media_id_keepalive, cdn_keepalive,)
: nil
}
}
Our .swift-format:
{
"version": 1,
"lineLength": 120,
"indentation": { "spaces": 4 },
"indentConditionalCompilationBlocks": false,
"lineBreakBeforeEachArgument": true,
"lineBreakBetweenDeclarationAttributes": true,
"prioritizeKeepingFunctionOutputTogether": true
}
The following input (reduced from generated code, don't blame me)
formats to
but if you run it through the formatter again you get
Our .swift-format:
{ "version": 1, "lineLength": 120, "indentation": { "spaces": 4 }, "indentConditionalCompilationBlocks": false, "lineBreakBeforeEachArgument": true, "lineBreakBetweenDeclarationAttributes": true, "prioritizeKeepingFunctionOutputTogether": true }