Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Axes of quality

All the metrics are computed using the approach presented above.

File Length

Total of points accumulated due to the violation of Checkstyle File Length rule. The possible associated technical debts are: Understandability, Maintainability and Single Responsibility Principle violation.

Method Length

Total of points accumulated due to the violation of Checkstyle Method Length rule. The possible associated technical debts are: Understandability, Maintainability and Single Responsibility Principle violation.

Cyclomatic Complexity

Total of points accumulated due to the violation of Checkstyle Cyclomatic Complexity rule. The possible associated technical debts are: Understandability, Maintainability and Testability.

Parameter Number

Total of points accumulated due to the violation of Checkstyle Parameter Number rule. The possible associated technical debts are: Understandability, Maintainability and Testability.

Boolean Expression Complexity

Total of points accumulated due to the violation of Checkstyle Boolean Expression Complexity rule. The possible associated technical debts are: Understandability, Maintainability and Testability.

Nested If Depth

Total of points accumulated due to the violation of Checkstyle Nested If Depth rule. The possible associated technical debts are: Understandability, Maintainability and Testability.

Nested Try Depth

Total of points accumulated due to the violation of Checkstyle Nested Try Depth rule. The possible associated technical debts are: Understandability, Maintainability and Testability.

Missing Switch Default

Total of points accumulated due to the violation of Checkstyle Missing Switch Default rule. The possible associated technical debt is: Correctness.

Class Fan Out Complexity

Total of points accumulated due to the violation of Checkstyle Class Fan out Complexity rule. The possible associated technical debts are: Understandability, Maintainability, Testability and High Coupling.

Class Data Abstraction Coupling

Total of points accumulated due to the violation of Checkstyle Class Data Abstraction Coupling rule. The possible associated technical debts are: Understandability, Maintainability, Testability and High Coupling.

Anon Inner Length

Total of points accumulated due to the violation of Checkstyle Anon Inner Length rule. The possible associated technical debt is: Maintainability.

Average value

Total of points accumulated due violation of all above rules divided by the number of classes that score more than one point.

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

Anchor
ToxicityChartConfiguration
ToxicityChartConfiguration

Installation

Include Page
Include - Plugin Installation
Include - Plugin Installation

Usage

  1. Check on Quality Profile page if the below Checkstyle Rules are enabled and the threshold values are set appropriate
  2. Launch a new quality analysis and the metrics will be fed

The table below lists the Checkstyle rules that should be enabled in order to generate the Toxicity Chart. The threshold values are just suggestions and they can be modified to fit the desired Quality Profile.

 

Checkstyle RuleLevelThreshold
File Lengthfile500
Method Lengthmethod30
Cyclomatic Complexitymethod10
Parameter Numbermethod7
Boolean Expression Complexitystatement3
Nested If Depthstatement3
Nested Try Depthstatement2
Missing Switch Defaultstatement-
Class Fan Out Complexityclass30
Class Data Abstraction Couplingclass10
Anon Inner Lengthinner class35

 

...