File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -569,7 +569,7 @@ std::list<SuppressionList::Suppression> SuppressionList::getUnmatchedLocalSuppre
569569 continue ;
570570 if (s.errorId == ID_CHECKERSREPORT)
571571 continue ;
572- if (!s.isLocal () || s.fileName != file.spath ())
572+ if (!s.isLocal () || ! PathMatch::match ( s.fileName , file.spath () ))
573573 continue ;
574574 result.push_back (s);
575575 }
Original file line number Diff line number Diff line change @@ -3844,5 +3844,10 @@ def test_unmatched_file(tmp_path):
38443844 ret , stdout , stderr = cppcheck (args )
38453845 assert stdout == ''
38463846 assert stderr .splitlines () == [
3847+ 'lib/test.c:-1:0: information: Unmatched suppression: error [unmatchedSuppression]' ,
3848+ 'lib/test.c:-1:0: information: Unmatched suppression: error2 [unmatchedSuppression]' ,
3849+ 'lib/test.c:-1:0: information: Unmatched suppression: error3 [unmatchedSuppression]' ,
3850+ 'lib/test.c:-1:0: information: Unmatched suppression: error5 [unmatchedSuppression]' ,
3851+ 'lib/test.c:-1:0: information: Unmatched suppression: error6 [unmatchedSuppression]'
38473852 ]
38483853 assert ret == 0 , stdout
You can’t perform that action at this time.
0 commit comments