O'Reilly logo

Sonar Code Quality Testing Essentials by Charalampos Arapidis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required