Skip to content

Commit d68f07e

Browse files
IOBYTEdanmar
authored andcommitted
Add purgedConfiguration to list of error ids. (cppcheck-opensource#1087)
purgedConfiguration was not showing up in the GUI supression list.
1 parent f5b91ff commit d68f07e

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

lib/cppcheck.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,8 @@ void CppCheck::getErrorMessages()
799799
s.addEnabled("performance");
800800
s.addEnabled("information");
801801

802+
purgedConfigurationMessage("","");
803+
802804
tooManyConfigs = true;
803805
tooManyConfigsError("",0U);
804806

test/testcppcheck.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,20 @@ class TestCppcheck : public TestFixture {
9090
}
9191
}
9292
ASSERT_EQUALS("", duplicate);
93+
94+
// Check for error ids from this class.
95+
bool foundPurgedConfiguration = false;
96+
bool foundTooManyConfigs = false;
97+
for (std::list<std::string>::iterator it = errorLogger.id.begin();
98+
it != errorLogger.id.end();
99+
++it) {
100+
if (*it == "purgedConfiguration")
101+
foundPurgedConfiguration = true;
102+
else if (*it == "toomanyconfigs")
103+
foundTooManyConfigs = true;
104+
}
105+
ASSERT(foundPurgedConfiguration);
106+
ASSERT(foundTooManyConfigs);
93107
}
94108
};
95109

0 commit comments

Comments
 (0)