Clang Stationary Analyzer and Continuous Integration?

The Clang static analyzer turned out to be much more reliable than PC-Lint and other Lint variants and similar software for collecting actual problems (which is not surprising when you read the background). The scan-build method is good even for automatic builds, but it lacks one important function about which I did not find any information. How can I find out if the last completion worsened the overall quality of the code or not? I would have to compare the number of errors from the previous run, sure thing. But parsing HTML (also considering a pseudo-random naming scheme) seems rather strange.

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

Note: just running ccc-analyzer doesn't make much sense either. Although in this case, the output is textual (i.e., not HTML), and therefore easier to parse. But I'm open to suggestions, even if they include running ccc-analyzer for individual files instead of scan-build in general make .

+4
source share
1 answer

You mentioned that you are using Continuous Integration, but do not indicate which platform you are using. I think what you are looking for should be in platform reports. Most CI platforms will track a series of key metrics for reports and graphs. If you figure out how the yor system works, you should be able to track the number of errors from each assembly, and then your graphs should provide an easy visual key to numbers that grow over time. Or, perhaps you can use the platform APIs to determine if the value in the current assembly exceeds the value specified in the last assembly.

+1
source

All Articles