validate
validate <files…> reports whether each .feature is well-formed Gherkin and gates on the
result: exit 0 when every file parses, exit 1 when any fails. Each failure carries a line
number, message, and stable code. This is the CI/gate verb, distinct from
parse (which tolerates malformed files as error entries and still
exits 0).
gherkin-cli validate features/login.feature| Flag | Description |
|---|---|
--format <fmt> | Output format: toon (default) or json. |
Behavior
Section titled “Behavior”- Per file:
okplus anerrorslist of{line, message, code}. - Aggregate
summary {files, errors}. - Exit
0iff all files are valid;1otherwise. - An empty result states itself explicitly (
0 syntax errors across N file(s)) rather than emitting a blank success.
See also
Section titled “See also”- parse — project a suite into a compact digest.
- diff — classify scenario changes against a git ref.
- validate — the same check as an imported function.
- AXI output contract — the shared conventions behind this output.