Hudson/Jenkins source code metrics?
Asked Answered
C

4

18

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?

Caines answered 11/3, 2011 at 20:9 Comment(1)
as suggested by Graham, please specify your language. Is it Java?Roentgen
A
8

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.

Albertinealbertite answered 14/3, 2011 at 2:11 Comment(0)
G
6

Try CCCC (http://sourceforge.net/projects/cccc/). It does code counting, module counting (classes), etc., and the plugin also graphs it for you. (for C, C++)

Incidently, what language are you looking at?

Guillemot answered 11/3, 2011 at 21:31 Comment(0)
H
6

There's also CLOC (Count lines of Code) which will tell you how many lines of each language you have, although I can't seem to find a link for it.

Hundley answered 22/3, 2011 at 5:32 Comment(2)
by the way, how do you display its results? I could not find a way to display it in nice graph like warnings count.Kinkajou
I haven't looked into it. I'm sure it's possible, but we just have the results in an ASCII-made table in stdout. I.e., it's just raw text with the rest of the console output that's showing the output from various build steps.Hundley
C
5

You don't specify which language you are using, but Redsolo's awesome blog post Guide to building .NET projects using Hudson shows you how to use FxCop and NUnit on Hudson to give some of what you are looking for. The Violations plugin used also supports Simian, CPD, PMD and PyLint.

Cismontane answered 11/3, 2011 at 20:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.