Closed gilprime closed 7 years ago
--config-exclude
does not exclude files from check (just doesn't count its ifdef
s), so maybe you have wrong expectations about it.--suppress
might not work because of relative paths. Either you should use absolute paths (by hand or via variables) or wildcards (not sure about --config-exclude
, but --suppress
definitely supports it).So, in short, how i see it:
--check-config
for decreasing number of configurations (ifdef
combinations) check--suppress
to hide messages from matching files (they are still checked, just not printed)I haven't see the plugin's field, nice to know.
Anyway, i've tried to add the files in the plugins field, they are already checked... Plus the --suppress does not remove the errors from the output problems...
I have quickly see the code, and it generates a temporary file with all the files to check, why the files in the plugin ignore pattern that are matching are not removed from that file ?
Currently using Windows 7 x64 - QtCreator 4.4.0 - Qtccppcheck 4.4.0
Just checked - works both suppression and exclusion.
Try --suppress=*:*quazip.h
in cppcheck's args or *quazip.h
in plugin's settings.
Thanks, the * before the file name in the --suppress
argument solves the problem.
As the custom parameters now works properly, see issue #30 , I've tried now to exclude lib files from my project, all the external library files are located in the libs directory.
So i've tried the
--config-exclude=libs/
this does not work properly. After viewing the issue #17 i've tested the --suppress option without success.If i use the --suppress on some files here is the command line executed :
Starting CppChecker with:C:/Program Files/Cppcheck/cppcheck.exe, --std=c++11 --language=c++ -j9 --suppress=*:quazip.cpp --suppress=*:quazip.h --suppress=*:qioapi.cpp --suppress=*:quazip_unzip.cpp --config-exclude=libs/ --enable=warning,style,performance,portability,information,missingInclude,unusedFunction --template={file},{line},{severity},{id},{message} --file-list=C:/Users/Myself/AppData/Local/Temp/qtcreator.V15064 --includes-file=C:/Users/Myself/AppData/Local/Temp/qtcreator.n15064
In the previous command line, my custom parameters are the following :
--std=c++11 --language=c++ -j9 --suppress=*:quazip.cpp --suppress=*:quazip.h --suppress=*:qioapi.cpp --suppress=*:quazip_unzip.cpp --config-exclude=libs/
It already checks for the unwanted files.
I've also tried to surround the --suppress parameter with quotation marks, and this leads to the following execution warning :
Failed to add suppression. Invalid id ""*"
Currenly using Windows 7 x64 - QtCreator 4.3.1 - Qtccppcheck 4.3.1