Skip to content

Commit bc4c4dd

Browse files
committed
removed deprecated --showtime= value top5
1 parent d0d56cd commit bc4c4dd

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

cli/cmdlineparser.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,10 +1098,6 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
10981098
mSettings.showtime = SHOWTIME_MODES::SHOWTIME_FILE_TOTAL;
10991099
else if (showtimeMode == "summary")
11001100
mSettings.showtime = SHOWTIME_MODES::SHOWTIME_SUMMARY;
1101-
else if (showtimeMode == "top5") {
1102-
mSettings.showtime = SHOWTIME_MODES::SHOWTIME_TOP5_FILE;
1103-
mLogger.printMessage("--showtime=top5 is deprecated and will be removed in Cppcheck 2.14. Please use --showtime=top5_file or --showtime=top5_summary instead.");
1104-
}
11051101
else if (showtimeMode == "top5_file")
11061102
mSettings.showtime = SHOWTIME_MODES::SHOWTIME_TOP5_FILE;
11071103
else if (showtimeMode == "top5_summary")

releasenotes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ Other:
2222
- Using Visual Studio with CMake now checks if the CMake version is at least 3.13. This was always required but was not checked explicitly.
2323
- Added '--template=simple'. It is expands to '{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]' without any additional location details.
2424
- Removed deprecated platform type 'Unspecified'. Please use 'unspecified' instead.
25+
- Removed deprecated '--showtime=' value 'top5'. Please use 'top5_file' or 'top5_summary' instead.

test/testcmdlineparser.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,9 +1743,8 @@ class TestCmdlineParser : public TestFixture {
17431743
REDIRECT;
17441744
const char * const argv[] = {"cppcheck", "--showtime=top5", "file.cpp"};
17451745
settings->showtime = SHOWTIME_MODES::SHOWTIME_NONE;
1746-
ASSERT_EQUALS(CmdLineParser::Result::Success, parser->parseFromArgs(3, argv));
1747-
ASSERT(settings->showtime == SHOWTIME_MODES::SHOWTIME_TOP5_FILE);
1748-
ASSERT_EQUALS("cppcheck: --showtime=top5 is deprecated and will be removed in Cppcheck 2.14. Please use --showtime=top5_file or --showtime=top5_summary instead.\n", logger->str());
1746+
ASSERT_EQUALS(CmdLineParser::Result::Fail, parser->parseFromArgs(3, argv));
1747+
ASSERT_EQUALS("cppcheck: error: unrecognized --showtime mode: 'top5'. Supported modes: file, file-total, summary, top5, top5_file, top5_summary.\n", logger->str());
17491748
}
17501749

17511750
void showtimeTop5File() {

0 commit comments

Comments
 (0)