Skip to main content

reports_to_json

Function reports_to_json 

Source
pub fn reports_to_json(files: &[(Option<&str>, &CheckReport)]) -> Value
Expand description

Full surf-lint JSON envelope over (path, report) pairs:

{ "schema_version": 1, "files": [ ... ], "summary": { ... } }

Each pair becomes a report_to_json object in files; summary aggregates the per-file counts (files = number of pairs). This is the single construction point for the envelope, so the CLI (--format json) and the wasm check_json export emit identical structures.