From d68f07e50c1542d616ec73dd91b52a062d592aff Mon Sep 17 00:00:00 2001 From: IOBYTE Date: Sat, 10 Feb 2018 16:30:49 -0500 Subject: [PATCH] Add purgedConfiguration to list of error ids. (#1087) purgedConfiguration was not showing up in the GUI supression list. --- lib/cppcheck.cpp | 2 ++ test/testcppcheck.cpp | 14 ++++++++++++++ 2 files changed, 16 insertions(+) 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); } };