---
name: scalafmt
description: "Use when adopting Scalafmt to assess this standard: Format Scala across supported dialects"
---

# Apply Scalafmt

Pin a formatter version and choose the Scala dialect for each source tree. Verify formatting before review to keep semantic changes visible.

## Procedure

1. Inspect the repository configuration and identify the files or targets covered by Scalafmt.
2. Use Scalafmt in this repository to meet this standard: Format Scala across supported dialects. Pin a formatter version and choose the Scala dialect for each source tree. Verify formatting before review to keep semantic changes visible. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.
3. Record the tool version, configuration, scope and findings. Explain any checks that could not run.
4. Use the same invocation after changes and compare the evidence against the baseline.

Refer to [the upstream documentation](https://scalameta.org/scalafmt/) for configuration and prerequisites.

## Tool invocation

```
scalafmt --test
```
