Question

I'm looking for a static analysis tool with the maturity of splint that also produces test coverage analysis of the code. For instance, all non-static functions in libfoo.c should be present in libfoo.h, by that token all functions in libfoo.h should have unit tests.

Of course, such behavior would need some kind of granular control, but this would be defined in some kind of start up configuration file for the static analysis tool.

I'm working on a project that is moving very quickly, all kinds of stuff is being added daily, I'm hoping to find some static analysis tool that helps ensure unit test coverage remains adequate. Its a large, geographically distributed team which means stuff gets committed 24/7, I need nightly builds to be smarter.

I don't need it to be super smart, I just need it to break the build if something isn't being tested, unless its explicitly taken out of scope.

CCAN is working on something similar, however its going to be months before anything substantial is written. I also need something mature.

Thanks in advance for links to any gems.

Was it helpful?

Solution

The GCC documentation points the reader to gcov for code coverage analysis. This 2005 Dr. Dobbs article on Defensive programming includes a discussion of using gcov.

OTHER TIPS

You may be interested in checking out: What is the best command-line tool to clean up code? I don't know if it will help, but there are many great suggestions on there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top