Quantcast

[sonar-dev] [ANN] Javascript plugin 1.0

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[sonar-dev] [ANN] Javascript plugin 1.0

Eric Hartmann-2
Hi,

I'm pleased to announce the release of the Javascript plugin 1.0.
This release integrates new parser, replaces JSLint by new parser rules and adds support of JSTest.

You can install and update via the Sonar Update Center.

The documentation of the plugin is available here : http://docs.codehaus.org/display/SONAR/JavaScript+Plugin

Enjoy,

The Sonar Team,
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[sonar-dev] Re: [sonar-user] [ANN] Javascript plugin 1.0

Eriks Nukis
Hi,

There are number of checks that are not yet in new plugin version, but I hope Sonar community will quickly catch up on them. I will try to create overview of what is covered in version 1.0 and what is still left.

From top of my head things to implement as they are checked by JSLint:
1) warn about "continue" (JSLint's continue option)
2) compare to NaN
3) warn about parseInt with just one parameter
4) check notation that constructors starts with Upper case (JSLint's newcap option)
5) prefer dot notation (person.name) instead of (person['name']) (JSLint's sub option)
6) immediate function invocation should be wrapped in ()
7) indentation checks
8) fall though case statements
9) missing "default" case
10) check for unused parameters (JsLint's unparam option)
11) many "var" statements (JsLint's vars option)
12)...

Are there any rules that you guys think are very important?

Regards,
Eriks


On Thu, Jun 7, 2012 at 4:53 PM, Renou, Stéphane <[hidden email]> wrote:

Thanks for the update, were you able to track what rules were added with this new parser and what rules were lost compare to JSLint if any?

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Eric Hartmann
Sent: Thursday, June 07, 2012 3:42 PM
To: [hidden email]; dev; [hidden email]
Subject: [sonar-user] [ANN] Javascript plugin 1.0

 

Hi,

 

I'm pleased to announce the release of the Javascript plugin 1.0.

This release integrates new parser, replaces JSLint by new parser rules and adds support of JSTest.

 

You can install and update via the Sonar Update Center.

 

The documentation of the plugin is available here : http://docs.codehaus.org/display/SONAR/JavaScript+Plugin

 

Enjoy,

 

The Sonar Team,


Loading...