Cppcheck: Only show 'Too many configurations' and 'Interrupted checking' information messages when information severity is enabled

This commit is contained in:
Daniel Marjamäki 2012-12-23 08:23:52 +01:00
parent dae232015e
commit 9e58714bb1
1 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ unsigned int CppCheck::processFile(const std::string& filename)
configurations.push_back(_settings.userDefines);
}
if (!_settings._force && configurations.size() > _settings._maxConfigs) {
if (_settings.isEnabled("information") && !_settings._force && configurations.size() > _settings._maxConfigs) {
const std::string fixedpath = Path::toNativeSeparators(filename);
ErrorLogger::ErrorMessage::FileLocation location;
location.setfile(fixedpath);
@ -195,7 +195,7 @@ unsigned int CppCheck::processFile(const std::string& filename)
for (std::list<std::string>::const_iterator it = configurations.begin(); it != configurations.end(); ++it) {
// Check only a few configurations (default 12), after that bail out, unless --force
// was used.
if (!_settings._force && checkCount >= _settings._maxConfigs) {
if (_settings.isEnabled("information") && !_settings._force && checkCount >= _settings._maxConfigs) {
const std::string fixedpath = Path::toNativeSeparators(filename);
ErrorLogger::ErrorMessage::FileLocation location;