Hi all,
Kris has been improving our code using hints from cppcheck. I have started to use this program too, and already found some bugs with it. It seems like a really great program, and I encourage you to have a look at our code with it.
Windows devs: yes this program has a nice Windows GUI !
Cheers, Johan
On Sat, Oct 29, 2011 at 6:40 AM, Johan Engelen <jbc.engelen@...2592...> wrote:
Hi all,
Kris has been improving our code using hints from cppcheck. I have started to use this program too, and already found some bugs with it. It seems like a really great program, and I encourage you to have a look at our code with it.
Windows devs: yes this program has a nice Windows GUI !
Cheers, Johan
Hi Johan, for blender3d I've setup convenience make targets for static checkers (though they could be triggered by a shell script or whatever)
--- output from `make help`, snip
Static Source Code Checking (not assosiated with building blender) * check_cppcheck - run blender source through cppcheck (C & C++) * check_splint - run blenders source through splint (C only) * check_sparse - run blenders source through sparse (C only)
--- Scripts if anyones interested: https://svn.blender.org/svnroot/bf-blender/trunk/blender/build_files/cmake/p... https://svn.blender.org/svnroot/bf-blender/trunk/blender/build_files/cmake/c... https://svn.blender.org/svnroot/bf-blender/trunk/blender/GNUmakefile
The reason I found it better to have targets rather then just running cppcheck directly is that I use cmake to get the defines and includes for each C/C++ file for more useful results.
Using some generic scripts to get this info for each C/C++ file its possible to add extra tools quite easily.
if anyones interested I could set this up for inkscape too - but probably using a python script since in-source-makefiles can't be used like we have in blender.
On 30-10-2011 7:44, Campbell Barton wrote:
On Sat, Oct 29, 2011 at 6:40 AM, Johan Engelen <jbc.engelen@...2592...> wrote:
Hi all,
Kris has been improving our code using hints from cppcheck. I have started to use this program too, and already found some bugs with it. It seems like a really great program, and I encourage you to have a look at our code with it.
Windows devs: yes this program has a nice Windows GUI !
Cheers, Johan
Hi Johan, for blender3d I've setup convenience make targets for static checkers (though they could be triggered by a shell script or whatever)
--- output from `make help`, snip
Static Source Code Checking (not assosiated with building blender)
- check_cppcheck - run blender source through cppcheck (C& C++)
- check_splint - run blenders source through splint (C only)
- check_sparse - run blenders source through sparse (C only)
Scripts if anyones interested: https://svn.blender.org/svnroot/bf-blender/trunk/blender/build_files/cmake/p... https://svn.blender.org/svnroot/bf-blender/trunk/blender/build_files/cmake/c... https://svn.blender.org/svnroot/bf-blender/trunk/blender/GNUmakefile
The reason I found it better to have targets rather then just running cppcheck directly is that I use cmake to get the defines and includes for each C/C++ file for more useful results.
Using some generic scripts to get this info for each C/C++ file its possible to add extra tools quite easily.
if anyones interested I could set this up for inkscape too - but probably using a python script since in-source-makefiles can't be used like we have in blender.
Priority for me is getting cmake building to work on Windows. But after that, I would be very happy if you can add this "make cppcheck" functionality. (right now, I cannot easily run cppcheck on only the files that have changed)
Cheers, Johan
participants (2)
-
Campbell Barton
-
Johan Engelen