mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-17 17:21:53 +01:00
updated output format to accept 'ALL' to generated both HTML and XML reports
Former-commit-id: 002943f373d5541d0ede54d00beb9c155eb454c0
This commit is contained in:
@@ -108,8 +108,10 @@ public final class CliParser {
|
||||
}
|
||||
if (line.hasOption(ArgumentName.OUTPUT_FORMAT)) {
|
||||
final String format = line.getOptionValue(ArgumentName.OUTPUT_FORMAT);
|
||||
if (!("XML".equalsIgnoreCase(format) || "HTML".equalsIgnoreCase(format))) {
|
||||
throw new ParseException("Supported output formats are XML and HTML");
|
||||
if (!("ALL".equalsIgnoreCase(format)
|
||||
|| "XML".equalsIgnoreCase(format)
|
||||
|| "HTML".equalsIgnoreCase(format))) {
|
||||
throw new ParseException("Supported output formats are XML, HTML, or ALL");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -187,7 +189,7 @@ public final class CliParser {
|
||||
.create(ArgumentName.OUT_SHORT);
|
||||
|
||||
final Option outputformat = OptionBuilder.withArgName("format").hasArg().withLongOpt(ArgumentName.OUTPUT_FORMAT)
|
||||
.withDescription("the output format to write to.")
|
||||
.withDescription("the output format to write to (XML, HTML, ALL).")
|
||||
.create(ArgumentName.OUTPUT_FORMAT_SHORT);
|
||||
|
||||
//TODO add the ability to load a properties file to override the defaults...
|
||||
|
||||
Reference in New Issue
Block a user