cli: stop processing in case an invalid or non-existant rule-file is provided.

This commit is contained in:
orbitcowboy 2018-07-25 08:25:18 +02:00
parent f9a5a114bb
commit f27baf0956
1 changed files with 3 additions and 0 deletions

View File

@ -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