Opened 4 weeks ago

Closed 4 weeks ago

#14939 closed defect (fixed)

Failures to add suppressions are ignored in `importCppcheckGuiProject`

Reported by: ludviggunne Owned by: ludviggunne
Priority: Normal Milestone: 2.22
Component: Other Version:
Keywords: importproject Cc:

Description

lib/importproject.cpp:

    supprs.nomsg.addSuppressions(std::move(suppressions)); // TODO: check result

This leads to suppressions in project files being silently ignored if an earlier one in the list is already supplied on the command line:

<?xml version="1.0" encoding="UTF-8"?>
<project version="1">
    <root name="."/>
    <suppressions>
        <suppression>uninitvar</suppression>
        <suppression>unreadVariable</suppression>
    </suppressions>
    <paths>
        <dir name="."/>
    </paths>
</project>
$ cppcheck --suppress=uninitvar --project=project.cppcheck

Here, unreadVariable is ignored.

Change History (3)

comment:1 by ludviggunne, 4 weeks ago

Related: #14936

comment:2 by ludviggunne, 4 weeks ago

Owner: changed from noone to ludviggunne
Status: newassigned

comment:3 by ludviggunne, 4 weeks ago

Milestone: 2.22
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.