[code-quality] Common error format for static analysis tools
David Malcolm
dmalcolm at redhat.com
Wed Apr 3 20:16:33 CEST 2013
Have you seen Firehose:
https://pypi.python.org/pypi/firehose
?
It currently has parsers for 3 different analysis tools (for C/C++ as it
happens, though I'm sure it could support analyzers for other
languages), and my cpychecker tool has a branch that "natively" uses
Firehose, in that it generates errors by creating firehose.model objects
in memory, then writing them out to stderr (and optionally as XML).
I used this for my PyCon US 2013 talk on static analysis of Python
extension modules
http://lists.fedoraproject.org/pipermail/firehose-devel/2013-April/000030.html
specifically, I used the XML serialization format to reliably extract
warnings from a mass-rebuild of 370 packages, then used the JSON
serialization format to get them into mongodb, which is how I generated
the graphs in my talk.
I also have some report-generation code using this format:
http://lists.fedoraproject.org/pipermail/firehose-devel/2013-February/000005.html
The formats and APIs aren't yet set in stone, in case we need to make
changes for analyzers for python code.
Hope this is helpful
Dave
More information about the code-quality
mailing list