Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current ·  View Page History

 

Installation

  1. Install the JavaScript plugin through the Update Center
  2. Restart Sonar

Usage

You can analyze your project with the different clients. Here are properties files examples for the Sonar Runner and Maven.

A list of sample projects is available on github that can be browsed or downloaded:

  1. JavaScript project analyzed with the Sonar Runner: /projects/languages/javascript/javascript-sonar-runner.
  2. JavaScript project analyzed with the Sonar Runner reusing unit tests and code coverage reports generated with JsTestDriver: /projects/languages/javascript/javascript-sonar-runner-JsTestDriver
  3. JavaScript project analyzed with Maven reusing unit tests and code coverage reports generated with JsTestDriver (integrated through jstd-maven-plugin): /projects/languages/javascript/javascript-maven-JsTestDriver

Changelog

Release 1.0 (36 issues)
Type Key Summary Priority Status Resolution
New Feature SONARPLUGINS-1842 Rule: Avoid use of parentheses where not required by syntax or semantics Major Closed Fixed
New Feature SONARPLUGINS-1841 Rule: Detect conditional operators Major Closed Fixed
New Feature SONARPLUGINS-1840 Rule: "UnreachableCore" - return, break, continue, or throw statements should be followed by a } or case or default. Major Closed Fixed
Task SONARPLUGINS-1829 Do not use jslint4java Major Closed Fixed
New Feature SONARPLUGINS-1828 Rule: Avoid trailing comma in array and object literals Major Closed Fixed
New Feature SONARPLUGINS-1826 Rule: Avoid doing assignments in the condition part of if/while/for statements Major Closed Fixed
New Feature SONARPLUGINS-1827 Rule: Only while/do/for statements can be labelled Major Closed Fixed
New Feature SONARPLUGINS-1823 Rule: Use single quote for string literals Major Closed Fixed
New Feature SONARPLUGINS-1822 Rule: Do not allow function declarations within blocks Major Closed Fixed
New Feature SONARPLUGINS-1820 Rule: Do not use wrapper objects for primitive types Major Closed Fixed
New Feature SONARPLUGINS-1817 Rule: Do not use Array and Object constructors Major Closed Fixed
New Feature SONARPLUGINS-1816 Rule: Avoid multiline string literals Major Closed Fixed
New Feature SONARPLUGINS-1819 Rule: For-in statement must filter items Major Closed Fixed
New Feature SONARPLUGINS-1818 Rule: Avoid usage of bitwise operators Major Closed Fixed
New Feature SONARPLUGINS-1814 Rule: Each statement must end with a semicolon Major Closed Fixed
New Feature SONARPLUGINS-1815 Rule: Always use curly braces for if/else/for/while/do statements Major Closed Fixed
New Feature SONARPLUGINS-1813 Rule: Avoid usage of with statement Major Closed Fixed
New Feature SONARPLUGINS-1812 Rule: One statement per line Major Closed Fixed
New Feature SONARPLUGINS-1811 Rule: Regular expression on comment Major Closed Fixed
New Feature SONARPLUGINS-1808 Rule: Avoid usage of == and != Major Closed Fixed
New Feature SONARPLUGINS-1806 Rule: Avoid usage of eval Major Closed Fixed
New Feature SONARPLUGINS-1809 Rule: Line too long Major Closed Fixed
New Feature SONARPLUGINS-1807 Rule: Avoid usage of debugger statement Major Closed Fixed
New Feature SONARPLUGINS-1799 Rule: Avoid too complex function Major Closed Fixed
New Feature SONARPLUGINS-1855 Rule: Avoid deeply nested if statements Major Closed Fixed
Bug SONARPLUGINS-1703 Problem in the calculation of cyclomatic complexity Major Closed Fixed
New Feature SONARPLUGINS-1702 Support for JsTest unit test execution and code coverage reports should be added Major Closed Fixed
New Feature SONARPLUGINS-1794 Rule: When there is a parsing error, this error should be added like a violation on that JavaScript file Major Closed Fixed
New Feature SONARPLUGINS-1795 Rule: Detect commented-out lines of code Major Closed Fixed
New Feature SONARPLUGINS-1790 Metric: blank comments Major Closed Fixed
New Feature SONARPLUGINS-1792 Provide "Sonar Way" profile for JavaScript Major Closed Fixed
New Feature SONARPLUGINS-1791 Metric: statements Major Closed Fixed
New Feature SONARPLUGINS-1793 Rule: Generic JavaScript rule to define some homemade checks with an XPath expression Major Closed Fixed
New Feature SONARPLUGINS-1789 Integrate JavaScript parser based on SSLR Major Closed Fixed
New Feature SONARPLUGINS-1788 Provide JavaScript rule engine based on SSLR Major Closed Fixed
New Feature SONARPLUGINS-1796 Provide a default SQALE mapping for the JavaScript rules Major Closed Fixed

Release 0.4 (5 issues)
Type Key Summary Priority Status Resolution
Bug SONARPLUGINS-1625 NullPointer on loading test file Major Closed Fixed
New Feature SONARPLUGINS-1587 Support of JsTestDriver unit test execution and code coverage reports should be added Major Closed Fixed
Bug SONARPLUGINS-1319 Doesn't work with SCM Plugin Major Closed Fixed
Bug SONARPLUGINS-1295 Cannot specify sonar.javascript.lslint.predef in POM Major Closed Fixed
Bug SONARPLUGINS-1139 Cannot define multiple predefined variables Major Closed Fixed

Release 0.3 (1 issues)
Type Key Summary Priority Status Resolution
New Feature SONARPLUGINS-1006 Migrate JavaScript plugin from code.google.com to Codehaus Minor Closed Fixed

Roadmap Ideas

 

Labels
  • None