Has anyone looked at developing a plugin for cppcheck?
I am guessing no plugin exists.
Did you read this; might help you think of how to use cppcheck.
http://wiki.codeblocks.org/index.php?title=UnitTesting
Tim S.
I thought as much too.
As I understand it, cppcheck is not a testing framework but static code analysis - which might come in handy integrated into the CodeBlocks IDE.
I didn't know about CppCheck. I think it's a good idea. I began a plugin for CodeLite for it. If you need help, you can ask me (I created a lib and a base class to use CppCheck without a main).
--
Jérémie
for completeness : CB now already has for some time a CppCheck plug-in :-)
killerbot: can I ask for two features in the CppCheck plugin:
1. I have a quad core and want to set the number of cores that cppcheck will use. This can be done with: "cppcheck -j n"
2. I've talked to cppcheck's devs and they've said that if cppcheck doesn't know some class/struct/type it ignores all usages of this type. Their advice was to use the -I option to replicate the project's (and compiler's) include dirs? Can you implement such mechanism?
good ideas.
I think I already add the include directories of the project.
If this are the executed commands:
cppcheck --version
Cppcheck 1.41
cppcheck --verbose --all --style --xml --file-list=CppCheckInput.txt
There are no -I options...
[push]
Is the -I switch still on any todo list?
I have some extra include dirs making troubles without the -I support.
I know, I know... I only use the forum when I have troubles - and never to give positive feedback :D
I completely forgot about that, thanks for reminding :-)
Support for multiple cores would be nice as well. ;)
From what I remember though, in multi-core mode, not all checks work.
Hi the support for the -I was in the code, as I thought it was. But there was a horrible stupid mistake (shame on me), al that was needed to fix, wa to put the '!' in the right spot ;-) [empty versus !empty]
It could be there is still a minor issue, we the working directory, will look into that too.