---
name: kotlin-ktlint
description: "Use when adopting ktlint to assess this standard: Verify Kotlin formatting from EditorConfig"
---

# Apply ktlint

Declare the Kotlin code style and EditorConfig settings for each module. Run the formatter's check mode with the version pinned in the build.

## Procedure

1. Inspect the repository configuration and identify the files or targets covered by ktlint.
2. Use ktlint in this repository to meet this standard: Verify Kotlin formatting from EditorConfig. Declare the Kotlin code style and EditorConfig settings for each module. Run the formatter's check mode with the version pinned in the build. 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://pinterest.github.io/ktlint/) for configuration and prerequisites.

## Tool invocation

```
ktlint
```
