mathiasrw / closure-linter

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

Invalid missing semicolon in brace (Regression from 2.3.4 to 2.3.7) #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$ cat semicolon-function-in-expression.js  
(true && function() {});
$ gjslint semicolon-function-in-expression.js 
----- FILE  :  semicolon-function-in-expression.js -----
Line 1, E:0011: Missing semicolon after function assigned to a variable
Found 1 errors, including 0 new errors, in 1 files (0 files OK).

Some of the errors reported by GJsLint may be auto-fixable using the script
fixjsstyle. Please double check any changes it makes and report any bugs. The
script can be run by executing:

fixjsstyle semicolon-function-in-expression.js 
$ pip install --upgrade 
https://closure-linter.googlecode.com/files/closure_linter-2.3.4.tar.gz         

[...]
$ gjslint semicolon-function-in-expression.js
1 files checked, no errors found.

This should not cause and error and fixstyle breaks the code with an invalid 
semicolon.

I tested this with gjslint 2.3.7 on Linux.

Please provide any additional information below.

Original issue reported on code.google.com by jonas.do...@gmail.com on 9 Oct 2012 at 9:39

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have the same error, fixjsstyle enters a semicolon in this generated 
CoffeeScript code:

var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if 
(__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { 
this.constructor = child; } ctor.prototype = parent.prototype; child.prototype 
= new ctor(); child.__super__ = parent.prototype; return child; }; /** Bad 
Semicolon **/,
__slice = [].slice;

This causes automated build tools to break.

This is gjslint 2.3.8 on OS X.

Original comment by Samuel.T...@gmail.com on 26 Feb 2013 at 9:18

GoogleCodeExporter commented 9 years ago
Looks like this is what broke it:
https://code.google.com/p/closure-linter/source/detail?r=20#

Original comment by vihang.m...@gmail.com on 14 Oct 2014 at 11:25

GoogleCodeExporter commented 9 years ago

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