Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Sign Up
Dashboard
SonarQube
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<table class="wysiwyg-macro" data-macro-name="unmigrated-inline-wiki-markup" data-macro-parameters="atlassian-macro-output-type=BLOCK" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e3VubWlncmF0ZWQtaW5saW5lLXdpa2ktbWFya3VwOmF0bGFzc2lhbi1tYWNyby1vdXRwdXQtdHlwZT1CTE9DS30&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>{iframe:src=http://update.sonarsource.org/plugins/uselesscodetracker.html|width=700|height=250|frameborder=0} Your browser does not support iframes. {iframe}</pre></td></tr></table><h1>Description / Features</h1><p>The objective of this plugin is report on the number of lines that can be reduced in an application. It currently works on 3 axes:</p><p><strong>1. Report on number of duplicated lines that could be reduced</strong><br /> Currently SonarQube 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.</p><p><strong>2. Report on the number of lines of dead code that could be reduced (only for Java)</strong><br /> Currently SonarQube reports on the number of unsused private method within you application. This can be done through the <code>PMD:UnusedPrivateMethod</code> or through the <code>SQUID:UnusedPrivateMethod</code>. This plugin calculates the number of lines that can be saved for each of them and aggregates them.</p><p><strong>3. Report on the number of lines of potential dead code that could be reduced <strong>(only for Java)</strong></strong><br /> Currently SonarQube reports on the number of unsused protected method within you application. This can be done through the <code>SQUID:UnusedProtectedMethod</code>. This plugin calculates the number of lines that can be saved for each of them and aggregates them.</p><p><img class="confluence-embedded-image" height="302" width="635" src="/download/attachments/231082357/Sonar+-+Struts+Core.png?version=1&modificationDate=1371665472017" data-image-src="/download/attachments/231082357/Sonar+-+Struts+Core.png?version=1&modificationDate=1371665472017" data-linked-resource-id="231377133" data-linked-resource-type="attachment" data-linked-resource-default-alias="Sonar - Struts Core.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="231082357" title="null > Sonar - Struts Core.png" data-element-title="Sonar - Struts Core.png"></p><p>Note that an unused protected method could be used outside the application through inheritance. This is why we call it potential dead code.</p><h1>Installation</h1><ol><li>Install the plugin through the <a href="http://docs.codehaus.org/display/SONAR/Update+Center" rel="nofollow">Update Center</a> or download it into the <em>SONARQUBE_HOME/extensions/plugins</em> directory</li><li>Restart the SonarQubeserver</li></ol><h1>Usage</h1><ol><li>Switch on the coding rules that you want to monitor in your quality profile</li><li>Run a quality analysis</li></ol><h1>Change Log</h1><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9VmVyc2lvbiAwLjV8aGVpZ2h0PTEwMHxyZW5kZXJNb2RlPXN0YXRpY3x3aWR0aD05MDB8Y29sdW1ucz10eXBlO2tleTtzdW1tYXJ5O3ByaW9yaXR5fHVybD1odHRwOi8vamlyYS5jb2RlaGF1cy5vcmcvc3IvamlyYS5pc3N1ZXZpZXdzOnNlYXJjaHJlcXVlc3QteG1sL3RlbXAvU2VhcmNoUmVxdWVzdC54bWw_Zml4Zm9yPTE4Mjc0JnBpZD0xMTkxMSZzb3J0ZXIvZmllbGQ9aXNzdWVrZXkmc29ydGVyL29yZGVyPURFU0MmdGVtcE1heD0xMDAwfQ&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority|height=100|renderMode=static|title=Version 0.5|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor\=18274&pid\=11911&sorter/field\=issuekey&sorter/order\=DESC&tempMax\=1000|width=900"></p><p> </p><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9VmVyc2lvbiAwLjR8aGVpZ2h0PTUwfHJlbmRlck1vZGU9c3RhdGljfHdpZHRoPTkwMHxjb2x1bW5zPXR5cGU7a2V5O3N1bW1hcnk7cHJpb3JpdHl8dXJsPWh0dHA6Ly9qaXJhLmNvZGVoYXVzLm9yZy9zci9qaXJhLmlzc3Vldmlld3M6c2VhcmNocmVxdWVzdC14bWwvdGVtcC9TZWFyY2hSZXF1ZXN0LnhtbD9maXhmb3I9MTc1MDgmcGlkPTExOTExJnNvcnRlci9maWVsZD1pc3N1ZWtleSZzb3J0ZXIvb3JkZXI9REVTQyZ0ZW1wTWF4PTEwMDB9&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority|height=50|renderMode=static|title=Version 0.4|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor\=17508&pid\=11911&sorter/field\=issuekey&sorter/order\=DESC&tempMax\=1000|width=900"></p><p> </p><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9VmVyc2lvbiAwLjJ8aGVpZ2h0PTUwfHJlbmRlck1vZGU9c3RhdGljfHdpZHRoPTkwMHxjb2x1bW5zPXR5cGU7a2V5O3N1bW1hcnk7cHJpb3JpdHl8dXJsPWh0dHA6Ly9qaXJhLmNvZGVoYXVzLm9yZy9zci9qaXJhLmlzc3Vldmlld3M6c2VhcmNocmVxdWVzdC14bWwvdGVtcC9TZWFyY2hSZXF1ZXN0LnhtbD9maXhmb3I9MTY5MDQmcGlkPTExOTExJnNvcnRlci9maWVsZD1pc3N1ZWtleSZzb3J0ZXIvb3JkZXI9REVTQyZ0ZW1wTWF4PTEwMDB9&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority|height=50|renderMode=static|title=Version 0.2|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor\=16904&pid\=11911&sorter/field\=issuekey&sorter/order\=DESC&tempMax\=1000|width=900"></p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced