Reputation: 151
I am working in an MFC application (around 2000 files) with Visual Studio 2008. I run Cppcheck for this application, but I found these two issues.
Issue toomanyconfigs: (Information -- The checking of the file will be interrupted because there are too many #ifdef configurations. Checking of all #ifdef configurations can be forced by --force command line option or from GUI preferences. However that may increase the checking time.)
Issue missingInclude: (Information -- Cppcheck cannot find all the include files. Cppcheck can check the code without the include files found. But the results will probably be more accurate if all the include files are found. Please check your project's include directories and add all of them as include directories for Cppcheck. To see what files Cppcheck cannot find, use --check-config.)
My Cppcheck argument list is cppcheck --quiet --verbose --check-config --force --enable=all --suppress=missingIncludeSystem --template=vs --std=c++11 $(ItemPath)
How can I resolve these issues?
Upvotes: 0
Views: 4164
Reputation: 3037
I am a Cppcheck developer.
It is weird that you get the toomanyconfigs when you used --force
. If you can create a file that reproduce the problem, please report it in our issue tracker. You can probably remove all code in the file and just keep the preprocessor directives.
You can specify include paths with -I
.
Cppcheck-1.76 (next version) will be able to import Visual Studio 2010 and later solution files so you get includepaths automatically. Maybe that will be interesting to test.
Upvotes: 3