vary check is a rule-based diagnostic engine that catches non-idiomatic patterns, missing contracts, weak tests, and mutation-unfriendly code before you run vary mutate.
vary check src/main.vary
vary check src/
vary check src/ --fix
vary check src/ --category idioms
vary check src/ --rule VCI001
vary check src/ --json
Rules are grouped by category and identified by stable IDs. The prefix indicates the category.
| Prefix | Category | Focus |
|---|---|---|
VCI | Idioms | Idiomatic Vary style |
VCC | Contracts | Contract usage and quality |
VCT | Testing | Test coverage and assertion strength |
VCM | Mutation | Mutation-testing readiness |
VCS | Safety | Side effects in logic |
VCA | API | Effect boundaries and capability enforcement |
VCL | Structure | Project-level architectural violations |
VCG | Great code | Design smells surfaced by vary check --great-code |
| Page | What it covers |
|---|---|
| Idioms | Optional values, return shapes, and other Vary style rules |
| Contracts, tests, and mutation | Missing or weak contracts and tests, plus mutation readiness |
| Safety and design | Effects, APIs, project structure, and great-code rules |
Using vary check | Flags, JSON output, CI profiles, repair plans, and auto-fix |
To inspect any rule from the command line, run vary check --explain VCI001.