Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cli/cmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,8 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
"misra-c++-2023",
"misra-cpp-2023",
"bughunting",
"safety"};
"safety",
"debug-progress"};
// valid options --premium-..=
const std::set<std::string> valid2{
"cert-c-int-precision",
Expand Down
9 changes: 9 additions & 0 deletions test/testcmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class TestCmdlineParser : public TestFixture {
TEST_CASE(premiumOptionsInvalid1);
TEST_CASE(premiumOptionsInvalid2);
TEST_CASE(premiumSafety);
TEST_CASE(premiumDebugProgress);
TEST_CASE(reportProgress1);
TEST_CASE(reportProgress2);
TEST_CASE(reportProgress3);
Expand Down Expand Up @@ -1454,6 +1455,14 @@ class TestCmdlineParser : public TestFixture {
ASSERT_EQUALS(true, settings->safety);
}

void premiumDebugProgress() {
REDIRECT;
asPremium();
const char * const argv[] = {"cppcheck", "--premium=debug-progress", "file.cpp"};
ASSERT_EQUALS_ENUM(CmdLineParser::Result::Success, parseFromArgs(argv));
ASSERT_EQUALS("--debug-progress", settings->premiumArgs);
}

void reportProgress1() {
REDIRECT;
const char * const argv[] = {"cppcheck", "--report-progress", "file.cpp"};
Expand Down
Loading