Hello,
I'm trying to set up automatic static analysis for our project. Unfortunately we have dependencies on very big third party libraries, which I don't want to include into the analysis. Even though the exclude path is set, when I run the cppcheck CLI with the cppcheck project file, it will still compile all classes of all dependencies for the clang-tidy analysis, which can take up to five hours. Our project alone should compile in about 10 minutes without the dependencies.
My cppcheck project file contains basically only the vcxproj file of our project without dependencies, but it seems to analyse them anyway due to the includes.
Is this a bug or not implemented feature? How can I work around this?
[EDIT]
I have an additional question: Will it be possible (or is it already) to manually adjust the vcxproj compile targets (ProjectConfigurations) to analyse? Our project has around 50 permutations of target platforms and build configs, which also seems to blow up the analysation time. It would be very helpful if I could specify the two targets we actually use the most to make everything a lot faster.
Any help would be much appreciated.
Loofou
Last edit: Loofou 2019-04-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have made fixes recently for excluded directories. Feel free to try out the cppcheck HEAD, compiling it is straightforward..
In the GUI there is in 1.87 a checkbox if you want to check all configurations. If you uncheck that it will only check the first DEBUG configuration it finds. There is some work around this right now so you can specify what configuration you want to check.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It still compiles nearly 200k files, which takes five hours (the project only has 1800 files). Same happens when I set the variable to true.
I was already thinking of doing a preprocess pass on the vcxproj file to remove all other targets but the two we want, but I prefer to be able to specify the targets in the cppcheck file.
What is this work around you talked about?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay. Do you have an estimate on when you might get around to fixing it? Just so I have an idea if it's necessary to do the vcxproj preprocess tool for now or if I just wait for a few weeks.
Thanks for your hard work and the tool in general, btw. It's really great and helpful!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm trying to set up automatic static analysis for our project. Unfortunately we have dependencies on very big third party libraries, which I don't want to include into the analysis. Even though the exclude path is set, when I run the cppcheck CLI with the cppcheck project file, it will still compile all classes of all dependencies for the clang-tidy analysis, which can take up to five hours. Our project alone should compile in about 10 minutes without the dependencies.
My cppcheck project file contains basically only the vcxproj file of our project without dependencies, but it seems to analyse them anyway due to the includes.
Is this a bug or not implemented feature? How can I work around this?
[EDIT]
I have an additional question: Will it be possible (or is it already) to manually adjust the vcxproj compile targets (ProjectConfigurations) to analyse? Our project has around 50 permutations of target platforms and build configs, which also seems to blow up the analysation time. It would be very helpful if I could specify the two targets we actually use the most to make everything a lot faster.
Any help would be much appreciated.
Loofou
Last edit: Loofou 2019-04-10
I have made fixes recently for excluded directories. Feel free to try out the cppcheck HEAD, compiling it is straightforward..
In the GUI there is in 1.87 a checkbox if you want to check all configurations. If you uncheck that it will only check the first DEBUG configuration it finds. There is some work around this right now so you can specify what configuration you want to check.
Thanks for the answer! I will check out HEAD.
Hm for me it seems to be irrelevant what value for the vs configs I put in the cppcheck file, it will always compile everything if it's run via CLI.
Right now I have this in the cppcheck file:
It still compiles nearly 200k files, which takes five hours (the project only has 1800 files). Same happens when I set the variable to true.
I was already thinking of doing a preprocess pass on the vcxproj file to remove all other targets but the two we want, but I prefer to be able to specify the targets in the cppcheck file.
What is this work around you talked about?
Thanks for trying it out. It is work in progress. It will work to check that box... but it does not work right now.
Okay. Do you have an estimate on when you might get around to fixing it? Just so I have an idea if it's necessary to do the vcxproj preprocess tool for now or if I just wait for a few weeks.
Thanks for your hard work and the tool in general, btw. It's really great and helpful!
It's just a guess.. I guess it will take 2-3 weeks.