diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index 62719d6c6..db0a15105 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -151,13 +151,21 @@ unsigned int CppCheck::check() // was used. if (!_settings._force && checkCount > 11) { - if (_settings._errorsOnly == false) - { - const std::string fixedpath = Path::toNativeSeparators(fname); - _errorLogger.reportOut(std::string("Bailing out from checking ") + fixedpath + - ": Too many configurations. Recheck this file with --force if you want to check them all."); - } - + const std::string fixedpath = Path::toNativeSeparators(fname); + ErrorLogger::ErrorMessage::FileLocation location; + location.setfile(fixedpath); + std::list 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"); + _errorLogger.reportErr(errmsg); break; }