Skip to content

Commit f869e00

Browse files
committed
add --output-format arguments xml2 & xml3
1 parent 24d70fa commit f869e00

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
@@ -1013,8 +1013,14 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
10131013
mSettings.outputFormat = Settings::OutputFormat::sarif;
10141014
else if (format == "xml")
10151015
mSettings.outputFormat = Settings::OutputFormat::xml;
1016-
else {
1017-
mLogger.printError("argument to '--output-format=' must be 'text', 'sarif' or 'xml'.");
1016+
else if (format == "xml2") {
1017+
mSettings.outputFormat = Settings::OutputFormat::xml;
1018+
mSettings.xml_version = 2;
1019+
} else if (format == "xml3") {
1020+
mSettings.outputFormat = Settings::OutputFormat::xml;
1021+
mSettings.xml_version = 3;
1022+
} else {
1023+
mLogger.printError("argument to '--output-format=' must be 'text', 'sarif', 'xml' (deprecated), 'xml2' or 'xml3'.");
10181024
return Result::Fail;
10191025
}
10201026
mSettings.plistOutput = "";
@@ -1829,7 +1835,9 @@ void CmdLineParser::printHelp() const
18291835
" Specify the output format. The available formats are:\n"
18301836
" * text\n"
18311837
" * sarif\n"
1832-
" * xml\n"
1838+
" * xml (deprecated)\n"
1839+
" * xml2\n"
1840+
" * xml3\n"
18331841
" --platform=<type>, --platform=<file>\n"
18341842
" Specifies platform specific types and sizes. The\n"
18351843
" available builtin platforms are:\n"

0 commit comments

Comments
 (0)