Cppcheck: Don't show information messages about interrupted checking unless --enable=information has been given.

This commit is contained in:
Daniel Marjamäki 2011-08-19 22:32:57 +02:00
parent 80ba3d6a92
commit fe78e28d70
3 changed files with 22 additions and 19 deletions

View File

@ -216,6 +216,8 @@ unsigned int CppCheck::processFile()
// Check only 12 first configurations, after that bail out, unless --force
// was used.
if (!_settings._force && checkCount > 11)
{
if (_settings.isEnabled("information"))
{
const std::string fixedpath = Path::toNativeSeparators(_filename);
ErrorLogger::ErrorMessage::FileLocation location;
@ -233,6 +235,7 @@ unsigned int CppCheck::processFile()
"toomanyconfigs",
false);
_errorLogger.reportErr(errmsg);
}
break;
}

View File

@ -400,11 +400,11 @@ std::string Settings::addEnabled(const std::string &str)
{
std::set<std::string>::const_iterator it;
for (it = id.begin(); it != id.end(); ++it)
_enabled[*it] = true;
_enabled.insert(*it);
}
else if (id.find(str) != id.end())
{
_enabled[str] = true;
_enabled.insert(str);
}
else if (!handled)
{

View File

@ -41,7 +41,7 @@ private:
std::string _append;
/** @brief enable extra checks by id */
std::map<std::string, bool> _enabled;
std::set<std::string> _enabled;
/** @brief terminate checking */
bool _terminate;