Background
swift-format supports reflowing prose in some scenarios:
respectsExistingLineBreaks: false collapses manually-wrapped code that fits within lineLength
reflowMultilineStringLiterals does the same for multiline string literals.
Line comments should be supported too.
Current behavior
When respectsExistingLineBreaks == false and lineLength is permissive (e.g. 250), the formatter will collapse a hand-broken function call onto one line but leave this untouched:
// This comment was written at an 80-column
// terminal and never updated.
There is no existing rule or configuration flag for this. This results in inconsistent format when the project with wider line lengths use respectsExistingLineBreaks: false to collapse code
Background
swift-format supports reflowing prose in some scenarios:
respectsExistingLineBreaks: falsecollapses manually-wrapped code that fits withinlineLengthreflowMultilineStringLiteralsdoes the same for multiline string literals.Line comments should be supported too.
Current behavior
When
respectsExistingLineBreaks == falseandlineLengthis permissive (e.g. 250), the formatter will collapse a hand-broken function call onto one line but leave this untouched:There is no existing rule or configuration flag for this. This results in inconsistent format when the project with wider line lengths use
respectsExistingLineBreaks: falseto collapse code