Full documentation for SonarQube has moved to a new location: http://docs.sonarqube.org/display/SONAR

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1. Report on number of duplicated lines that could be reduced
Currently SonarQube TM tells you that you have 50 lines involved in a duplication. But it does not easily tell 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 this plugin you get this extra information. Algorithm is the following: assuming that refactoring will not cross boundaries of sub-projects (no support for cross-project duplication detection), first occurence of duplicated block will survive and all others can be removed.

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

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

...

  1. Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
  2. Restart the SonarQubeTM serverSonarQubeserver

Usage

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

...