# `mix erlfmt`
[🔗](https://github.com/genericjam/mob/blob/master/lib/mix/tasks/erlfmt.ex#L1)

Format `.erl` files (or check formatting with `--check`).

Wraps `erlfmt`'s library API. Exists because the upstream `erlfmt` Hex package
ships an escript build but no `mix` task; the project's pre-commit checklist
(`CLAUDE.md`) references `mix erlfmt --check src/` so this task makes that
instruction actually work.

## Usage

    mix erlfmt --check src/         # exit 0 if clean, exit 1 if any file would change
    mix erlfmt --write src/         # rewrite files in place

Either `--check` or `--write` is required. Paths can be files or directories;
directories are walked for `*.erl` files.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
