Cppcheck: Don't show information messages about interrupted checking unless --enable=information has been given.
This commit is contained in:
parent
80ba3d6a92
commit
fe78e28d70
|
@ -216,6 +216,8 @@ unsigned int CppCheck::processFile()
|
||||||
// Check only 12 first configurations, after that bail out, unless --force
|
// Check only 12 first configurations, after that bail out, unless --force
|
||||||
// was used.
|
// was used.
|
||||||
if (!_settings._force && checkCount > 11)
|
if (!_settings._force && checkCount > 11)
|
||||||
|
{
|
||||||
|
if (_settings.isEnabled("information"))
|
||||||
{
|
{
|
||||||
const std::string fixedpath = Path::toNativeSeparators(_filename);
|
const std::string fixedpath = Path::toNativeSeparators(_filename);
|
||||||
ErrorLogger::ErrorMessage::FileLocation location;
|
ErrorLogger::ErrorMessage::FileLocation location;
|
||||||
|
@ -233,6 +235,7 @@ unsigned int CppCheck::processFile()
|
||||||
"toomanyconfigs",
|
"toomanyconfigs",
|
||||||
false);
|
false);
|
||||||
_errorLogger.reportErr(errmsg);
|
_errorLogger.reportErr(errmsg);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -400,11 +400,11 @@ std::string Settings::addEnabled(const std::string &str)
|
||||||
{
|
{
|
||||||
std::set<std::string>::const_iterator it;
|
std::set<std::string>::const_iterator it;
|
||||||
for (it = id.begin(); it != id.end(); ++it)
|
for (it = id.begin(); it != id.end(); ++it)
|
||||||
_enabled[*it] = true;
|
_enabled.insert(*it);
|
||||||
}
|
}
|
||||||
else if (id.find(str) != id.end())
|
else if (id.find(str) != id.end())
|
||||||
{
|
{
|
||||||
_enabled[str] = true;
|
_enabled.insert(str);
|
||||||
}
|
}
|
||||||
else if (!handled)
|
else if (!handled)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,7 @@ private:
|
||||||
std::string _append;
|
std::string _append;
|
||||||
|
|
||||||
/** @brief enable extra checks by id */
|
/** @brief enable extra checks by id */
|
||||||
std::map<std::string, bool> _enabled;
|
std::set<std::string> _enabled;
|
||||||
|
|
||||||
/** @brief terminate checking */
|
/** @brief terminate checking */
|
||||||
bool _terminate;
|
bool _terminate;
|
||||||
|
|
Loading…
Reference in New Issue