Skip to content

Strip trailing whitespace from packages/ios-client - #294

Merged
majkpal merged 1 commit into
software-mansion:mainfrom
majkpal:fix/ios-client-swift-format-lint
Aug 31, 2026
Merged

majkpal merged 1 commit into
software-mansion:mainfrom
majkpal:fix/ios-client-swift-format-lint

Conversation

@majkpal

@majkpal majkpal commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

yarn lint:check runs swift-format lint -s for the ios-client workspace, and under -s (strict) TrailingWhitespace is an error rather than a warning. 26 lines across four files trip it, so the all_packages_lint job fails.

This is on main, not introduced by any open PR — it currently fails CI on every one of them. Reproduced on a clean origin/main checkout: 26 errors, exactly the set CI reports.

Sources/ios-client/Capturers/BroadcastScreenShareCapturer.swift:100:1: error: [TrailingWhitespace] …
Sources/ios-client/ClientBase.swift:111:1: error: [TrailingWhitespace] …
… 24 more, in ClientBase.swift, WhepClient.swift and WhipClient.swift

The fix is just the workspace's own yarn lint (swift-format format -i) — no hand edits.

Why this is safe

  • git diff -w on the commit is empty: nothing but whitespace changed.
  • Every one of the 26 removed lines was blank apart from its trailing spaces, so nothing touches a string literal or any token. Compilation cannot be affected.
  • After it, swift-format lint -r -s ./Sources --configuration swift-format-config.json reports 0 errors.

Why examples/ios was never affected

The ios_lint workflow runs swift-format format -i before swift-format lint, so it silently fixes the tree in the runner and then lints the fixed copy. Only all_packages_lint, which goes through yarn lint:check, actually enforces this — and it only covers packages/ios-client.

Worth considering separately: having ios_lint format-then-lint means it can never fail on formatting, which is presumably not the intent.

Merge order

Kept standalone and based directly on main so it can go in ahead of #291, #292 and #293 — all three go green once they pick it up. Happy to cherry-pick it into #291 instead if you would rather not have a fourth PR.

🤖 Generated with Claude Code

`yarn lint:check` runs `swift-format lint -s`, where TrailingWhitespace is
an error, and 26 lines across four files trip it. This is what the
workspace's own `yarn lint` (`swift-format format -i`) produces, and the
change is whitespace-only - `git diff -w` is empty.

The failure is on main, so it currently fails the all_packages_lint job on
every open pull request. `examples/ios` is unaffected because the ios_lint
workflow runs the formatter before linting, so it fixes itself in the
runner.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@majkpal
majkpal merged commit 9972b34 into software-mansion:main Aug 31, 2026
2 checks passed
@majkpal
majkpal deleted the fix/ios-client-swift-format-lint branch August 31, 2026 09:14
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