# swiftlang/swift-format

Formatting technology for Swift source code

Repository: https://github.com/swiftlang/swift-format
Canonical: https://ross.abutalabs.com/products/swift-format
Language: Swift
License: Apache-2.0
License Family: permissive
Last push: 2026-08-25T07:36:58+00:00

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

## Adoption (not part of the score)
Stars 2952, forks 286 (observed 2026-08-28T04:07:32.056640+00:00)

## What it is
swift-format is the official Swift source code formatter, providing formatting technology used by SourceKit-LSP. It can be used as a command line tool or linked into other applications as a Swift Package Manager dependency via its API.

## Use cases
- format swift source code
- enforce consistent swift style across a codebase
- integrate swift formatting into an editor or lsp
- run swift code style checks in ci
- build custom swift code transformation tools

## When to choose
- you write Swift and want automatic, consistent formatting
- you need formatter integration with SourceKit-LSP or Xcode tooling
- you want to build tooling on top of a Swift syntax formatter API

## When to avoid
- you need a formatter for languages other than Swift
- you require a fully agreed-upon official Swift style guide, which does not yet exist
- you are on Swift 5.7 or earlier and cannot match toolchain versions

## Facets
- artifact type: cli-tool
- maturity: active
- function: formatter, parser, developer-tools
- domain: developer-tools, programming-languages, text-editors
- platform: cli
- tags: swift, code-formatting, swiftsyntax, sourcekit-lsp, style-guide, macos, linux

## Member repositories
- swiftlang/swift-format (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:32.056640+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-30T07:32:39.008833+00:00, confidence not recorded.
  - readme: https://github.com/swiftlang/swift-format (fetched 2026-08-28T04:07:32.056640+00:00, sha c7f7bf083cbe)
- Data as of 2026-08-30T08:39:29.467469+00:00.
