Skip to content

swiftformat version sync #16

Description

@AlexAxthelm

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions