# nicklockwood/SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code

Repository: https://github.com/nicklockwood/SwiftFormat
Canonical: https://ross.abutalabs.com/products/swiftformat
Language: Swift
License: MIT
License Family: permissive
Last push: 2026-08-23T18:01:16+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 92, longevity 100
- inputs: {"age_days": 3663, "days_push": 10, "days_rel": 57, "gap_med": 10, "n_releases_24m": 34}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8921, forks 696 (observed 2026-08-28T04:10:26.300850+00:00)

## What it is
SwiftFormat is a command-line tool and library for reformatting Swift code on macOS, Linux, and Windows. It also ships as an Xcode source editor extension and integrates with editors, CI, and build systems to enforce consistent Swift style.

## Use cases
- format swift code from the command line
- enforce consistent swift style across a team
- run swift formatting in a git pre-commit hook or CI
- format swift code inside xcode via an editor extension
- lint swift code for style violations
- remove redundant parentheses and implicit self automatically

## When to choose
- you write Swift and want automated, opinionated code formatting
- you need formatter integration with Xcode, VSCode, CI, or git hooks
- you want style fixes beyond whitespace, like implicit self removal

## When to avoid
- you need formatting for languages other than Swift
- you only want linting without auto-fixing

## Facets
- artifact type: cli-tool
- maturity: active
- function: formatter, linter, cli, developer-tools
- domain: developer-tools, programming-languages, text-editors
- platform: windows, cli, editor-plugin
- tags: swift, code-formatting, xcode-extension, code-style, command-line, macos, linux

## Member repositories
- nicklockwood/SwiftFormat (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:26.300850+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:24:33.174017+00:00, confidence not recorded.
  - readme: https://github.com/nicklockwood/SwiftFormat (fetched 2026-08-28T04:10:26.300850+00:00, sha 9ef9c73b67de)
- Data as of 2026-08-30T08:39:29.467469+00:00.
