google / closure-linter

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

Implied block support for curly braces in fixjsstyle #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run gjslint or fixjsstyle on a js file containing implied blocks
2.
3.

What is the expected output? What do you see instead?
I would expect implied blocks to be warned by gjslint or by fixjsstyle to be 
enclosed in curly braces.

What version of the product are you using? On what operating system?
Using 2.3.1 on ubuntu 10.04LTS.

Please provide any additional information below.
This is more of a feature request than anything.  I would like to see gjslint 
and fixjsstyle support this.  jslint and jshint both have switches for implied 
blocks.  But all these tools do is complain, really the tool that I find the 
most useful is fixjsstyle.

Please don't insult my request or provide non-useful answers such as "this 
isn't in google's style guide", or that just ask non-useful questions such as 
"why do you want to do that?"

This is a feature that is fully within the capabalities of the codebase and 
probably not hard...I just don't know the python to do it or I would myself.  
Note that adding curly braces around the type statement in docblocks is 
supported, surprisingly to me-- it doesn't seem nearly as useful.

Original issue reported on code.google.com by dhaart...@gmail.com on 26 Aug 2011 at 8:47