Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Oct 6, 2024
1 parent a798d28 commit da346ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cli/cmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1643,6 +1643,10 @@ void CmdLineParser::printHelp() const
" is 2. A larger value will mean more errors can be found\n"
" but also means the analysis will be slower.\n"
" --output-file=<file> Write results to file, rather than standard error.\n"
" --output-format=<format>\n"
" Specify the output format. The available formats are:\n"
" * sarif\n"
" * xml\n"
" --platform=<type>, --platform=<file>\n"
" Specifies platform specific types and sizes. The\n"
" available builtin platforms are:\n"
Expand Down
6 changes: 4 additions & 2 deletions cli/cppcheckexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ namespace {

std::string serialize(std::string productName) const {
const auto nameAndVersion = Settings::getNameAndVersion(productName);
productName = nameAndVersion.first;
const std::string version = nameAndVersion.first.empty() ? CppCheck::version() : nameAndVersion.second;
productName = nameAndVersion.first.empty() ? "Cppcheck" : nameAndVersion.first;
std::string version = nameAndVersion.first.empty() ? CppCheck::version() : nameAndVersion.second;
if (version.find(" ") != std::string::npos)
version.erase(version.find(" "), std::string::npos);

picojson::object doc;
doc["version"] = picojson::value("2.1.0");
Expand Down

0 comments on commit da346ea

Please sign in to comment.