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
Sonar
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/javascript.html|width=700|height=250|frameborder=0} Your browser does not support iframes. {iframe}</pre></td></tr></table><table class="wysiwyg-macro" data-macro-name="tip" data-macro-parameters="title=Live example" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e3RpcDp0aXRsZT1MaXZlIGV4YW1wbGV9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p>If you want to see a live example of the capabilities of the JavaScript plugin, you can have a look at the analysis of the <a href="http://nemo.sonarsource.org/dashboard/index/jquery">jQuery project on Nemo</a>.</p></td></tr></table><h1>Description / Features</h1><p>The plugin enables analysis of JavaScript projects within Sonar.</p><p>I<span>t is compatible with </span><span>the </span><a href="http://docs.codehaus.org/display/SONAR/Issues+Report+Plugin">Issues Report plugin</a><span> to run pre-commit local analysis.</span></p><h1>Installation</h1><ol><li>Install the JavaScript plugin through the <a class="confluence-link" href="/display/SONAR/Update+Center" data-linked-resource-id="185598091" data-linked-resource-type="page" data-linked-resource-default-alias="Update Center" data-base-url="http://docs.codehaus.org">Update Center</a> or download it into the SONAR_HOME/extensions/plugins directory</li><li>Restart the Sonar server</li></ol><h1>Usage</h1><h3>Run a Sonar Analysis with the Sonar Runner (Recommended Way)</h3><p>To launch a Sonar analysis of your JavaScript project, use the <a href="http://docs.codehaus.org/display/SONAR/Analyzing+with+Sonar+Runner">Sonar Runner</a>.</p><p>A sample project is available on GitHub that can be <a class="external-link" href="https://github.com/SonarSource/sonar-examples" rel="nofollow">browsed</a> or <a class="external-link" href="https://github.com/SonarSource/sonar-examples/zipball/master" rel="nofollow">downloaded</a>: /projects/languages/javascript/javascript-sonar-runner.</p><h3>Run a Sonar Analysis with the other Analyzers</h3><p><a href="http://docs.codehaus.org/display/SONAR/Analyzing+with+Maven">Maven</a> and <a href="http://docs.codehaus.org/display/SONAR/Analyzing+with+Ant+Task">Ant</a> can also be used to launch analysis on JavaScript projects.</p><h3>Unit Tests and Code Coverage Reports</h3><p>Reports from <a href="http://code.google.com/p/js-test-driver/">JsTestDriver</a> can be imported into Sonar.</p><p>A sample project is available on Github (can be <a class="external-link" href="https://github.com/SonarSource/sonar-examples" rel="nofollow">browsed</a> or <a class="external-link" href="https://github.com/SonarSource/sonar-examples/zipball/master" rel="nofollow">downloaded</a>): this is a <span style="font-size: 10.0pt;line-height: 13.0pt;">JavaScript project analyzed with the </span><a class="confluence-link" href="/display/SONAR/Analyzing+with+Sonar+Runner" data-linked-resource-id="192872482" data-linked-resource-type="page" data-linked-resource-default-alias="Analyzing with Sonar Runner" data-base-url="http://docs.codehaus.org">Sonar Runner</a><span style="font-size: 10.0pt;line-height: 13.0pt;"> reusing unit tests and code coverage reports generated with </span><a href="http://code.google.com/p/js-test-driver/" style="font-size: 10.0pt;line-height: 13.0pt;">JsTestDriver</a>. It is located in <span style="font-size: 10.0pt;line-height: 13.0pt;">/projects/languages/javascript/javascript-sonar-runner-JsTestDriver.</span></p><h1>Metrics</h1><p>See <a class="confluence-link" href="/display/SONAR/Metric+definitions" data-linked-resource-id="230397406" data-linked-resource-type="page" data-linked-resource-default-alias="Metric definitions" data-base-url="http://docs.codehaus.org">Metrics documentation page</a>.</p><h1>Extending Coding Rules using XPath</h1><p>New coding rules can be added using XPath. See the related <a class="confluence-link" href="/display/SONAR/Extending+Coding+Rules#ExtendingCodingRules-extendingRulesXPath" data-anchor="extendingRulesXPath" data-linked-resource-id="183205932" data-linked-resource-type="page" data-linked-resource-default-alias="Extending Coding Rules#extendingRulesXPath" data-base-url="http://docs.codehaus.org">documentation</a>.</p><p>To navigate the AST, download the <a href="http://repository.codehaus.org/org/codehaus/sonar-plugins/javascript/sslr-javascript-toolkit/1.3/sslr-javascript-toolkit-1.3.jar">SSLR JavaScript Toolkit</a><a href="http://repository.codehaus.org/org/codehaus/sonar-plugins/javascript/javascript-devkit/1.0/javascript-devkit-1.0.jar">.</a></p><h1>Change Log</h1><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9VmVyc2lvbiAxLjQgKHVucmVsZWFzZWQpfGhlaWdodD02MHxyZW5kZXJNb2RlPXN0YXRpY3xjb2x1bW5zPXR5cGU7a2V5O3N1bW1hcnk7cHJpb3JpdHk7c3RhdHVzfHVybD1odHRwOi8vamlyYS5jb2RlaGF1cy5vcmcvc3IvamlyYS5pc3N1ZXZpZXdzOnNlYXJjaHJlcXVlc3QteG1sL3RlbXAvU2VhcmNoUmVxdWVzdC54bWw_Zml4Zm9yPTE5MTQ1JnBpZD0xMTkxMSZzb3J0ZXIvZmllbGQ9cHJpb3JpdHkmc29ydGVyL29yZGVyPURFU0MmdGVtcE1heD0xMDAwfQ&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority;status|height=60|renderMode=static|title=Version 1.4 (unreleased)|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor\=19145&pid\=11911&sorter/field\=priority&sorter/order\=DESC&tempMax\=1000"></p><p> </p><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9VmVyc2lvbiAxLjN8aGVpZ2h0PTYwfHJlbmRlck1vZGU9c3RhdGljfGNvbHVtbnM9dHlwZTtrZXk7c3VtbWFyeTtwcmlvcml0eXx1cmw9aHR0cDovL2ppcmEuY29kZWhhdXMub3JnL3NyL2ppcmEuaXNzdWV2aWV3czpzZWFyY2hyZXF1ZXN0LXhtbC90ZW1wL1NlYXJjaFJlcXVlc3QueG1sP2ZpeGZvcj0xOTA1MiZwaWQ9MTE5MTEmc29ydGVyL2ZpZWxkPXByaW9yaXR5JnNvcnRlci9vcmRlcj1ERVNDJnRlbXBNYXg9MTAwMH0&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority|height=60|renderMode=static|title=Version 1.3|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor\=19052&pid\=11911&sorter/field\=priority&sorter/order\=DESC&tempMax\=1000"></p><p> </p><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9VmVyc2lvbiAxLjJ8aGVpZ2h0PTYwfHJlbmRlck1vZGU9c3RhdGljfGNvbHVtbnM9dHlwZTtrZXk7c3VtbWFyeTtwcmlvcml0eXx1cmw9aHR0cDovL2ppcmEuY29kZWhhdXMub3JnL3NyL2ppcmEuaXNzdWV2aWV3czpzZWFyY2hyZXF1ZXN0LXhtbC90ZW1wL1NlYXJjaFJlcXVlc3QueG1sP2ZpeGZvcj0xODgzMiZwaWQ9MTE5MTEmc29ydGVyL2ZpZWxkPXByaW9yaXR5JnNvcnRlci9vcmRlcj1ERVNDJnRlbXBNYXg9MTAwMH0&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority|height=60|renderMode=static|title=Version 1.2|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor\=18832&pid\=11911&sorter/field\=priority&sorter/order\=DESC&tempMax\=1000"></p><p> </p><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9VmVyc2lvbiAxLjF8aGVpZ2h0PTYwfHJlbmRlck1vZGU9c3RhdGljfGNvbHVtbnM9dHlwZTtrZXk7c3VtbWFyeTtwcmlvcml0eXx1cmw9aHR0cDovL2ppcmEuY29kZWhhdXMub3JnL3NyL2ppcmEuaXNzdWV2aWV3czpzZWFyY2hyZXF1ZXN0LXhtbC90ZW1wL1NlYXJjaFJlcXVlc3QueG1sP2ZpeGZvcj0xODU3MiZwaWQ9MTE5MTEmc29ydGVyL2ZpZWxkPXByaW9yaXR5JnNvcnRlci9vcmRlcj1ERVNDJnRlbXBNYXg9MTAwMH0&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority|height=60|renderMode=static|title=Version 1.1|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor\=18572&pid\=11911&sorter/field\=priority&sorter/order\=DESC&tempMax\=1000"></p><p> </p><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9VmVyc2lvbiAxLjB8aGVpZ2h0PTYwfHJlbmRlck1vZGU9c3RhdGljfGNvbHVtbnM9dHlwZTtrZXk7c3VtbWFyeTtwcmlvcml0eXx1cmw9aHR0cDovL2ppcmEuY29kZWhhdXMub3JnL3NyL2ppcmEuaXNzdWV2aWV3czpzZWFyY2hyZXF1ZXN0LXhtbC90ZW1wL1NlYXJjaFJlcXVlc3QueG1sP2ZpeGZvcj0xODI0OCZwaWQ9MTE5MTEmc29ydGVyL2ZpZWxkPXByaW9yaXR5JnNvcnRlci9vcmRlcj1ERVNDJnRlbXBNYXg9MTAwMH0&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority|height=60|renderMode=static|title=Version 1.0|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor\=18248&pid\=11911&sorter/field\=priority&sorter/order\=DESC&tempMax\=1000"></p><p> </p><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9VmVyc2lvbiAwLjR8aGVpZ2h0PTYwfHJlbmRlck1vZGU9c3RhdGljfGNvbHVtbnM9dHlwZTtrZXk7c3VtbWFyeTtwcmlvcml0eXx1cmw9aHR0cDovL2ppcmEuY29kZWhhdXMub3JnL3NyL2ppcmEuaXNzdWV2aWV3czpzZWFyY2hyZXF1ZXN0LXhtbC90ZW1wL1NlYXJjaFJlcXVlc3QueG1sP2ZpeGZvcj0xNzI0NyZwaWQ9MTE5MTEmc29ydGVyL2ZpZWxkPXByaW9yaXR5JnNvcnRlci9vcmRlcj1ERVNDJnRlbXBNYXg9MTAwMH0&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority|height=60|renderMode=static|title=Version 0.4|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor\=17247&pid\=11911&sorter/field\=priority&sorter/order\=DESC&tempMax\=1000"></p><p> </p><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9VmVyc2lvbiAwLjN8aGVpZ2h0PTYwfHJlbmRlck1vZGU9c3RhdGljfGNvbHVtbnM9dHlwZTtrZXk7c3VtbWFyeTtwcmlvcml0eXx1cmw9aHR0cDovL2ppcmEuY29kZWhhdXMub3JnL3NyL2ppcmEuaXNzdWV2aWV3czpzZWFyY2hyZXF1ZXN0LXhtbC90ZW1wL1NlYXJjaFJlcXVlc3QueG1sP2ZpeGZvcj0xNzE5OSZwaWQ9MTE5MTEmc29ydGVyL2ZpZWxkPXByaW9yaXR5JnNvcnRlci9vcmRlcj1ERVNDJnRlbXBNYXg9MTAwMH0&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority|height=60|renderMode=static|title=Version 0.3|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor\=17199&pid\=11911&sorter/field\=priority&sorter/order\=DESC&tempMax\=1000"></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