I have a script that based on different conditions will run cppcheck on a different set of files. However I am struggling with some inconsistent weirdness, when I run the following command:
cppcheck -ifile.c file.c
With some cppcheck binaries I get the following output
cppcheck:error:nofilestocheck-allpathsignored.
which is what I expect - I want to be able to ignore files even though they are explicitly listed.
But with other cppcheck binaries I get:
Checking file.c ...
:
and it starts to check file.c as if the ignore arg was not there.
On linux I have an old 1.61 version that do ignore, and on windows I have 1.79 version that also ignores. But I would like to have a newer linux version that behaves like that, and I have tried to compile all versions between 1.77 to 1.84 and everyone of them scans the file anyway and reports issues (even the 1.79 version that behaves differently on windows). I have built all the linux versions manually using "make -j4".
(I have even tried to experiment with ignoring in the suppressions-list file, but it seems to be the same problem there.)
What might cause this difference?
Last edit: Daniel Bengtsson 2018-08-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a script that based on different conditions will run cppcheck on a different set of files. However I am struggling with some inconsistent weirdness, when I run the following command:
With some cppcheck binaries I get the following output
which is what I expect - I want to be able to ignore files even though they are explicitly listed.
But with other cppcheck binaries I get:
and it starts to check file.c as if the ignore arg was not there.
On linux I have an old 1.61 version that do ignore, and on windows I have 1.79 version that also ignores. But I would like to have a newer linux version that behaves like that, and I have tried to compile all versions between 1.77 to 1.84 and everyone of them scans the file anyway and reports issues (even the 1.79 version that behaves differently on windows). I have built all the linux versions manually using "make -j4".
(I have even tried to experiment with ignoring in the suppressions-list file, but it seems to be the same problem there.)
What might cause this difference?
Last edit: Daniel Bengtsson 2018-08-01
Using the suppressions-list file instead seem to work, so I'll use that instead.
Still confusing with the different behavior of -i though.