| Flag | Description |
|---|---|
-v, --verbose | Verbose output |
-s, --summary | One line per file |
-W, --warnings | Warning mode: all (default), none, error |
--fix, --fix-safe | Apply safe auto-fixes in place |
--category | Filter rules by category (repeatable) |
--rule | Filter rules by ID (repeatable) |
--json | Machine-readable JSON output |
--explain [RULE] | Explain a rule by ID or name; omit value to list all rules |
--profile | Check profile: ci, local, great-code, or great-tests |
--plan | Output an ordered repair plan |
--group | Group output by priority (default) or file |
--max-findings N | List only the N most important findings. Mechanical findings (those with a fix) are counted in one line, not listed |
--json gives every finding four fields beyond the message and span:
| Field | Meaning |
|---|---|
rank | 0 correctness and safety, 1 contracts and testing, 2 mutation readiness, 3 mechanical style, 4 judgment style. Lower is more important |
blocking | true for an error |
mechanical | true when a fix exists, so applying it is the whole job |
verify | The command that shows the finding is resolved |
Each fix carries its edits as file, range and replacement, the same edits --fix applies, so one finding can be applied without applying all.
With --max-findings N the top N non-mechanical findings are listed in source order, a budget block (max, shown, omitted, mechanical) says what was left out, and the summary counts still cover every finding:
vary check src/ --json --max-findings 5
Show why a rule exists, what it detects, and how to fix findings:
vary check --explain VCI001
vary check --explain # list all rules
This prints the same rationale as vary explain VCI001 but scoped to check rules.
Generate an ordered plan showing which findings have safe fixes and in what order to apply them:
vary check src/ --plan
The plan groups fixes by file and respects dependency order (e.g., import additions before the code that uses them).
The ci profile switches to JSON output and treats warnings as errors, suitable for CI pipelines:
vary check src/ --profile ci
You can also set this in vary.toml:
[check]
profile = "ci"
Run only idiom rules:
vary check src/ --category idioms
Run a single rule:
vary check src/ --rule VCI001
Combine multiple categories:
vary check src/ --category idioms --category contracts
Rules marked with auto-fix support can be applied automatically:
vary check src/ --fix
Only fixes marked SAFE are applied. The command reports how many fixes were applied and how many were skipped due to conflicts.