GitHoox.Hooks.Format (GitHoox v0.5.0)

Copy Markdown View Source

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.