mix quality (ExQuality v0.5.0)

View Source

Runs code quality checks in parallel with actionable feedback.

Automatically fixes formatting issues, then runs all analysis stages in parallel with streaming output.

Execution Phases

  1. Auto-fix - Runs mix format to fix formatting
  2. Compile - Compiles dev + test environments in parallel
  3. Analysis - Runs enabled checks in parallel (credo, dialyzer, doctor, tests)

Usage

mix quality

Options

  • --quick - Quick mode for development: skips dialyzer and coverage enforcement
  • --skip-dialyzer - Skip Dialyzer type checking
  • --skip-credo - Skip Credo static analysis
  • --skip-doctor - Skip Doctor documentation checks
  • --skip-gettext - Skip Gettext translation checks
  • --skip-dependencies - Skip dependency checks (unused deps and security audit)
  • --verbose - Show full output even on success

Passing Test Options

You can pass extra arguments to mix test or mix coveralls using --:

mix quality -- --only integration
mix quality --quick -- --include slow --seed 0

Arguments after -- are passed directly to the test command.

Alternatively, configure test args in .quality.exs:

test: [
  args: ["--only", "integration"]
]

CLI args (after --) override config file args (no merge).

Auto-Detection

Stages are automatically enabled based on installed dependencies:

  • :credo → enables Credo stage
  • :dialyxir → enables Dialyzer stage
  • :doctor → enables Doctor stage
  • :gettext → enables Gettext translation checks
  • :mix_audit → enables security audit in Dependencies stage
  • :excoveralls → uses mix coveralls instead of mix test

Quick Mode

Use --quick during active development when you haven't finished all implementation tasks (like writing tests). Quick mode:

  • Skips Dialyzer (slow)
  • Runs mix test instead of mix coveralls (tests must pass, but coverage threshold is not enforced)

This lets you iterate quickly while still catching obvious issues.

Configuration

Create .quality.exs in your project root to customize behavior or override auto-detection. See Config for options.

Example Output

Running quality checks...

 Format: No changes needed (0.1s)
 Compile: dev + test compiled (warnings as errors) (1.8s)

Running analysis stages in parallel...

 Credo: No issues (1.2s)
 Tests: 248 passed, 0 failed, 87.3% coverage (5.2s)
 Dialyzer: No warnings (32.1s)

 All quality checks passed!

Summary

Functions

Runs the quality check task.

Functions

run(args)

Runs the quality check task.