Skip to content

Commit

Permalink
Fix #13374 (Add --check-level=reduced option) (#6496)
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar authored Dec 4, 2024
1 parent 7c764f7 commit 07d59e9
Show file tree
Hide file tree
Showing 29 changed files with 2,331 additions and 2,200 deletions.
14 changes: 11 additions & 3 deletions cli/cmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,9 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
else if (std::strncmp(argv[i], "--check-level=", 14) == 0) {
Settings::CheckLevel level = Settings::CheckLevel::normal;
const std::string level_s(argv[i] + 14);
if (level_s == "normal")
if (level_s == "reduced")
level = Settings::CheckLevel::reduced;
else if (level_s == "normal")
level = Settings::CheckLevel::normal;
else if (level_s == "exhaustive")
level = Settings::CheckLevel::exhaustive;
Expand Down Expand Up @@ -952,6 +954,11 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
return Result::Fail;
}

else if (std::strncmp(argv[i], "--performance-valueflow-max-iterations=", 39) == 0) {
if (!parseNumberArg(argv[i], 39, mSettings.vfOptions.maxIterations, true))
return Result::Fail;
}

// Specify platform
else if (std::strncmp(argv[i], "--platform=", 11) == 0) {
const std::string platform(11+argv[i]);
Expand Down Expand Up @@ -1528,8 +1535,9 @@ void CmdLineParser::printHelp() const
" --check-config Check cppcheck configuration. The normal code\n"
" analysis is disabled by this flag.\n"
" --check-level=<level>\n"
" Configure how much checking you want:\n"
" * normal: Cppcheck uses some compromises in the checking so\n"
" Configure how much valueflow analysis you want:\n"
" * reduced: Reduce valueflow to finish checking quickly.\n"
" * normal: Cppcheck uses some compromises in the analysis so\n"
" the checking will finish in reasonable time.\n"
" * exhaustive: deeper analysis that you choose when you can\n"
" wait.\n"
Expand Down
285 changes: 145 additions & 140 deletions gui/cppcheck_de.ts

Large diffs are not rendered by default.

285 changes: 145 additions & 140 deletions gui/cppcheck_es.ts

Large diffs are not rendered by default.

285 changes: 145 additions & 140 deletions gui/cppcheck_fi.ts

Large diffs are not rendered by default.

285 changes: 145 additions & 140 deletions gui/cppcheck_fr.ts

Large diffs are not rendered by default.

285 changes: 145 additions & 140 deletions gui/cppcheck_it.ts

Large diffs are not rendered by default.

285 changes: 145 additions & 140 deletions gui/cppcheck_ja.ts

Large diffs are not rendered by default.

285 changes: 145 additions & 140 deletions gui/cppcheck_ka.ts

Large diffs are not rendered by default.

285 changes: 145 additions & 140 deletions gui/cppcheck_ko.ts

Large diffs are not rendered by default.

Loading

0 comments on commit 07d59e9

Please sign in to comment.