Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: dwmcqueen on September 17, 2009, 05:01:13 pm

Title: Plugin for cppcheck
Post by: dwmcqueen on September 17, 2009, 05:01:13 pm
Has anyone looked at developing a plugin for cppcheck?
Title: Re: Plugin for cppcheck
Post by: stahta01 on September 17, 2009, 06:33:51 pm
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.
Title: Re: Plugin for cppcheck
Post by: dwmcqueen on September 17, 2009, 08:03:40 pm
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. 
Title: Re: Plugin for cppcheck
Post by: jfouche on September 18, 2009, 04:07:10 pm
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
Title: Re: Plugin for cppcheck
Post by: killerbot on January 27, 2010, 10:08:24 pm
for completeness : CB now already has for some time a CppCheck plug-in :-)
Title: Re: Plugin for cppcheck
Post by: oBFusCATed on May 06, 2010, 05:09:16 am
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?
Title: Re: Plugin for cppcheck
Post by: killerbot on May 06, 2010, 07:03:42 am
good ideas.

I think I already add the include directories of the project.
Title: Re: Plugin for cppcheck
Post by: oBFusCATed on May 06, 2010, 01:44:27 pm
If this are the executed commands:
Code
cppcheck --version
Cppcheck 1.41
cppcheck --verbose --all --style --xml --file-list=CppCheckInput.txt
There are no -I options...
Title: Re: Plugin for cppcheck
Post by: gku on August 25, 2010, 06:23:53 pm
[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
Title: Re: Plugin for cppcheck
Post by: killerbot on August 25, 2010, 06:46:10 pm
I completely forgot about that, thanks for reminding :-)
Title: Re: Plugin for cppcheck
Post by: ironhead on September 01, 2010, 12:33:50 pm
Support for multiple cores would be nice as well. ;)

From what I remember though, in multi-core mode, not all checks work.
Title: Re: Plugin for cppcheck
Post by: killerbot on October 01, 2010, 01:10:03 pm
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.