Announcement / closure-linter

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

Bad indentation for nested blocks without braces in strict mode #35

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a lint.js file:
var a = [];
for (var i = 0; i < 320; i++)
for (var j = 0; j < 240; j++)
a.push(0);

alert('bad indentation');

2. Lint this file, strict mode:
fixjsstyle --strict lint.js

What is the expected output? What do you see instead?
Line 6 should not be indented, though it is (2 spaces).

Please provide any additional information below.
The more you nest blocks without braces, the more the line with alert() is 
indented.
Works only in strict mode (Normal mode does not enforce indentation).

Original issue reported on code.google.com by edo999 on 1 Sep 2011 at 3:56