Latest News

January 18, 2010

SonarJ 5.1 Released

Now with Code Duplicate Search

November 12, 2009

SonarJ Integrates with Codehaus Sonar

Sonar SonarJ Plugin 1.0 Released Today

September 15, 2009

SonarJ 5.0 Released

Architecture Management Never was Easier

Upcoming Events

Mon, May 03 2010
 -
Fri, May 07 2010

Jax 2010

Mainz (Germany)

Quality Rules Based on Metrics

Besides its ability to maintain a logical architecture and to identify cyclic dependencies SonarJ also is able to calculate a bunch of useful metrics:

  • ACD (average component dependency - says a lot about internal coupling)
  • LOC (lines of code - where is the beef?)
  • Cyclomatic complexity (where is the complexity?)
  • Assertion usage
  • Relational cohesion
  • Metrics of Robert C. Martin ( abstractness, instability etc.
  • Many others...

You can define thresholds for all metrics. E.g. you could define an upper bound for cyclomatic complexity of 15. Every developer that tries to create a method with a higher complexity will receive a warning. Then he can try to split the method into several less complex parts.

SonarJ aggregates all the metrics to the higher level. Therefore you can easily find out the cyclomatic complexity of a layer or the lines of code comprising a vertical slice.