Filter out duplicate error messages in cli.
This commit is contained in:
parent
96beb94b21
commit
e87628b72f
|
@ -255,6 +255,11 @@ int CppCheckExecutor::check(int argc, const char* const argv[])
|
|||
|
||||
void CppCheckExecutor::reportErr(const std::string &errmsg)
|
||||
{
|
||||
// Alert only about unique errors
|
||||
if (std::find(_errorList.begin(), _errorList.end(), errmsg) != _errorList.end())
|
||||
return;
|
||||
|
||||
_errorList.push_back(errmsg);
|
||||
std::cerr << errmsg << std::endl;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,6 +107,11 @@ protected:
|
|||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Used to filter out duplicate error messages.
|
||||
*/
|
||||
std::list<std::string> _errorList;
|
||||
|
||||
/**
|
||||
* Report progress time
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue