Check, fix, format
zz check
Section titled “zz check”zz checkzz check src/main.zzzz check src/zz check --stats src/main.zz # modules, cache hits, seed size, wall timezz check --format json # machine diagnostics, exit codes unchangedFlags: --fix/-f safe fixes, --hard all incl. ambiguous, --interactive/-i
prompt for ambiguous. zz check --check is rejected — use zz fmt --check.
Cold single file is ~40ms; warm is cache-served (0 checked). Budget: p50 ≤0.5s
on 10k-line cold, ≤50ms warm per file. Verify with --stats twice (second shows cached).
zz fix
Section titled “zz fix”Shortcut for zz check --fix:
zz fix src/zz fix --hard src/zz fmt
Section titled “zz fmt”zz fmtzz fmt src/main.zzzz fmt -c src/ # dry run, exit 1 if changedzz fmt src/Diagnostics shape
Section titled “Diagnostics shape”error[E001]: type mismatch --> src/main.zz:5:12 | 5 | x: int = "hello" | ---- ^^^^^^^^ expected int, found str | = help: cast string to int with `int()` functionEvery pass reports all errors, not just the first. Source context + span +
code + help. Warnings (W001 unused var) carry = fix: lines zz fix applies.
File loading: std.* from stdlib, .name from current dir,
utils.helper relative to importer, <pkg>.path to <root>/src/path.zz
from anywhere (incl. tests/ → src/). Precedence std > package > registry >
relative. Circular imports error with a restructure hint (extract shared c.zz).
One file under several namespaces composes (first wins canonical); two files
under one namespace stay an error.
Common fixes: see Error catalog.