google / closure-linter

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

function(... \n ...): fixjsstyle keeps adding spaces on each run #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If one feeds fixjsstyle the following input, it will add 4 spaces on each run 
(thus making multiple runs raise different results each time):

$> cat test1.js; fixjsstyle --strict test1.js

var x = function(
b) {
};

Fixed 1 errors in test1.js

$> cat test1.js; fixjsstyle --strict test1.js

var x = function(
b    ) {
};

Fixed 1 errors in test1.js

$> cat test1.js; fixjsstyle --strict test1.js

var x = function(
b        ) {
};

Fixed 1 errors in test1.js

BTW: Do you accept patches ?

Original issue reported on code.google.com by filip.noetzel on 7 Feb 2011 at 11:11

GoogleCodeExporter commented 9 years ago
(The above is output of closure-linter v2.2.7)

Original comment by filip.noetzel on 7 Feb 2011 at 11:11

GoogleCodeExporter commented 9 years ago
Attached a patch fixing this issue (including fixjsstyle_test.py testcase).

Original comment by filip.noetzel on 20 Feb 2011 at 4:46

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for reporting this and providing a patch. We don't really accept patches 
at this point, but it's still useful to whoever fixes the bug internally as a 
pointer to the right place and a good idea of how to fix the issue.

We hope to do another release soon of the Closure Linter, and should be able to 
include a fix to this issue in the release.

Original comment by a...@google.com on 21 Feb 2011 at 3:45

GoogleCodeExporter commented 9 years ago

Original comment by a...@google.com on 8 Apr 2011 at 10:06

GoogleCodeExporter commented 9 years ago

Original comment by michaelt...@google.com on 13 Apr 2011 at 8:36