check: Split out new swift_format suite; run it on macOS/ files too#2333
Open
chrisbobbe wants to merge 3 commits into
Open
check: Split out new swift_format suite; run it on macOS/ files too#2333chrisbobbe wants to merge 3 commits into
swift_format suite; run it on macOS/ files too#2333chrisbobbe wants to merge 3 commits into
Conversation
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.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As I mentioned in #2307 (review), here's a followup for a few improvements to the iOS-in-CI checks we landed in #2307.