# scalameta/scalafmt

Code formatter for Scala

Repository: https://github.com/scalameta/scalafmt
Canonical: https://ross.abutalabs.com/products/scalafmt
Homepage: http://scalameta.org/scalafmt
Language: Scala
License: Apache-2.0
License Family: permissive
Topics: scala, formatter
Last push: 2026-08-16T23:57:04+00:00

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

## Adoption (not part of the score)
Stars 1488, forks 289 (observed 2026-08-28T04:04:52.099358+00:00)

## What it is
Scalafmt is a code formatter for Scala that enforces consistent style across a codebase. It is configurable via a .scalafmt.conf HOCON file and integrates with editors (IntelliJ, VS Code via Metals) and build tools (sbt, Maven, Gradle, Mill).

## Use cases
- format scala code consistently across a team
- enforce code style in scala projects
- format on save in intellij or vs code
- run formatter from sbt or maven build
- reduce style debates in code review
- configure max line width and alignment rules
- format scala code from the terminal

## When to choose
- you write Scala and want automatic, configurable code formatting
- your team wants a single shared style enforced by tooling
- you use sbt, Maven, Gradle, Mill, IntelliJ, or Metals and want integrated formatting

## When to avoid
- you need to format non-Scala languages (use Prettier or language-specific formatters)
- you need range/selection formatting rather than whole-file formatting
- your project uses a legacy Scala version unsupported by current dialects

## Facets
- artifact type: cli-tool
- maturity: stable
- function: formatter, developer-tools, code-review, cli
- domain: programming-languages, developer-tools, version-control
- platform: jvm, cli, cross-platform, editor-plugin
- tags: scala, code-formatting, sbt-plugin, hocon-config, intellij, vs-code, maven, gradle, mill, command-line

## Member repositories
- scalameta/scalafmt (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:52.099358+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-30T04:33:45.603286+00:00, confidence not recorded.
  - readme: https://github.com/scalameta/scalafmt (fetched 2026-08-28T04:04:52.099358+00:00, sha 9fd57438f369)
  - homepage: http://scalameta.org/scalafmt (fetched 2026-08-29T11:39:50.049684+00:00, sha 5dd0f70aff82)
  - site_page: http://scalameta.org/scalafmt/docs/installation (fetched 2026-08-29T11:39:50.058589+00:00, sha 81188e91a9a6)
  - site_page: http://scalameta.org/scalafmt/docs/configuration (fetched 2026-08-29T11:39:50.061456+00:00, sha 851b4f612344)
  - site_page: http://scalameta.org/scalafmt/docs/contributing-scalafmt (fetched 2026-08-29T11:39:50.063891+00:00, sha 38d74504a5de)
- Data as of 2026-08-30T08:39:29.467469+00:00.
