diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index 053d26e17..faca8500d 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -799,6 +799,8 @@ void CppCheck::getErrorMessages() s.addEnabled("performance"); s.addEnabled("information"); + purgedConfigurationMessage("",""); + tooManyConfigs = true; tooManyConfigsError("",0U); diff --git a/test/testcppcheck.cpp b/test/testcppcheck.cpp index 0301d227c..cee8f5037 100644 --- a/test/testcppcheck.cpp +++ b/test/testcppcheck.cpp @@ -90,6 +90,20 @@ private: } } ASSERT_EQUALS("", duplicate); + + // Check for error ids from this class. + bool foundPurgedConfiguration = false; + bool foundTooManyConfigs = false; + for (std::list::iterator it = errorLogger.id.begin(); + it != errorLogger.id.end(); + ++it) { + if (*it == "purgedConfiguration") + foundPurgedConfiguration = true; + else if (*it == "toomanyconfigs") + foundTooManyConfigs = true; + } + ASSERT(foundPurgedConfiguration); + ASSERT(foundTooManyConfigs); } };