ResultFormatter

class ResultFormatter(outputMode: OutputMode = OutputMode.DIFF, out: PrintStream = System.out)(source)

Formats the OpenRewrite org.openrewrite.Result changeset in one of three modes.

Parameters

outputMode

Controls the output format. See OutputMode for details.

out

Destination for textual output. Defaults to System.out.

The secondary constructor accepts a picocli java.io.PrintWriter for CLI integration. Library consumers that do not need formatted output can ignore this class entirely and work with io.github.skhokhlov.rewriterunner.RunResult.results directly.

See also

Constructors

Link copied to clipboard
constructor(outputMode: OutputMode = OutputMode.DIFF, out: PrintStream = System.out)
constructor(outputMode: OutputMode, writer: PrintWriter)

Secondary constructor accepting a picocli-style PrintWriter.

Functions

Link copied to clipboard
fun format(results: List<Result>, reportDir: Path? = null)

Write formatted output for the given results.