RAT-570: Create Reporter.Output object#697
Open
Claudenw wants to merge 9 commits into
Open
Conversation
6e82596 to
0fcd7da
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This change requires RAT-568
This change is to defines a
Reporter.Outputclass 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 aReporter.Outputand will not automatically format the output as specified in the configuration. Formatting output becomes a second step.Reporter.Outputwill have 2 methods to format the outputformat(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.Outputwill 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.