[splint-discuss] Running Splint on entire project (util script)

Campbell Barton ideasman42 at gmail.com
Sat Dec 20 18:52:50 PST 2008


Hi there, thanks for splint!
Just used it to fix a bug over 10 years old :)

To use splint on many files I wrote a util that could be of use to
others (or I might have re-invented the wheel :/)

I wanted to run splint on all C files in Blender3D, ~1973 of them, but
getting the includes right for each file is annoying.

So I wrote a simple python script that parses the output of a clean
build and runs splint on every C file.

"gcc -o blah.o -O2 -I/myinclude some.c"
... looks for the -I* and *.c itens and runs
"splint  -I/myinclude some.c"

Tested it to work with python and pygame also
http://wiki.blender.org/index.php/User:Ideasman42#Using_Splint_Static_C_Source_Checking

Would be interested to know if there are better tools, or if others
find this useful.

-- 
- Campbell


More information about the splint-discuss mailing list