Skip to content

Add swift format lint to CI #1165

In progress
In progress

Description

@Skeyelab

Run swift format lint (it comes with the Swift toolchain, so no new dependency) on App/ and Packages/ in CI.

  1. Add a .swift-format config that matches the current code. Line length is about 130, since some lines already pass 120.
  2. Add it as a warn-only CI step first.
  3. Clean up the existing warnings, then make the step blocking.

Came up while working on #1159.

Activity

  1. added this to the Code health milestone on Nov 8, 2026
  2. added
    P3
    on Nov 8, 2026
  3. added
    ready-for-agent
    on Nov 22, 2026
  4. Skeyelab commented on Dec 3, 2026

    @Skeyelab
    MemberAuthor

    PR #1300 adds swift format lint to CI and verify.sh, rules only. This issue stays open for what it leaves out:

    • Layout is not checked. The lint runs with --debug-disable-pretty-print, so indentation, line breaks and line length (130 is in .swift-format but not enforced) are skipped. With the tuned config about 3,200 layout findings remain, from hand layout that swift-format has no setting for.
    • Four rules are off because the code breaks them widely. Each could be turned on in its own PR: NoAccessLevelOnExtensionDeclaration (7 places), OneVariableDeclarationPerLine (161), OrderedImports (218, mostly @testable import listed first), DoNotUseSemicolons (820).
    • A full reformat with this config would change 276 of 422 files (about 2,700 lines removed, 5,600 added) and split the one-line statements the code uses on purpose. Treat it as a style decision, not cleanup.

    Counts are from the default-config run on 2026-12-03 (swift-format 6.3.0 in CI, 6.4.3 locally).

    🤖 Generated with Claude Code

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

    P3ready-for-agent

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions