Maheshjayachandran / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

goog/labs/net/xhr.js violates goog.scope style rules #435

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From "Making Closure Library Less Verbose" [1]:

1.  There should be 1 blank line between the last goog.require and the 
goog.scope declaration.
2.  goog.scope should wrap the entire file. Its contents should be indented 2 
spaces.
3.  All aliases inside the scope block must be at the top, and alphabetically 
sorted.
4.  Only constant names (like namespaces and constructors) should be aliased.
5.  Aliases inside the scope block must match the last property of the global 
name that they are aliasing.

File closure/goog/labs/net/xhr.js [2] violates #1, #3, and #5.  There are 3 
blank lines between the last "goog.require" and the "goog.scope".  
"goog.labs.net.xhr" is aliased as "_".  The design doc is ambiguous as to 
whether to sort by the aliases or full namespaced identifiers, but either way 
the file is wrong.

[1] 
https://docs.google.com/document/pub?id=1ETFAuh2kaXMVL-vafUYhaWlhl6b5D9TOvboVg7Z
l68Y#h.s4biafye4ewe
[2] 
http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/labs/n
et/xhr.js

Original issue reported on code.google.com by JayYoung...@gmail.com on 10 Mar 2012 at 6:59

GoogleCodeExporter commented 9 years ago
that's why it's called 'labs'. they're experimenting with new style rules to 
see how they like them.

Original comment by Nicholas.J.Santos on 10 Mar 2012 at 7:46

GoogleCodeExporter commented 9 years ago
Gotcha.  Carry on, then.  Sorry for the noise.

Original comment by JayYoung...@gmail.com on 11 Mar 2012 at 6:17