mix foundry.lint.all (Foundry v0.4.0)

Copy Markdown View Source

Runs the full Foundry lint suite against all compiled modules and the project manifest. Emits a JSON report and exits non-zero if any :error severity violations are found.

Usage

mix foundry.lint.all
mix foundry.lint.all --json
mix foundry.lint.all --format=text      # human-readable summary

Exit codes

  • 0 — no :error violations (warnings and info are non-blocking)
  • 1 — one or more :error violations found
  • 2 — lint runner itself failed (bug in a rule or runner crash)

CI integration

Add to your CI pipeline:

- run: mix foundry.lint.all

The lint report is emitted to stdout. CI systems can capture it for artefact upload. Violations are printed in a stable order (by file path, then rule ID) so diffs between CI runs are meaningful.

Violations

Violations are sorted: errors first, then warnings, then info. Within each severity, sorted by module name then rule_id.

JSON output shape

Matches Foundry.Lint.LintReport. The passed field is true iff error_count == 0.

Summary

Functions

Run lint for the given project root and args. Separated from run/1 so tests can call this without triggering Mix.Task.run("app.start") / Mix.Sync.PubSub. Returns the Foundry.Lint.LintReport struct. Does NOT call exit/1 — that is the responsibility of the caller (run/1).

Functions

run_lint(project_root, args \\ [])

Run lint for the given project root and args. Separated from run/1 so tests can call this without triggering Mix.Task.run("app.start") / Mix.Sync.PubSub. Returns the Foundry.Lint.LintReport struct. Does NOT call exit/1 — that is the responsibility of the caller (run/1).