Skip to content

Commit 7f51cf8

Browse files
committed
suppress checkersReport in unusedFunction selfchecks / add special handling in UNUSEDFUNCTION_ONLY hack
1 parent ddf638d commit 7f51cf8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.selfcheck_unused_suppressions

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# should not be reported - see #13387
2+
checkersReport
3+
14
# we are not using all methods of their interfaces
25
unusedFunction:externals/*/*
36

cli/cppcheckexecutor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ bool CppCheckExecutor::reportUnmatchedSuppressions(const Settings &settings, con
352352
// ignore all other suppressions if we use the unusedFunction hack
353353
for (auto&& s : suppr)
354354
{
355-
if (doUnusedFunctionOnly && s.errorId != "unusedFunction")
355+
// TODO: checkersReport should not be reported - see #13387
356+
if (doUnusedFunctionOnly && s.errorId != "unusedFunction" && s.errorId != "checkersReport")
356357
continue;
357358
supprlist.addSuppression(std::move(s));
358359
}

0 commit comments

Comments
 (0)