Skip to content

Commit f749f0a

Browse files
committed
s [skip ci]
1 parent 0eb9b78 commit f749f0a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Diff for: lib/cppcheck.cpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -1004,10 +1004,14 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
10041004
mAnalyzerInformation.close();
10051005
}
10061006

1007+
// TODO: this is done too early causing the whole program analysis suppressions to be reported as unmatched
10071008
if (mSettings.severity.isEnabled(Severity::information) || mSettings.checkConfiguration) {
1008-
// TODO: check result?
1009-
// defer reporting of unusedFunction to later
1010-
SuppressionList::reportUnmatchedSuppressions(mSettings.supprs.nomsg.getUnmatchedInlineSuppressions(SuppressionList::UnusedFunction::Exclude), *this);
1009+
if (mSettings.inlineSuppressions)
1010+
{
1011+
// TODO: check result?
1012+
// defer reporting of unusedFunction to later
1013+
SuppressionList::reportUnmatchedSuppressions(mSettings.supprs.nomsg.getUnmatchedInlineSuppressions(SuppressionList::UnusedFunction::Exclude), *this);
1014+
}
10111015

10121016
// In jointSuppressionReport mode, unmatched suppressions are
10131017
// collected after all files are processed

0 commit comments

Comments
 (0)