Skip to content

check: Split out new swift_format suite; run it on macOS/ files too#2333

Open
chrisbobbe wants to merge 3 commits into
zulip:mainfrom
chrisbobbe:pr-ios-in-ci-followups
Open

check: Split out new swift_format suite; run it on macOS/ files too#2333
chrisbobbe wants to merge 3 commits into
zulip:mainfrom
chrisbobbe:pr-ios-in-ci-followups

Conversation

@chrisbobbe
Copy link
Copy Markdown
Collaborator

As I mentioned in #2307 (review), here's a followup for a few improvements to the iOS-in-CI checks we landed in #2307.

The swift-format check previously lived inside run_ios, where
`tools/check --fix ios` would apply the formatting but then abort:
the leftover in-place changes tripped the later
check_no_uncommitted_or_untracked guard.

Move it into its own suite, in the shape of run_l10n and friends
(find, format, then a single trailing check_no_changes). Now
`tools/check --fix swift_format` works, and run_ios just checks for
automated changes from Flutter tooling and runs the build. This
resolves the suite's TODO.
Also format the hand-written macOS Swift sources, not just the iOS
ones.  Omit generated code: Pigeon output (*.g.swift) and the
Flutter plugin registrant, which on macOS is tracked and is not
named *.g.swift (unlike the gitignored iOS one).

Hoist the repeated pathspecs into a local swift_pathspecs array.
Wire the new suite into CI: exclude it from the Linux check job (it
needs macOS) and run it on the macOS job.

The iOS build takes several minutes, so run the fast swift-format
check as its own step first; a formatting nit then fails the job
before the build starts, helping us save GitHub Actions quota.
@chrisbobbe chrisbobbe requested a review from rajveermalviya June 3, 2026 04:27
@chrisbobbe chrisbobbe mentioned this pull request Jun 3, 2026
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