Skip to content

Commit f27baf0

Browse files
committed
cli: stop processing in case an invalid or non-existant rule-file is provided.
1 parent f9a5a11 commit f27baf0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cli/cmdlineparser.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,9 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[])
719719
if (!rule.pattern.empty())
720720
_settings->rules.push_back(rule);
721721
}
722+
} else {
723+
printMessage("cppcheck: error: unable to load rule-file: " + std::string(12+argv[i]));
724+
return false;
722725
}
723726
}
724727
#endif

0 commit comments

Comments
 (0)