Question

The Clang static analyzer has proved much more reliable than PC-Lint and other Lint variants and similar software in picking up actual issues (not surprisingly, when reading the background). The scan-build method is nice even for automatic builds, but it lacks one important feature that I haven't found any information about. How can I figure out whether or not the latest commit worsened the overall code quality or not?! I'd have to compare the error counts from a previous run, sure thing. But parsing the HTML (also given the pseudo-random naming scheme) seems rather odd.

What ways are there to get a meaningful integration of the static analyzer in such a scenario?

Note: just running ccc-analyzer doesn't seem to make a lot of sense here either. Although in this case the output is text-only (i.e. not HTML) and thus easier parsed. But I'm open for suggestions even if they involve running ccc-analyzer on the individual files instead of scan-build on the whole make process.

Was it helpful?

Solution

You mention you are using Continuous Integration, but you don't mention what platform you are using. I think what you are looking for should be in the platforms reporting. Most CI platforms will track a number of key metrics for reporting and graphing. If you figured out how yor system worked you should be able to keep track of the error counts from each build and then your graphs should provide an easy visual clue to numbers going up over time. Or, possibly, you could use your platforms API to deteremine if the value in the current build is higher than the value in the last build.

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