cli: stop processing in case an invalid or non-existant rule-file is provided.
This commit is contained in:
parent
f9a5a114bb
commit
f27baf0956
|
@ -719,6 +719,9 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[])
|
||||||
if (!rule.pattern.empty())
|
if (!rule.pattern.empty())
|
||||||
_settings->rules.push_back(rule);
|
_settings->rules.push_back(rule);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
printMessage("cppcheck: error: unable to load rule-file: " + std::string(12+argv[i]));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue