google / closure-linter

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

Linter confused by goog.provide ordering #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

provide_order.js:
-----------------------------------------------
goog.provide('b');
goog.provide('a');

-----------------------------------------------

$ gjslint --strict provide_order.js 
----- FILE  :  /devel/provide_order.js -----
Line 1, E:0141: goog.provide classes must be alphabetized.  The correct code is:
goog.require('a');
goog.require('b');
Found 1 errors, including 0 new errors, in 1 files (0 files OK).

What is the expected output? What do you see instead?

Expected:
Line 1, E:0141: goog.provide classes must be alphabetized.  The correct code is:
goog.provide('a');
goog.provide('b');

Actual:  See above

What version of the product are you using? On what operating system?

Head on Mac OSX

Original issue reported on code.google.com by JayYoung...@gmail.com on 26 Apr 2011 at 11:49

GoogleCodeExporter commented 9 years ago

Original comment by michaelt...@google.com on 27 Apr 2011 at 4:46

GoogleCodeExporter commented 9 years ago

Original comment by vagra...@google.com on 29 Jul 2013 at 8:16