Skip to content

Drop the config that 0.16.0 and swift-format already say - #332

Merged
3lvis merged 1 commit into
masterfrom
elvis/config-after-0-16-0
Sep 16, 2026
Merged

3lvis merged 1 commit into
masterfrom
elvis/config-after-0-16-0

Conversation

@3lvis

@3lvis 3lvis commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Why

Three .swift-format keys and four .oida.yml entries repeat what the tools already say on their own. maximumBlankLines: 1, respectsExistingLineBreaks: true and lineBreakBeforeEachArgument: false are swift-format's own defaults. unneeded_override, force_cast and force_try became default-on rules in oida 0.16.0, so listing them under opt_in_rules asks for what is already running.

opening_brace's ignore_multiline_function_signatures is the one that changes code. It let a wrapped signature keep its brace on a line of its own; with it gone, the brace joins the closing paren — ) async throws -> HTTPExchange { — which is the shape swift-format emits anyway. Six files picked that up from bin/lint --fix.

Config left: four keys in .swift-format, and one key under opening_brace that stays load-bearing — a multi-line if or guard still wants its brace below the conditions, so the body reads as the body.

The approach

Measured rather than reasoned. Formatting master's whole tree with the six-key config and with the pruned one gives byte-identical output, and the 0.16.0 rule table reports all three opt-ins as opt-in: no, enabled: yes after their removal.

Testing

make test (180 tests, green) plus bin/lint --check clean.

Learnings

Little — the tools' own defaults were the whole answer.

@3lvis
3lvis marked this pull request as ready for review September 16, 2026 20:13
@3lvis
3lvis merged commit 6948456 into master Sep 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant