Testing

Check rules

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.

Walk and match --fix otherwise yes no .vary source Parse to AST Emit diagnostic Auto-fixavailable? Rewrite source Report to terminal or JSON WALK Registered rules Rule matchesnode?
Walk and match --fix otherwise yes no .vary source Parse to AST Emit diagnostic Auto-fixavailable? Rewrite source Report to terminal or JSON WALK Registered rules Rule matchesnode?
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

Rule categories

Rules are grouped by category and identified by stable IDs. The prefix indicates the category.

PrefixCategoryFocus
VCIIdiomsIdiomatic Vary style
VCCContractsContract usage and quality
VCTTestingTest coverage and assertion strength
VCMMutationMutation-testing readiness
VCSSafetySide effects in logic
VCAAPIEffect boundaries and capability enforcement
VCLStructureProject-level architectural violations
VCGGreat codeDesign smells surfaced by vary check --great-code

Find a rule or workflow

PageWhat it covers
IdiomsOptional values, return shapes, and other Vary style rules
Contracts, tests, and mutationMissing or weak contracts and tests, plus mutation readiness
Safety and designEffects, APIs, project structure, and great-code rules
Using vary checkFlags, JSON output, CI profiles, repair plans, and auto-fix

To inspect any rule from the command line, run vary check --explain VCI001.

Check rules: idioms →