reqloom lint
Validates a project and dry-runs every operation. No HTTP requests are sent, no secrets are read from your keychain, so it’s safe in CI and safe offline.
reqloom lint [--project <path>]--project defaults to the current directory. It takes no other flags —
unknown arguments are silently ignored rather than rejected, and there is no
lint --help. reqloom lint --format json runs a perfectly normal lint and
throws the flag away.
A clean run
Section titled “A clean run”reqloom lint --project samples/marketplaceLINT OK — 3 actors, 5 resources, 27 operations. No errors.Those counts are the fastest way to confirm the parser sees what you think it
sees. If a resource you just added isn’t in the total, its file isn’t being
imported — check the imports: globs.
Exit code is 0.
What it checks
Section titled “What it checks”Lint does more than parse YAML. After loading the schema it resolves a chain for every operation in dry-run mode, which is what catches dependency problems a pure syntax check would miss:
- YAML syntax across the root file and every imported file
- Schema version — must be 1–3
- Reference targets — every
{{X.y}}names a real actor, resource, environment variable, or secret depends_ontargets exist as operations- No dependency cycles
- Every operation’s chain resolves to an executable order
Undefined reference
Section titled “Undefined reference”LINT FAIL [E_REF_UNDEFINED]: Operation 'order.get' references undefined symbol'invoice.invoice_id': no actor, resource, env, or secret named 'invoice'Missing dependency
Section titled “Missing dependency”LINT FAIL [E_REF_UNDEFINED]: Operation 'order.one' declares depends_on 'ghost.op',which is not a defined operationLINT FAIL [E_CYCLE]: Circular dependency detected: order.one → order.twoUnsupported version
Section titled “Unsupported version”LINT FAIL [E_SCHEMA_VERSION]: Unsupported schema version 9 (supported: 1–3).Run `reqloom migrate` to upgrade.Any failure is exit code 1. Per-operation failures are listed individually,
then totalled:
ERROR order.pay: [E_VAR_UNRESOLVED] Required variable couldn't be substituted
LINT FAILED — 1 error(s).What it does not check
Section titled “What it does not check”Lint validates structure, not correctness against a live API. Four gaps are worth knowing, because each produces a green lint and a red run.
Also invisible to lint:
- Whether the API behaves. Wrong paths, wrong bodies, and wrong
expect_statusvalues all lint clean and fail on first contact. - Misspelled keys. The parser ignores keys it doesn’t recognise, so
expect_stats: 200ordependson:is silently dropped. See common pitfalls. - Whether secrets exist. Dry runs deliberately skip the keychain, so a
missing
!secretentry only appears at run time.
Lint is fast and needs no network, so run it on every push before any real requests:
- name: Validate schema run: reqloom lint --project api-testsAs a pre-commit hook:
#!/usr/bin/env bashset -euo pipefailreqloom lint --project api-testsBecause a broken invocation and a broken schema both exit non-zero here (lint
can’t return 2), a failing hook always means the schema needs attention.
- Common pitfalls — the silent failures lint won’t catch
- Error codes — what each
E_*means reqloom run— execute the chain once it lints clean