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

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 between 0 and 10 to the project, 10 being the best.

Axes of Quality

Coding

Coding issues: a PMD compliance index

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

Where:

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

Complexity

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

Where:

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

Coverage

Coverage = Code coverage by unit tests.

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

Style

Style issues: a Checkstyle compliance index

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

Where:

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

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 Factor = (5 * Complexity>30) * 100 / (Complexity>1 + Complexity>10 + Complexity>20 + Complexity>30)

Where:

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

Installation

  1. Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
  2. Restart the SonarQube server

Usage

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

Change Log

Loading

Version 1.1.3 (1 issues)

Type Key Summary Priority
Improvement SONARPLUGINS-972 Remove usage of SquidSearch Major

 

Loading

Version 1.1.2 (1 issues)

Type Key Summary Priority
Task SONARPLUGINS-766 Use sonar-plugin packaging Major

 

Loading

Version 1.1.1 (1 issues)

 

  • No labels