Skip to content

Add support for multiple scanPaths in report generation #39

Description

@jayasuryat

Right now MendableReportGeneratorRequest only supports a single String scan path.

@Poko
public class MendableReportGeneratorRequest(
public val scanPath: String,
public val outputPath: String,
public val scanRecursively: Boolean,
public val outputFileName: String,
public val exportType: ExportType,
public val includeModules: IncludeModules,
) {

And as different projects would have different ways of generating and storing the metrics, having a single scan path will force the library consumers to either have all of the metrics generated in a single folder, or scan a much bigger parent folder recursively to fit the single scan path requirement. Which isn't ideal.

Instead, it is better to change the primary constructor to take in a list of scan paths, and add a secondary constructor with a single scan path (which will ultimately call the primary constructor with a list of only one scan path) to maintain source-compatibility.


TODO:

  • Update MendableReportGeneratorRequest to accommodate for multiple scan paths
  • Make MendableReportGeneratorRequest backwards-source-compatible
  • Update MendableReportGenerator to handle multiple scan paths
  • Update tests to check this behaviour change
  • Update CliArgs to take in multiple scan paths
  • Add new tests in CliArgumentsTest to test the change in behaviour
  • Update README.md to inform about this change
  • Update docs on GitHub pages to inform about this change
  • Dump and validate API changes
  • Deprecate methods added for backwards-source-compatibility

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions