4

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.

0xC0000022L
  • 20,597
  • 9
  • 86
  • 152

1 Answers1

1

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.

Alex
  • 12,749
  • 3
  • 31
  • 45
  • If by platform you mean the OS: Windows and Linux, both 32 and 64 bit x86 would suffice for starters. The CI system is proprietary at the moment. So anything goes, basically ;) – 0xC0000022L Nov 28 '12 at 01:32
  • No, I meant the CI platform. Most systems already have mechanisms for gathering stats over time. The whole idead is each build you run Clang, extract the number of errors and save that value as an artifact of the build, that way you can graph out the changes over time...or whatever. Some systems (Jenkins) even have mechanisms where if values go up, or cross certain thresholds you can fail the current build – Alex Nov 28 '12 at 15:34