Skip to content

Commit

Permalink
removed deprecated platform type Unspecified (#5903)
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave authored Jan 22, 2024
1 parent 309aa8a commit d0d56cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
5 changes: 0 additions & 5 deletions cli/cmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -944,11 +944,6 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a

// keep existing platform from command-line intact
if (!platform.empty()) {
if (platform == "Unspecified") {
mLogger.printMessage("'Unspecified' is a deprecated platform type and will be removed in Cppcheck 2.14. Please use 'unspecified' instead.");
platform = "unspecified";
}

std::string errstr;
const std::vector<std::string> paths = {projectFile, argv[0]};
if (!mSettings.platform.set(platform, errstr, paths)) {
Expand Down
1 change: 1 addition & 0 deletions releasenotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ Other:
- The minimum required CMake version has been bumped to 3.5
- 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.
- Added '--template=simple'. It is expands to '{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]' without any additional location details.
- Removed deprecated platform type 'Unspecified'. Please use 'unspecified' instead.
4 changes: 2 additions & 2 deletions test/cli/more-projects_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def test_project_unspecified_platform(tmpdir):
f.write("int x;")

ret, stdout, stderr = cppcheck(['--project=' + project_file, '--template=cppcheck1', '-q'])
assert ret == 0, stdout
assert stdout == "cppcheck: 'Unspecified' is a deprecated platform type and will be removed in Cppcheck 2.14. Please use 'unspecified' instead.\n"
assert ret == 1, stdout
assert stdout == "cppcheck: error: unrecognized platform: 'Unspecified'.\n"
assert stderr == ''


Expand Down

0 comments on commit d0d56cd

Please sign in to comment.