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 20 Next »

Name

Technical Debt Plugin

Authors

Freddy Mallet, Olivier Gaudin

Jira

http://jira.codehaus.org/browse/SONARPLUGINS/component/13850

Most Recent Version

0.2

State

Under development

License

LGPL v3

Sources

http://svn.codehaus.org/sonar-plugins/trunk/technical-debt/

Download

technical-debt-0.1.jar

Compatibility with Sonar

Plugin versions

1.8

1.9

0.1

(tick)

0.2

(tick)

Description / Features

The Technical Debt plugin is an advanced metric that combines existing quality axes (Duplication, Violations, Complexity, Coverage, Documentation) to output a global measure.

To make it easy to understand, this global indicator reports how much it would cost to bring all axis to maximum values (no violation, no duplication...) and therefore reimburse the Technical Debt.  The indicator is calculated in man days and in $$ (that is now really easy to understand, isn't it ?). Next to the technical debt appears the repartition of each quality axis

Clicking on the debt brings to the usual drill down page showing modules / packages / classes most impacted

This plugin does not pretend to calculate in an exact manner the cost of reimbursement. Here are its primary objectives :

- enables to compare the projects global level of quality, rather than axis by axis

- help to understand what axis is going to cost most, thank to the repartition

Here is how the debt is currently calculated at resource level:

Debt(in man days)

cost_to_fix_duplications +
cost_to_fix_violations +
cost_to_comment_public_API +
cost_to_fix_uncovered_complexity +
cost_to_bring_complexity_below_threshold

Where :

cost_to_fix_duplications

cost_to_fix_one_block * duplicated_blocks

cost_to_fix_violations

cost_to fix_one_violation * mandatory_violations

cost_to_comment_public_API

cost_to_comment_one_API * public_undocumented_api

cost_to_fix_uncovered_complexity

cost_to_cover_one_of_complexity * uncovered_complexity_by_tests (it is considered that 80% of coverage is the objective)

cost_to_bring_complexity_below_threshold

cost_to_split_a_method * (function_complexity_distribution >= 8) +
cost_to_split_a_class * (class_complexity_distribution >= 60)

Default values for costs can be adjusted by going to Configuration -> Settings -> Technical Debt.

Usage & Installation

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

Known limitations

A significant improvement to the would be to gather manual measures : see SONARPLUGINS-91

Having a weight on coding rules or being able to distinguish checkstyle, PMD and Findbugs would add a lot accuracy


  • No labels