format

fun format(results: List<Result>, reportDir: Path? = null)(source)

Write formatted output for the given results.

Parameters

results

The changeset from a recipe run. May be empty.

reportDir

Directory where openrewrite-report.json is written when outputMode is OutputMode.REPORT. Defaults to the current directory. Ignored for OutputMode.DIFF and OutputMode.FILES.


fun format(runResult: RunResult)(source)

Write formatted output for a full RunResult, including plugin-first raw diffs and in-process OpenRewrite Result objects when both are present.

In OutputMode.REPORT mode the emitted JSON additionally carries the ExecutionDiagnostics.parseFailures collected during the LST build, so library consumers can see which files the parsers could not handle.