#20 lambda_assign_requires_semicolon ignored on var declaration

closed
nobody
None
5
2007-03-06
2007-03-03
No

This is the configuration:

+missing_semicolon
-lambda_assign_requires_semicolon

It still generates "missing semicolon" warnings for functions assigned to variables on their declaration.

For example, the following generates warning:

var myVar = function()
{
....
}

The following instead works as expected (no warnings):

myVar = function()
{
....
}

I believe and expected that both cases should not generate warnings.

The fact is that the check for missing semicolons is very important for JavaScript code that is supposed to be compressed (like our case with FCKeditor). The amount of unwanted warnings generated by the above case simply makes the lint report unusable, and so we are forced to disable missing_semicolon.

I really hope this is not something impossible to fix.

Thanks for this great application,

Frederico Caldeira Knabben
----
http://www.fckeditor.net
"Support Open Source Software"

Discussion

  • Matthias Miller

    Matthias Miller - 2007-03-06
    • status: open --> closed
     
  • Matthias Miller

    Matthias Miller - 2007-03-06

    Logged In: YES
    user_id=1357599
    Originator: NO

    Oops, it looks like my automated test was incorrect, which is why I didn't catch this earlier. I fixed this on the trunk. This fix will be included in the next release.

    Thanks for the bug report!

     
  • Frederico Caldeira Knabben

    Logged In: YES
    user_id=572424
    Originator: YES

    This is great! Thanks Matthias. I look forward for the new version.

    As a side note, shouldn't the title of the latest news in your web site be "JavaScript Lint 0.3.0 Released", instead of "JavaScript Lint SourceForge Project"?

    Anyway... it's just a detail :)

    Thanks again.

     

Log in to post a comment.