Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »


Total Quality Plugin


Martin e72636


Most Recent Version

1.0-SNAPSHOT (check version compatibility )


Sonar 2


Under development



Source Code

Download jar


Description / Features

Total Quality plugin combines four domains measures (architecture, design, code, and tests) in order to calculate a global and unified project quality health.



Architecture measure is composed of two metric, COH based on cyclic dependencies, and ADI obtained from the distance.

  • COH ask for file cycles at packages (dir) scope and sums it for project scope.

Default architecture function

Architecture = 100 * COH + 0 * ADI


Design is more complete than Architecture, combines five metrics, NOM, LCOM4, RFC, CBO, and DIT.

  • NOM, decorates functions and classes complexities (50% each one). Reads global weight (aceleration value) and default limits (function 2.5 and class 12). Code sample,
  • LCOM4, based on lcom4 with global acel and 1.0 as default limit.
  • RFC, based on rfc core metric with global acel and 50.0 as default limit.
  • CBO, based on cbo core metric with global acel and 5.0 as default limit.
  • DIT, based on dit core metric with global acel and 5.0 as default limit.

Default design function

Design = 0.15*NOM + 0.15*LCOM + 0.25*RFC 0.25*CBO + 0.20*DIT


Code quality combines rule violations, public api documentation, and dryness (duplicate code inverse).

Code = 0.15*DOC + 0.45*RULES + 0.40*DRYNESS


Testing quality is based on coverage metric family (coverage, line coverage, and brach coverage).

Test = 0.40*COV + 0.30*LINE + 0.30*BRANCH

Total Quality

Total quality default value,

TQ = 0.25*CODE + 0.25*ARCH + 0.25*DESIGN + 0.25*TEST


Every limit and every formula should be configure with administration view.
If you want to remove a metric just do,

"ARCH=0.25 DESIGN=0.25 CODE=0.50 TESTS=0.00"

Known limitations and TODO

  • No dashboard widget so you have to check metrics with components list, projects list, radiators, etc.

Usage & Installation

1. Copy the jar into /extensions/plugins/ directory
2. Restart Sonar Web server
3. Launch a new quality analysis and the metrics will be fed

  • No labels