google / closure-linter

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

whitespace around line comments not enforced #82

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Enhancement request...

The Google JS StyleGuide says "We follow the C++ style for comments in spirit."

http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml#Comments

The C++ style guide requires two spaces before and one space after "//", like 
so:

var foo;  // foo is bar

http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Implement
ation_Comments#Implementation_Comments

It would be uber helpful if the linter could provide warnings for these rules, 
even if it was an 'opt in' setting.

Original issue reported on code.google.com by ricksbro...@gmail.com on 14 Aug 2014 at 3:44