The Useless Code Tracker plugin

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.

Tracking duplicated lines

The number of lines that are ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.