Skip to content

RAT-570: Create Reporter.Output object#697

Open
Claudenw wants to merge 9 commits into
masterfrom
create-output-object
Open

RAT-570: Create Reporter.Output object#697
Claudenw wants to merge 9 commits into
masterfrom
create-output-object

Conversation

@Claudenw

@Claudenw Claudenw commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This change requires RAT-568

This change is to defines a Reporter.Output class that contains the configuration that was used for the execution, the XML document that was produced, and the ClaimStatistic that captures the numbers various types of files, licenses, license categories and other statistics from the run.

The Reporter.execute() will create a Reporter.Output and will not automatically format the output as specified in the configuration. Formatting output becomes a second step.

Reporter.Output will have 2 methods to format the output

  • format(ReportConfiguration) - will use the output and stylesheet defined in the configuration to format the output.
  • format(IOSupplier stylesheet, IOSupplier output) - will apply an arbitrary stylesheet against the contained document and send the output to the location specified.

This change will make it easier for the Maven version to generate the document in the Mojo.check class and the final output in the Mojo.report class without regenerating the report.

The Reporter.Output will be immutable and constructed using a builder pattern.

The builder will be able to read the 3 components (Configuration, XML document, and ClaimStatistic) from input streams. Each of those components will be extended to include a Serde implementation to write to, and restore from and IO stream.

@Claudenw Claudenw self-assigned this Jul 6, 2026
@Claudenw Claudenw marked this pull request as draft July 6, 2026 13:14
@Claudenw Claudenw force-pushed the create-output-object branch from 6e82596 to 0fcd7da Compare July 8, 2026 09:50
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

@Claudenw Claudenw marked this pull request as ready for review July 9, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant