Problem
swiftformat is installed with brew install swiftformat (latest) in CI, but
nothing is pinned locally. When Homebrew's stable moves ahead, CI's swiftformat
outruns local installs and the Format Check / swiftformat job fails on code
that make swift-format-check passes locally — an invisible-locally failure.
This just happened: the CI runner had 0.63.0 (released 2026-08-30) while a
local machine had 0.62.1. In 0.63.0, redundantReturn newly strips return
from single-statement closures with an explicit return type, so it flagged
iOS/Pollux/DatabaseManager.swift (untouched by the PR) while local checks were
clean.
Goal
Pin swiftformat to a single known version shared by CI and local, so formatting
is deterministic and version bumps are deliberate (a reviewable PR, not a silent
runner-image update).
Proposed
- Pin CI to a specific swiftformat version (currently recent: 0.63.0) instead
of brew-latest — install the pinned release binary directly or via a
version-pinning step, rather than brew install swiftformat.
- Record the pinned version where local installs can match it (a note in
docs/HACKING.md and/or a .swiftformat-version file), plus the bump steps.
- Do the same for swiftlint (also brew-latest) to avoid the same class of drift.
Acceptance criteria
- CI uses a pinned swiftformat version; bumping it is an explicit PR.
make swift-format-check locally and the CI job agree for the pinned version.
- HACKING/docs state the version and how to install/upgrade it.
Context
Problem
swiftformat is installed with
brew install swiftformat(latest) in CI, butnothing is pinned locally. When Homebrew's stable moves ahead, CI's swiftformat
outruns local installs and the
Format Check / swiftformatjob fails on codethat
make swift-format-checkpasses locally — an invisible-locally failure.This just happened: the CI runner had 0.63.0 (released 2026-08-30) while a
local machine had 0.62.1. In 0.63.0,
redundantReturnnewly stripsreturnfrom single-statement closures with an explicit return type, so it flagged
iOS/Pollux/DatabaseManager.swift(untouched by the PR) while local checks wereclean.
Goal
Pin swiftformat to a single known version shared by CI and local, so formatting
is deterministic and version bumps are deliberate (a reviewable PR, not a silent
runner-image update).
Proposed
of brew-latest — install the pinned release binary directly or via a
version-pinning step, rather than
brew install swiftformat.docs/HACKING.mdand/or a.swiftformat-versionfile), plus the bump steps.Acceptance criteria
make swift-format-checklocally and the CI job agree for the pinned version.Context
separate from this issue.