Skip to content

Commit 7a70570

Browse files
committed
add --output-format arguments xml2 & xml3
1 parent 01437bc commit 7a70570

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

cli/cmdlineparser.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,8 +1016,14 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
10161016
mSettings.outputFormat = Settings::OutputFormat::sarif;
10171017
else if (format == "xml")
10181018
mSettings.outputFormat = Settings::OutputFormat::xml;
1019-
else {
1020-
mLogger.printError("argument to '--output-format=' must be 'text', 'sarif' or 'xml'.");
1019+
else if (format == "xml2") {
1020+
mSettings.outputFormat = Settings::OutputFormat::xml;
1021+
mSettings.xml_version = 2;
1022+
} else if (format == "xml3") {
1023+
mSettings.outputFormat = Settings::OutputFormat::xml;
1024+
mSettings.xml_version = 3;
1025+
} else {
1026+
mLogger.printError("argument to '--output-format=' must be 'text', 'sarif', 'xml' (deprecated), 'xml2' or 'xml3'.");
10211027
return Result::Fail;
10221028
}
10231029
mSettings.plistOutput = "";
@@ -1832,7 +1838,9 @@ void CmdLineParser::printHelp() const
18321838
" Specify the output format. The available formats are:\n"
18331839
" * text\n"
18341840
" * sarif\n"
1835-
" * xml\n"
1841+
" * xml (deprecated)\n"
1842+
" * xml2\n"
1843+
" * xml3\n"
18361844
" --platform=<type>, --platform=<file>\n"
18371845
" Specifies platform specific types and sizes. The\n"
18381846
" available builtin platforms are:\n"

0 commit comments

Comments
 (0)