Cppcheck: Don't show information messages about interrupted checking unless --enable=information has been given.
This commit is contained in:
parent
80ba3d6a92
commit
fe78e28d70
|
@ -217,22 +217,25 @@ unsigned int CppCheck::processFile()
|
|||
// was used.
|
||||
if (!_settings._force && checkCount > 11)
|
||||
{
|
||||
const std::string fixedpath = Path::toNativeSeparators(_filename);
|
||||
ErrorLogger::ErrorMessage::FileLocation location;
|
||||
location.setfile(fixedpath);
|
||||
std::list<ErrorLogger::ErrorMessage::FileLocation> loclist;
|
||||
loclist.push_back(location);
|
||||
const std::string msg("Interrupted checking because of too many #ifdef configurations.\n"
|
||||
"The checking of the file was interrupted because there were too many "
|
||||
"#ifdef configurations. Checking of all #ifdef configurations can be forced "
|
||||
"by --force command line option or from GUI preferences. However that may "
|
||||
"increase the checking time.");
|
||||
ErrorLogger::ErrorMessage errmsg(loclist,
|
||||
Severity::information,
|
||||
msg,
|
||||
"toomanyconfigs",
|
||||
false);
|
||||
_errorLogger.reportErr(errmsg);
|
||||
if (_settings.isEnabled("information"))
|
||||
{
|
||||
const std::string fixedpath = Path::toNativeSeparators(_filename);
|
||||
ErrorLogger::ErrorMessage::FileLocation location;
|
||||
location.setfile(fixedpath);
|
||||
std::list<ErrorLogger::ErrorMessage::FileLocation> loclist;
|
||||
loclist.push_back(location);
|
||||
const std::string msg("Interrupted checking because of too many #ifdef configurations.\n"
|
||||
"The checking of the file was interrupted because there were too many "
|
||||
"#ifdef configurations. Checking of all #ifdef configurations can be forced "
|
||||
"by --force command line option or from GUI preferences. However that may "
|
||||
"increase the checking time.");
|
||||
ErrorLogger::ErrorMessage errmsg(loclist,
|
||||
Severity::information,
|
||||
msg,
|
||||
"toomanyconfigs",
|
||||
false);
|
||||
_errorLogger.reportErr(errmsg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue