No unmatched suppressions list in quiet output.

When user wants to see only errors printed (--quiet in CLI) we
must obey that. And not print unmatchedSuppressions list.

Ticket: #2895 (Cannot suppress unmatchedSuppression reports)
This commit is contained in:
Kimmo Varis 2011-08-04 12:04:38 +03:00
parent 7e8f5be4b6
commit e86abfdc5f
2 changed files with 4 additions and 2 deletions

View File

@ -189,7 +189,8 @@ int CppCheckExecutor::check(int argc, const char* const argv[])
if (!cppCheck.settings().checkConfiguration) if (!cppCheck.settings().checkConfiguration)
{ {
reportUnmatchedSuppressions(cppCheck.settings().nomsg.getUnmatchedGlobalSuppressions()); if (!_settings._errorsOnly)
reportUnmatchedSuppressions(cppCheck.settings().nomsg.getUnmatchedGlobalSuppressions());
if (Preprocessor::missingIncludeFlag) if (Preprocessor::missingIncludeFlag)
{ {

View File

@ -189,7 +189,8 @@ unsigned int CppCheck::processFile()
_errorLogger.reportOut("Bailing out from checking " + fixedpath + ": " + e.what()); _errorLogger.reportOut("Bailing out from checking " + fixedpath + ": " + e.what());
} }
reportUnmatchedSuppressions(_settings.nomsg.getUnmatchedLocalSuppressions(_filename)); if (!_settings._errorsOnly)
reportUnmatchedSuppressions(_settings.nomsg.getUnmatchedLocalSuppressions(_filename));
_errorList.clear(); _errorList.clear();
return exitcode; return exitcode;