Runs all CI checks locally before committing.
This task runs the same checks that CI runs, helping you catch issues before pushing to GitHub.
Usage
mix precommit # Run all checks except Dialyzer
mix precommit --all # Run all checks including Dialyzer and coverageChecks performed
- Code formatting (
mix format) - Markdown formatting (
prettierfor docs/) - Format verification (
mix format --check-formatted) - Markdown format verification
- Compilation with warnings as errors
- Tests (
mix test) - Code quality (
mix credo --strict) - Documentation build (
mix docs) - Coverage report (
mix coveralls.html) - only with --all flag - Type checking (
mix dialyzer) - only with --all flag
Coverage reporting
When run with --all, the task will display the total code coverage percentage
and generate an HTML report in cover/excoveralls.html.
Exit codes
- 0: All checks passed
- 1: One or more checks failed