Hi,
I’m an intern looking into how to write custom checks with cppcheck, and I was playing around and got .ctu-info files generated but they were all empty. My question is: what is the implication of an empty .ctu-info file, i.e. will it affect checks that require ctu information? Let’s say I want to write a check to see if a class is derived from another certain class, that would surely require some sort of ctu information, but these empty .ctu-info files got me nervous…
Thanks very much.
Last edit: Charles-the-intern 2022-10-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reply, I've figured it out actually with my custom check against a simple hello world example. As long as you have a compile command database or VS .vcxproj it should work fine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I’m an intern looking into how to write custom checks with cppcheck, and I was playing around and got .ctu-info files generated but they were all empty. My question is: what is the implication of an empty .ctu-info file, i.e. will it affect checks that require ctu information? Let’s say I want to write a check to see if a class is derived from another certain class, that would surely require some sort of ctu information, but these empty .ctu-info files got me nervous…
Thanks very much.
Last edit: Charles-the-intern 2022-10-08
I took a look at the source code cppcheck.cpp and nothing is written out to the .ctu-info files actually
Sorry for late reply.
Cppcheck generates an empty .ctu-info file. And then the addon can add arbitrary information in that.
In your case.. it does not sound like you need CTU analysis. Can you show some simple small code example?
Thanks for the reply, I've figured it out actually with my custom check against a simple hello world example. As long as you have a compile command database or VS .vcxproj it should work fine.