Search code examples
continuous-integrationhudsoncode-metricsjenkins

Hudson/Jenkins source code metrics?


Are there any useful plugins for source code metrics for Hudson/Jenkins?

I'm looking for total lines of code, total number of tests, classes, etc. with graphing.

Does anything like this exist?


Solution

  • Are you using Java? If so, SONAR should certainly be your first port of call. It does a lot on it's own and also wraps up all the major Java analysis tools, such as:

    Out of the box, you'll get metrics on:

    • Potential Architectural & Design issues
    • Unit test coverage (uses cobertura)
    • Lines of code\packages\classes etc
    • Potential bugs
    • Code duplication
    • Adherence to code formatting standards
    • (plus many more)

    It allows you to traverse from the high level analysis through to the source code it relates to. It will be easier if you're using Maven for your build though...

    There is a Hudson plugin. And it's free.