1

I have installed Jenkins for my projects. The automatic build and deployment is happening successfully. I would like to get following data:

  1. No. of classes with lines in the range 0-50
  2. No. of classes with lines in the range 301-500
  3. No. of classes with lines in the range 501-1000
  4. No. of classes with lines > 1000 etc.

I'd like the same things for methods: Eg: No. of methods with lines in the range 0-50 How can I get this data?

Please let me know.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52

4 Answers4

2

I suggest you use http://cloc.sourceforge.net/

You can then extract the data as SQL data import it in a H2 database (in-memory) to group accordingly to your needs.

Pat B
  • 1,915
  • 23
  • 40
1

Perhaps more than you need, but have you looked at Sonar? (http://www.sonarsource.org/) It integrates with your build, and can provide the metrics you're looking for and a lot more besides.

Dennis S.
  • 2,081
  • 14
  • 14
0

There are several other useful and easy to use tools:

Some relevant tools:

You can also use XRadar to aggregate all these report and get something called "Project health". XRadar also supports previously mentioned CLOC

Renat Gilmanov
  • 17,735
  • 5
  • 39
  • 56
0

I do not know if the issue is still relevant to you. The other responses do not address Jenkins. There are several plugins for Jenkins, such as http://www.dwheeler.com/sloccount/. After you install the plugin, you can retrieve code metrics via the Jenkins REST API.

andi
  • 21
  • 1
  • 4