Appendix A. Sonar Metrics Index

This appendix lists all Sonar metrics in separate categories along with a brief description for each metric and information on where to locate it within the Sonar user interface.

Sonar metrics

Sonar metrics are categorized into the following categories:

  • Complexity
  • Design and Architecture
  • Documentation
  • Duplication
  • General
  • Unit Tests
  • Rules Compliance and Violations
  • Project Size
  • Management

Complexity metrics

Complexity metrics are available in the Complexity and Quality Index widgets in the dashboard. The Quality Index widget is available as a plugin.

Metric name


Sonar component


The total Cyclomatic Complexity number was introduced by McCabe. For each of the following java statements the number increments ...

Get Sonar Code Quality Testing Essentials now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.