File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1643,6 +1643,10 @@ void CmdLineParser::printHelp() const
16431643 " is 2. A larger value will mean more errors can be found\n "
16441644 " but also means the analysis will be slower.\n "
16451645 " --output-file=<file> Write results to file, rather than standard error.\n "
1646+ " --output-format=<format>\n "
1647+ " Specify the output format. The available formats are:\n "
1648+ " * sarif\n "
1649+ " * xml\n "
16461650 " --platform=<type>, --platform=<file>\n "
16471651 " Specifies platform specific types and sizes. The\n "
16481652 " available builtin platforms are:\n "
Original file line number Diff line number Diff line change @@ -145,8 +145,10 @@ namespace {
145145
146146 std::string serialize (std::string productName) const {
147147 const auto nameAndVersion = Settings::getNameAndVersion (productName);
148- productName = nameAndVersion.first ;
149- const std::string version = nameAndVersion.first .empty () ? CppCheck::version () : nameAndVersion.second ;
148+ productName = nameAndVersion.first .empty () ? " Cppcheck" : nameAndVersion.first ;
149+ std::string version = nameAndVersion.first .empty () ? CppCheck::version () : nameAndVersion.second ;
150+ if (version.find (" " ) != std::string::npos)
151+ version.erase (version.find (" " ), std::string::npos);
150152
151153 picojson::object doc;
152154 doc[" version" ] = picojson::value (" 2.1.0" );
You can’t perform that action at this time.
0 commit comments