# `GitHoox.Hooks.Format`
[🔗](https://github.com/sgerrand/git_hoox/blob/v0.5.0/lib/git_hoox/hooks/format.ex#L1)

Runs `mix format` against staged Elixir files.

## Options

  * `:check_only` — use `mix format --check-formatted`. Fails instead of mutating.
  * `:args` — extra CLI args appended after the task name (and the
    `--check-formatted` flag when `:check_only` is set). Default `[]`.

Argument order: `mix format [--check-formatted] <user_args...> -- <files...>`.
The `--` stops `mix format` parsing a `-`-prefixed filename as an option.

## Defaults

  * `stage_fixed: true`
  * `files: ~w(**/*.ex **/*.exs **/*.heex)` — matches root and nested paths.

---

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