Skip to content

Commit 0f558b8

Browse files
committed
fixed #13627 - bail out on nested GUI projects instead of ignoring them silently
1 parent c6876a2 commit 0f558b8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cli/cmdlineparser.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,6 +1165,10 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
11651165
// read underlying project
11661166
projectFile = projectFileGui;
11671167
projType = project.import(projectFileGui, &mSettings);
1168+
if (projType == ImportProject::Type::CPPCHECK_GUI) {
1169+
mLogger.printError("nested Cppcheck GUI projects are not supported.");
1170+
return Result::Fail;
1171+
}
11681172
}
11691173
}
11701174
if (projType == ImportProject::Type::VS_SLN || projType == ImportProject::Type::VS_VCXPROJ) {

test/cli/more-projects_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ def test_project_file_nested(tmp_path):
893893

894894
args = ['--project={}'.format(level1_file)]
895895
out_lines = [
896-
'cppcheck: error: no C or C++ source files found.'
896+
'cppcheck: error: nested Cppcheck GUI projects are not supported.'
897897
]
898898

899899
assert_cppcheck(args, ec_exp=1, err_exp=[], out_exp=out_lines)

0 commit comments

Comments
 (0)