Skip to content

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 schemaVersion and 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"] }
}
FieldMeaning
failFasttrue when the run used --fail-fast. Gates that did not run are listed with status SKIPPED and summary not run (fail-fast).
severityThe --severity threshold; see the table below. Defaults to warning.
projectEnum names such as JAVA, MAVEN, and SPRING_BOOT.
languageVersionThe target Node major version, such as "22", for TypeScript and JavaScript projects; see detect. Omitted for other projects.
partial, scopePresent only when --path is used. See Partial checks.

Omitted fields are intentional in schema v2.

--severityFindings shownCaptured output
errorErrorsPassed gates: none. Failed gates: visible findings, or the last 200 lines when no finding is visible.
warning (default)Errors and warningsSame as error.
infoErrors, warnings, and notesComplete stdout and stderr, plus the output tail.
  • partial.paths lists each edited path once, relative to the project root with / separators. A path outside the project is listed as given.
  • scope is skipped, narrowed, or full. Skipped checks have status SKIPPED and do not affect the verdict.

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. findingsTotal is the full count, findingsHidden counts findings below the threshold, and findingsTruncated is true when entries were left out.
  • file is relative to the project root with / separators. file, line, column, and helpUri are omitted when the tool does not report them; format findings 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 output as the fallback.

See quality gates for where each gate’s findings come from. Use --format sarif for code-scanning tools.

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.

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.