-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Sonar Code Quality Testing Essentials
By :

The Useless Code Tracker plugin is a nice addition, reporting on the total number of lines that can potentially be removed from the source code. It examines and tracks source code on the following three axes and aggregates the results into a single number value:
Duplicated lines
Dead code
Potential dead code
The following screenshot shows the Useless Code Tracker plugin in action. The bold number is the total number of lines that can potentially be removed from your source code. This value is then broken down into the three sections we mentioned. Note that you can click on each section to drill down to class level and review the exact classes with duplicated code.
![]() |
The number of lines that are duplicated and could be potentially eliminated depends on how the duplication is distributed across the source code. What we want to know is how many blocks of code are duplicated, along with a line count for each block. For example, Sonar could report...
Change the font size
Change margin width
Change background colour