Releases: toba/swiftiomatic
Releases · toba/swiftiomatic
Release list
v3.14.14
v3.14.13
- stop three lint rules misfiring on legitimate idioms (xylem SAX parser)
v3.14.12
- fix three rule bugs surfaced by the upstream SwiftFormat cite review
v3.14.11
- port upstream swift-format bugfixes into local rule equivalents
v3.14.10
- port swift-format #1225 and #1227 if-config layout fixes
v3.14.9
- fix absolute exclude patterns silently failing under macOS /private firmlinks
v3.14.8
- fix formatter stranding trailing commas (
, ), )) when collapsing a nested call passed as the sole argument of an outer call (built.append(try Thing(...))). The brm-7t3 isSoleCallArgumentOfOuterCall path sets ignoreDiscretionary to collapse the inner call with its parent, but the closing-paren break was elective (so ) hugged the last argument when only partially collapsed) and the user's trailing commas were emitted verbatim under keptAsWritten + non-collection — falling through to commaDelimitedRegionEnd's unconditional else-if-hasTrailingComma branch. Three coordinated fixes: (1) arrangeFunctionCallArgumentList now forces .close(mustBreak:) when ignoreDiscretionary is in effect and the last argument carries a trailing comma (excluding array/dict/closure compact args, which keep hugging ]) / }) ), making the collapse all-or-nothing — fits on one line, or stays wrapped with ) on its own line so each comma is followed by a newline; gated on a trailing comma so the common no-comma case still hugs (for: absolute)) ). (2) LayoutCoordinator's keptAsWritten/non-collection comma-region branch now only writes the preserved comma while the region is still multiline, dropping the stray comma on a single-line collapse (whitespace-only mode unchanged). (3) the .break(.same) after the last argument's trailing comma uses size 0, removing the residual space before ) (b: 2 )) without affecting newline behavior. Adds regression tests nestedCallCollapseDoesNotStrandTrailingCommas / nestedCallFullCollapseDropsTrailingComma; full suite green (3466 passed); output idempotent (2q7-lql / #739)
v3.14.7
- fix nestedCallLayout inline mode expanding a SwiftUI modifier-chain call argument instead of inlining it; when the outer call is a modifier-chain element its calledExpression is the whole multiline chain (Text(name)…onHover{…}.background), so the inline strategies mis-measured — calledExpression.trimmedDescription carried the chain's newlines and columnOffset/lineIndentation anchored on the chain root (Text, col 8) rather than the modifier segment (.background, col 12) — making every inline strategy look too wide and falling through to Strategy 3, which expands the call. transform now detects a multiline callee (calleeSpansMultipleLines) and routes such calls away from the chain-rebuild strategies into tryInlineModifierCallArgument, which collapses the argument list inline (collapseCallArguments) when the .method(args) segment fits at its real rendered column (anchored on the member-access period); bails on trailing closures, comments, an already-inline body, a non-member-access callee, or a segment that wouldn't fit, and anchors the finding on the modifier name. wrap mode (and non-member-access multiline callees) now leave the call unchanged instead of mangling it. Adds regression tests modifierChainCallArgumentCollapsesInline / modifierChainCallArgumentAlreadyInlineUnchanged; full suite green (3464 passed); verified end-to-end on the real thesis FontPicker.swift with nestedCallLayout: inline (prs-zf4 / #738)
v3.14.6
- fix assignment RHS member chain wrapped in a binary op (chain.max() ?? 1) breaking after = when already wrapped at its dots; the base should stay on the = line. shouldRetargetChainHeadCloseForAssignmentRHS only walked up through assignment operators, so for a chain that is the left operand of a non-assignment infix (??) the walk stopped at the InfixOperatorExpr and returned false; the chain head's .open group then closed after children.filter instead of after the base children, inflating the = break's chunk to span the whole chain (token-stream Length 116 vs 4 for a pure chain) so the forced inner dot-breaks dragged the = break along. Now the walk treats a non-assignment infix as transparent when the chain is its left operand and keeps climbing to find the enclosing assignment/binding, so the head group closes after the base and the = break stays bounded. Adds regression test assignmentChainWithNilCoalescingKeepsBaseOnEqualLine; full suite green (3462 passed); verified end-to-end on the real thesis MockNode.swift at lineLength 100 (gl8-vhc / #737)
v3.14.5
- fix SortImports dropping a shebang's trailing newline when reordering imports (port swift-format #1207); SortImports.visit(_:) now restores the shebang's leading newlines after reordering, gated on node.shebang != nil and a leadingNewlineCount before/after comparison, so the file header or first import no longer gets pulled up onto the #! line; adds leadingNewlineCount(of:) helper and regression tests shebangWithFileHeaderAndImport / shebangWithReorderedImports (egt-9i9 / #736)