Closed calda closed 3 years ago
I noticed a regression in the indent rule, following multi-line argument values in method calls:
indent
enum Namespace { class ContentPresenter { func makeEpoxyModel() -> EpoxyModeling { LegacyEpoxyModelBuilder<BasicRow>( dataID: DataID.dismissModalBody.rawValue, content: .init(titleText: content.title, subtitleText: content.bodyHtml), style: Style.standard .with(property: newValue) .with(anotherProperty: newValue)) .with(configurer: { view, content, _, _ in view.setHTMLText(content.subtitleText?.unstyledText) }) .build() } } }
swiftformat . --rules indent --indent 2
0.48.12
enum Namespace { class ContentPresenter { func makeEpoxyModel() -> EpoxyModeling { LegacyEpoxyModelBuilder<BasicRow>( dataID: DataID.dismissModalBody.rawValue, content: .init(titleText: content.title, subtitleText: content.bodyHtml), style: Style.standard .with(property: newValue) .with(anotherProperty: newValue)) .with(configurer: { view, content, _, _ in // four levels of unexpected indentation view.setHTMLText(content.subtitleText?.unstyledText) }) .build() } } }
This doesn't happen if I replace:
style: Style.standard .with(property: newValue) .with(anotherProperty: newValue))
with just style: style).
style: style)
@calda it looks like this was introduced in 0.48.5.
@calda fixed in 0.48.14
Thanks!
I noticed a regression in the
indent
rule, following multi-line argument values in method calls:Before
After running
swiftformat . --rules indent --indent 2
in0.48.12
This doesn't happen if I replace:
with just
style: style)
.