JsonReporter

Generates the machine-readable JSON report written to build/reports/aalekh/aalekh-results.json.

Output format

A single AalekhJsonReport envelope containing the full graph, summary statistics, and all violations. This allows CI tooling, dashboards, and downstream scripts to consume a single file rather than parsing multiple outputs.

Why not just encode the graph directly?

The original implementation encoded only ModuleDependencyGraph, silently discarding summary and violations which are passed as parameters. That made the JSON output incomplete and misleading for any tool that relied on it to check for violations programmatically.

Functions

Link copied to clipboard
fun generate(graph: ModuleDependencyGraph, summary: GraphSummary, violations: List<Violation> = emptyList()): String