Reputation: 1067
I am trying to use cppcheck to analyze my c++ project. My command looks like this:
me@home:trunk/software/cpp/tnoid$ cppcheck -v --enable=all --xml -I ../../../package/build/common/cpp/ -I ../../../package/build/software/cpp/tnoid/ .
You can see where I include (-I) two additional directories. In the results instead of getting those (unfortunately long) relative paths back, it seems truncated, for example:
<error file="/../package/build/common/cpp/libutil/DeleteNullifier.h" line="34" id="postIncrementDecrement" severity="possible style" msg="Pre-Incrementing variable 'iter' is preferred to Post-Incrementing"/>
Perhaps I am using cppcheck incorrectly? Why does the file path in the error appear shortened? It's really messing with the cxx sonar plugins.
EDIT: This is using cppcheck version 1.40
Upvotes: 2
Views: 952
Reputation: 1067
Well as it turns out I needed to upgrade my cppcheck application anyway.
Upgrading to 1.54 solved the problem. Relative paths are now correct.
Upvotes: 1