Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I dynamically calculate technical debt?

I have a large number of individual, unrelated Java programs in a "Programs" folder, and I'd really like to be able to calculate a technical debt score automatically for each individual program. I understand that SonarQube can allow you to do this (kind of) with Sonar-Runner, however I would really like a way to do this dynamically, so I can have a script analyze and write technical debt scores of all the programs within the "Programs" folder into a csv.

I am perfectly willing and happy to try any other sort of technical debt software (or quality for that matter) if it can do this for me. I would just really appreciate any input, or thoughts about if this would even be possible?

like image 204
mdoc-2011 Avatar asked Nov 24 '13 22:11

mdoc-2011


1 Answers

Yes you can, Sonar is a code analysis tool and has plugins that can even estimate technical debt in man hours or dollars. Really easy to setup and run, you just download it, extract it and start (comes with an internal DB, so no extra dependencies of configurations required). Then if you use maven, you add this to your pom.xml:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>sonar-maven-plugin</artifactId>
    <version>2.0</version>
</plugin>

and run:

maven sonar:sonar

Sonar will then show you all sorts of useful info about your code, include technical debt.

------ Update 1 ------

If you have multiple projects (assuming they are maven), you can make them all children of one parent project and run mvn sonar:sonar on the parent, it will analyze all the children for you. Here is an example of multiple projects.

like image 66
SergeyB Avatar answered Oct 13 '22 20:10

SergeyB