Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{iframe:src=http://update.sonarsource.org/plugins/uselesscodetracker-confluence.html|width=700|height=250350|frameborder=0}
Your browser does not support iframes.
{iframe}

Description / Features

The objective of this plugin is to report on the number of lines that can be reduced in an application. It currently works on 3 axes:

1. report on Report the number of duplicated lines that could be reduced
Currently Sonar SonarQube tells you that you have 50 lines involves involved in a duplication. But it does not easily tell easily you whether this is two blocks of 25 lines that are duplicated (in which case you can save 25 lines) or 5 blocks of 10 lines (in which case you can save 40 lines). With the this plugin you get this extra information.  Algorithm The algorithm is following as follows: assuming that refactoring will not cross boundaries of sub-projects (no support for cross-project duplication detection), first occurence occurrence of a duplicated block will survive and all others can be removed.

2. report Report on the number of lines of dead code that could be reduced (only for Java and not available from 4.2)
Currently Sonar SonarQube reports on the number of unsused private method within you your application. This can be done through the PMD:UnusedPrivateMethod rule or through the  SQUID:UnusedPrivateMethod rule. This plugin calculates the number of lines that can be saved for each of them and aggregates them.

3. report Report on the number of lines of potential dead code that could be reduced (only for Java not available from 4.2)
Currently Sonar SonarQube reports on the number of unsused protected method methods within you your application. This can be done through the SQUID:UnusedProtectedMethod rule. This plugin calculates the number of lines that can be saved for each of them and aggregates them.

Image Modified

It is to be noted Note that an unused protected method could be used outside the application through inheritance. This is why we call it potential dead code.

Usage & Installation

...

Include Page
Include - Plugin Installation
Include - Plugin Installation

Usage

  1. Switch on the coding rules that you want to monitor in your quality profile
  2. Run a quality analysis

Changelog

JIRA Issues
anonymoustrue
titleRelease 0.5
height100
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=18274&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

JIRA Issues
anonymoustrue
titleRelease 0.4
height50
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=17508&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

JIRA Issues
anonymoustrue
titleRelease 0.3
height50
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=17203&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

JIRA Issues
anonymoustrue
titleRelease 0.2
height50
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16904&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

JIRA Issues
anonymoustrue
titleRelease 0.1
height50
width900
columnstype;key;summary;priority;status;resolution
urlhttp://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=16840&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000