Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
{iframe:src=http://update.sonarsource.org/plugins/qualityindex.html|width=700|height=250|frameborder=0} Your browser does not support iframes. {iframe}
Wiki Markup
Warning
titleDeprecated

This plugin is deprecated since SonarQube 4.0. Please move to the concept of Technical Debt introduced in SonarQube 4.0.

Description / Features

Overview

The Quality Index plugin combines a global measure (quality index) of quality with a measure of the method complexity (complexity factor).

The Quality Index measures 4 weighted axes of quality and combines them to give a global note score between 0 and 10 to the project, 10 being the best.

Image RemovedImage Added

Axes of

...

Quality

Coding

Coding violationsissues: a PMD compliance index

Coding = (Blocker * 10 + Critical * 5 + Major * 3 + Minor + Info) / ValidLines

Where:

  • ValidLines = Lines of Code Code - Duplicated Lines
  • Blocker = number of PMD blocker violationsissues
  • Critical = number of PMD critical violationsissues
  • Major = number of PMD major violationsissues
  • Minor = number of PMD minor violationsissues
  • Info = number of PMD info violationsissues

Complexity

Complexity = (Complexity>30 * 10 + Complexity>20 * 5 + Complexity>10 * 3 + Complexity>1) / ValidLines

Where:

  • ValidLines = Lines  Lines of Code Code - Duplicated  Duplicated Lines
  • Complexity>X = number of methods whose Complexity is greater than X

Coverage

Coverage = Code coverage by unit tests.

If there are no unit tests and thus no code coverage, the Coverage axis will get the worst grade.

Style

Style violationsissues: a Checkstyle compliance index

Style = (Errors * 10 + Warnings) / ValidLines * 10

Where:

  • ValidLines = Lines  Lines of Code Code - Duplicated  Duplicated Lines
  • Errors = number of Checkstyle blocker violations issues+ number of Checkstyle critical violationsissues
  • Warnings = number of Checkstyle major violations issues+ number of Checkstyle minor violations issues+ number of Checkstyle info violationsissues

Quality Index

Quality Index = 10 - 4.5 * Coding - 2 * Complexity - 2 * Coverage - 1.5 * Style

Complexity Factor

The Complexity Factor measures the complexity density.

...

  • Complexity>X = number of methods whose Complexity is whose Complexity is greater than X

Usage & Installation

1. Copy the jar into /extensions/plugins/ directory
2. Restart Sonar Web server
3. Launch

Include Page
Include - Plugin Installation
Include - Plugin Installation

Usage

Run a new quality analysis and the metrics will be fed.

...

Change Log

JIRA Issues
anonymoustrue
titleQI Version 1.1.3
height70
renderModestatic
width950900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=17202&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

...

JIRA Issues
anonymoustrue
titleQI Version 1.1.2
height70
renderModestatic
width950900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16918&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

...

JIRA Issues
anonymoustrue
titleQI Version 1.1.1
height50
widthrenderMode950
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16290&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleQI 1.1
height70
width950static
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=1622016290&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

 

JIRA Issues
anonymoustrue
titleQI 1.0
height150
width950
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=15741&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000