Skip to content

Commit 07d59e9

Browse files
authored
Fix #13374 (Add --check-level=reduced option) (danmar#6496)
1 parent 7c764f7 commit 07d59e9

29 files changed

+2331
-2200
lines changed

Diff for: cli/cmdlineparser.cpp

+11-3
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,9 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
471471
else if (std::strncmp(argv[i], "--check-level=", 14) == 0) {
472472
Settings::CheckLevel level = Settings::CheckLevel::normal;
473473
const std::string level_s(argv[i] + 14);
474-
if (level_s == "normal")
474+
if (level_s == "reduced")
475+
level = Settings::CheckLevel::reduced;
476+
else if (level_s == "normal")
475477
level = Settings::CheckLevel::normal;
476478
else if (level_s == "exhaustive")
477479
level = Settings::CheckLevel::exhaustive;
@@ -952,6 +954,11 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
952954
return Result::Fail;
953955
}
954956

957+
else if (std::strncmp(argv[i], "--performance-valueflow-max-iterations=", 39) == 0) {
958+
if (!parseNumberArg(argv[i], 39, mSettings.vfOptions.maxIterations, true))
959+
return Result::Fail;
960+
}
961+
955962
// Specify platform
956963
else if (std::strncmp(argv[i], "--platform=", 11) == 0) {
957964
const std::string platform(11+argv[i]);
@@ -1528,8 +1535,9 @@ void CmdLineParser::printHelp() const
15281535
" --check-config Check cppcheck configuration. The normal code\n"
15291536
" analysis is disabled by this flag.\n"
15301537
" --check-level=<level>\n"
1531-
" Configure how much checking you want:\n"
1532-
" * normal: Cppcheck uses some compromises in the checking so\n"
1538+
" Configure how much valueflow analysis you want:\n"
1539+
" * reduced: Reduce valueflow to finish checking quickly.\n"
1540+
" * normal: Cppcheck uses some compromises in the analysis so\n"
15331541
" the checking will finish in reasonable time.\n"
15341542
" * exhaustive: deeper analysis that you choose when you can\n"
15351543
" wait.\n"

Diff for: gui/cppcheck_de.ts

+145-140
Large diffs are not rendered by default.

Diff for: gui/cppcheck_es.ts

+145-140
Large diffs are not rendered by default.

Diff for: gui/cppcheck_fi.ts

+145-140
Large diffs are not rendered by default.

Diff for: gui/cppcheck_fr.ts

+145-140
Large diffs are not rendered by default.

Diff for: gui/cppcheck_it.ts

+145-140
Large diffs are not rendered by default.

Diff for: gui/cppcheck_ja.ts

+145-140
Large diffs are not rendered by default.

Diff for: gui/cppcheck_ka.ts

+145-140
Large diffs are not rendered by default.

Diff for: gui/cppcheck_ko.ts

+145-140
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)