Ran into a problem with --plist-output when running a check against an entire project: The last output file contains additional diagnostic entries not associated with the file being reported.
Looking in the stderr/stdout log we can see that the checks for vos-t.c have diagnostics. Following the reports for vos-t.c, cpp-check is not reporting on what I guess are "global" type of errors (unused functions, etc.)
Looking at the resulting I see that the vos-t output file has a size of 2,8M and includes not only the diagnostics for vos-t.c but the all the "remaining" global diagnostics. These remaining diagnostics however are incorrect in the output plist file in that there is only one "file"
<dict><key>clang_version</key><string>cppcheck version 2.4.1</string><key>files</key><array><string>tests/volser/vos-t.c</string></array><key>diagnostics</key><array>
Yet the "extra" diagnostics" in output all have "location" entries that point back to the one file instead of the file where the problem actually is.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ran into a problem with --plist-output when running a check against an entire project: The last output file contains additional diagnostic entries not associated with the file being reported.
Using the following command line (cppcheck 2.4.1)
cppcheck --cppcheck-build-dir=/tmp/cppcheck-work --enable=all --plist-output=./cppcheck-out/ ./ &> cppcheck.log
Looking in the stderr/stdout log we can see that the checks for vos-t.c have diagnostics. Following the reports for vos-t.c, cpp-check is not reporting on what I guess are "global" type of errors (unused functions, etc.)
Looking at the resulting I see that the vos-t output file has a size of 2,8M and includes not only the diagnostics for vos-t.c but the all the "remaining" global diagnostics. These remaining diagnostics however are incorrect in the output plist file in that there is only one "file"
Yet the "extra" diagnostics" in output all have "location" entries that point back to the one file instead of the file where the problem actually is.
Thanks!
Yes the "global" type of errors are checked after all files have been checked.
I have created ticket https://trac.cppcheck.net/ticket/10366