jeremykohn / closure-linter

Automatically exported from code.google.com/p/closure-linter
Apache License 2.0
0 stars 0 forks source link

Invalid alidation of Missing semicolon #69

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run gjslint validation on the following code
  var f = function() {
    var m = 1,
      fn = function() {

      },
      b = 12;
  };

  var f2 = function() {
    var p1 = 1, p2 = 2;
  };

What is the expected output? What do you see instead?
 - no errors
Instead there is a notification 
  Line 5, E:0011: Missing semicolon after function assigned to a variable

What version of the product are you using? On what operating system?

Please provide any additional information below.

Run fixjsstyle
    Fixed 1 errors

Code looks like:
      };,
      b = 12;
what generates real javascript error

Original issue reported on code.google.com by m.rusy...@gmail.com on 30 May 2013 at 8:37

GoogleCodeExporter commented 9 years ago
For clarity/readability, these should be separate var statements anyways, but 
it's a valid issue that fixjsstyle should not insert a semicolon here.

Original comment by rum...@google.com on 15 Jan 2015 at 8:51

GoogleCodeExporter commented 9 years ago
Issue 83 has been merged into this issue.

Original comment by rum...@google.com on 15 Jan 2015 at 8:52

GoogleCodeExporter commented 9 years ago
Issue 60 has been merged into this issue.

Original comment by rum...@google.com on 15 Jan 2015 at 8:53

GoogleCodeExporter commented 9 years ago
Should fix this.

Original comment by ptcon...@gmail.com on 7 Apr 2015 at 5:19