[sonar-dev] New Javascript Rule for naming functions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[sonar-dev] New Javascript Rule for naming functions

Sylvain Jeandroz
Hi everybody,

First congratulation for the product, it is very great!

I have a suggestion for create a new Javascript rule or update the rule "Function names should comply with a naming convention":

Some of my developers do not respect naming conventions for naming functions, most of time they define functions like this:

onTextfieldChange1111111: function(field, newValue, oldValue, eOpts) {
...
}

And it looks like this method doesn't fire the rule "Function names should comply with a naming convention".

After asking this question on StackOverflow (http://stackoverflow.com/questions/29937532/sonarqube-javascript-rule-function-names-should-comply-with-a-naming-convention), it looks like this rule doesn't check functions that are defined like this, it only check functions defined like:

function onTextfieldChange1111111(....){


I think this is almost a bug, because this way of naming functions is correct in Javascript, so this rule should works.

Thanks in advanced for your help and sorry for my bad english...


Best regards
--

Sylvain Jeandroz
CEO-Vision
[hidden email]