From f27baf0956a4b6217cac1982ba966e463ed2c98c Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Wed, 25 Jul 2018 08:25:18 +0200 Subject: [PATCH] cli: stop processing in case an invalid or non-existant rule-file is provided. --- cli/cmdlineparser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 062bf527d..ec2c54a82 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -719,6 +719,9 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[]) if (!rule.pattern.empty()) _settings->rules.push_back(rule); } + } else { + printMessage("cppcheck: error: unable to load rule-file: " + std::string(12+argv[i])); + return false; } } #endif