JSON output
ward check --format json emits schema version 2. It writes only JSON to stdout;
diagnostics go to stderr.
- The document is compact (a single line, no indentation) to keep it small for agents and tools. It is shown indented below for readability.
- Consumers should inspect
schemaVersionand may ignore fields added in later compatible versions. Existing fields keep their meaning within a schema version.
{ "schemaVersion": 2, "status": "PASSED|FAILED", "failFast": "boolean", "severity": "error|warning|info", "project": { "language": "string", "buildTool": "string", "framework": "string", "root": "string", "languageVersion": "string?" }, "checks": [{ "name": "string", "status": "PASSED|FAILED|SKIPPED|UNAVAILABLE|EXECUTION_ERROR", "command": "string", "exitCode": "number", "durationMs": "number", "stdout": "string?", "stderr": "string?", "summary": "string", "output": "string?", "findings": [{ "tool": "string", "rule": "string", "severity": "error|warning|note", "message": "string", "file": "string", "line": "number", "column": "number", "helpUri": "string" }], "findingsTotal": "number", "findingsHidden": "number", "findingsTruncated": "boolean", "scope": "skipped|narrowed|full" }], "policies": [{ "name": "string", "passed": "boolean", "message": "string" }], "partial": { "paths": ["string"] }}Fields
Section titled “Fields”| Field | Meaning |
|---|---|
failFast | true when the run used --fail-fast. Gates that did not run are listed with status SKIPPED and summary not run (fail-fast). |
severity | The --severity threshold; see the table below. Defaults to warning. |
project | Enum names such as JAVA, MAVEN, and SPRING_BOOT. |
languageVersion | The target Node major version, such as "22", for TypeScript and JavaScript projects; see detect. Omitted for other projects. |
partial, scope | Present only when --path is used. See Partial checks. |
Omitted fields are intentional in schema v2.
Severity and captured output
Section titled “Severity and captured output”--severity | Findings shown | Captured output |
|---|---|---|
error | Errors | Passed gates: none. Failed gates: visible findings, or the last 200 lines when no finding is visible. |
warning (default) | Errors and warnings | Same as error. |
info | Errors, warnings, and notes | Complete stdout and stderr, plus the output tail. |
Partial checks
Section titled “Partial checks”partial.pathslists each edited path once, relative to the project root with/separators. A path outside the project is listed as given.scopeisskipped,narrowed, orfull. Skipped checks have statusSKIPPEDand do not affect the verdict.
Findings
Section titled “Findings”A failed checkstyle, pmd, gitleaks, compile, format, eslint, or tsc gate lists one entry per visible
violation in findings, in the tool’s report order, so an agent can go straight to the file and
line.
Every check has the four findings fields: findingsTotal counts all findings, and findingsHidden
counts findings below the threshold. Gates that passed or have no supported source have an empty
array, findingsTotal 0, findingsHidden 0, and findingsTruncated false.
{ "tool": "checkstyle", "rule": "MissingJavadocMethod", "severity": "error", "message": "Missing a Javadoc comment.", "file": "src/main/java/com/acme/Foo.java", "line": 42, "column": 5, "helpUri": "https://checkstyle.org/checks/javadoc/missingjavadocmethod.html"}- At most 50 visible findings are listed per check.
findingsTotalis the full count,findingsHiddencounts findings below the threshold, andfindingsTruncatedistruewhen entries were left out. fileis relative to the project root with/separators.file,line,column, andhelpUriare omitted when the tool does not report them;formatfindings name only the file.- Gitleaks findings never contain the matched secret.
- When a report is missing, stale, or unreadable, the check keeps its status and simply has no
findings; use
outputas the fallback.
See quality gates for where each gate’s findings come
from. Use --format sarif for code-scanning tools.
Learning
Section titled “Learning”When learning is enabled with --learn-after <n>, the additive learning object is present:
{ "learning": { "threshold": 3, "prompts": [{ "key": "checkstyle:LineLength", "gate": "checkstyle", "occurrences": 3, "summary": "Line is longer than 100 characters (found 120).", "instruction": "Ward: the `checkstyle` rule `LineLength` was violated in 3 separate occurrences..."}] } }It is omitted when learning is disabled. schemaVersion remains 2.
Errors
Section titled “Errors”When Ward cannot run at all (exit 2), it emits a short error report without schemaVersion:
{ "status": "ERROR", "error": "Unknown profiles [nope]. Available profiles: [default]" }Gate commands are direct argument vectors, not shell expressions. See exit codes.
An UNAVAILABLE check is unsuccessful even when its executable is missing. An
EXECUTION_ERROR check indicates interruption or output-capture failure; both are represented in
the report and use check exit code 1.