Revision: 4237
Author: [email protected]
Date: Tue Aug 10 10:08:57 2010
Log: Apply linter to more files.
http://codereview.appspot.com/1943041

Particularly, apply the linter to all of the files which go into caja-iframe.js, and adjust @provides/@requires to satisfy it.

[email protected]


http://code.google.com/p/google-caja/source/detail?r=4237

Modified:
 /trunk/build.xml
 /trunk/src/com/google/caja/cajita-module.js
 /trunk/src/com/google/caja/cajita-promise.js
 /trunk/src/com/google/caja/plugin/host-iframe-final.js
 /trunk/src/com/google/caja/plugin/host-tools.js
 /trunk/src/com/google/caja/plugin/uri.js

=======================================
--- /trunk/build.xml    Mon Aug  9 17:19:36 2010
+++ /trunk/build.xml    Tue Aug 10 10:08:57 2010
@@ -706,15 +706,24 @@
     <genrule class="com.google.caja.ancillary.linter.Linter"
      unless="${tools.ancillary.disable}">
       <input file="${src}/com/google/caja/cajita-debugmode.js"/>
+      <input file="${lib}/com/google/caja/cajita-module.js"/>
+      <input file="${lib}/com/google/caja/cajita-promise.js"/>
       <input file="${src}/com/google/caja/cajita.js"/>
       <input file="${src}/com/google/caja/plugin/bridal.js"/>
+      <input file="${lib}/com/google/caja/plugin/caja.js"/>
+      <!-- <input file="${src}/com/google/caja/plugin/capture-valija.js"/>
+           Can't do this because it as well as valija-cajita provide
+           valijaMaker. -->
       <input file="${lib}/com/google/caja/plugin/css-defs.js"/>
       <input file="${lib}/com/google/caja/plugin/cssparser.js"/>
       <input file="${src}/com/google/caja/plugin/domita.js"/>
+      <input file="${src}/com/google/caja/plugin/host-iframe-final.js"/>
+      <input file="${src}/com/google/caja/plugin/host-tools.js"/>
       <input file="${src}/com/google/caja/plugin/html-emitter.js"/>
       <input file="${src}/com/google/caja/plugin/html-sanitizer.js"/>
       <input file="${lib}/com/google/caja/plugin/html4-defs.js"/>
       <input file="${src}/com/google/caja/plugin/unicode.js"/>
+      <input file="${lib}/com/google/caja/plugin/uri.js"/>
       <input file="${src}/com/google/caja/valija-cajita.js"/>
       <output file="${lib}/AllTests.Linter.tstamp"/>
     </genrule>
=======================================
--- /trunk/src/com/google/caja/cajita-module.js Thu Jun 24 12:15:11 2010
+++ /trunk/src/com/google/caja/cajita-module.js Tue Aug 10 10:08:57 2010
@@ -13,14 +13,6 @@
 // limitations under the License.

 /**
- * @author [email protected], [email protected]
- * @requires ___, bridal, Q, URI
- * @provides xhrModuleLoadMaker, scriptModuleLoadMaker, clearModuleCache,
- *           defaultModuleIdResolver, defaultCajolerFinder,
- *           CajolingServiceFinder
- * To obtain the dependencies of this file, load:
- *   cajita.js, bridal.js, uri.js, cajita-promise.js
- *
  * Each load maker object, given the absolute URL of the current module, an
  * identifier resolver, and a cajoler finder, returns a load object.
  *
@@ -42,8 +34,16 @@
* Note that this system never actually fetches the module absolute URL, only * passes it to the cajoler. But it *is* used as a key in the cache of loaded
  * modules, so a module absolute URL should always have the same module.
- *
+ *
+ * To obtain the dependencies of this file, load:
+ *   cajita.js, bridal.js, uri.js, cajita-promise.js
+ *
  * TODO(kpreid): explain static (sync) loading module id semantics.
+ * @author [email protected], [email protected]
+ * @requires eval, document, ___, bridal, Q, URI
+ * @provides xhrModuleLoadMaker, scriptModuleLoadMaker, clearModuleCache,
+ *           defaultModuleIdResolver, defaultCajolerFinder,
+ *           CajolingServiceFinder
  */
 var xhrModuleLoadMaker;
 var scriptModuleLoadMaker;
@@ -348,7 +348,7 @@
   scriptModuleLoadMaker = makeConcreteLoadMaker(scriptAsyncLoad);

   clearModuleCache = ___.markFuncFreeze(function() {
-    cajita.forOwnKeys(cache, ___.markFuncFreeze(function(k, v) {
+    ___.forOwnKeys(cache, ___.markFuncFreeze(function(k, v) {
       delete cache[k];
     }));
   });
=======================================
--- /trunk/src/com/google/caja/cajita-promise.js        Fri Aug 21 10:14:19 2009
+++ /trunk/src/com/google/caja/cajita-promise.js        Tue Aug 10 10:08:57 2010
@@ -7,10 +7,12 @@
  * Implementation of promise for Cajita
  * Export Q to the global scope
  *
- * @contributor: [email protected]
- *
  * Mostly taken from the ref_send implementation by Tyler Close
  * Add the isPromise___ flag to support function promise
+ *
+ * @contributor: [email protected]
+ * @requires setTimeout, ___
+ * @provides Q
  */

 var Q;
=======================================
--- /trunk/src/com/google/caja/plugin/host-iframe-final.js Wed Jul 14 11:51:16 2010 +++ /trunk/src/com/google/caja/plugin/host-iframe-final.js Tue Aug 10 10:08:57 2010
@@ -12,7 +12,14 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.

-// This file exists to be concatenated into the single file that caja.js (the -// iframed-Caja-runtime loader) loads as the very last thing to give an on-load
-// callback.
+/**
+ * @fileoverview
+ * This file exists to be concatenated into the single file that caja.js (the + * iframed-Caja-runtime loader) loads as the very last thing to give an on-load
+ * callback.
+ *
+ * @author [email protected]
+ * @requires cajaIframeDone
+ */
+
 cajaIframeDone();
=======================================
--- /trunk/src/com/google/caja/plugin/host-tools.js     Tue Aug 10 09:47:59 2010
+++ /trunk/src/com/google/caja/plugin/host-tools.js     Tue Aug 10 10:08:57 2010
@@ -15,13 +15,16 @@
 /**
  * @fileoverview Utilities for common patterns in host pages.
  *
- * @author [email protected]
- * @requires document, ___, cajita, attachDocumentStub, valijaMaker,
- *           Q, defaultCajolerFinder,
- * @provides HostTools
- *
  * (HostTools can also work without cajita-module, i.e. without
  * defaultCajolerFinder, at the cost of sandbox.run() functionality.)
+ *
+ * @author [email protected]
+ * @requires eval, window, document, ___, cajita, attachDocumentStub,
+ *           valijaMaker, Q,
+ *           defaultCajolerFinder, scriptModuleLoadMaker,
+ *           defaultModuleIdResolver, CajolingServiceFinder,
+ *           HtmlEmitter
+ * @provides HostTools
  */

 var HostTools;
@@ -153,5 +156,5 @@
       setCajolerService: setCajolerService,
       Sandbox: Sandbox
     });
-  }
+  };
 })();
=======================================
--- /trunk/src/com/google/caja/plugin/uri.js    Wed Jun 16 11:00:50 2010
+++ /trunk/src/com/google/caja/plugin/uri.js    Tue Aug 10 10:08:57 2010
@@ -17,6 +17,7 @@
  * Implements RFC 3986 for parsing/formatting URIs.
  *
  * @author [email protected]
+ * @provides URI
  */

 var URI = (function () {
@@ -460,9 +461,9 @@
   this.paramCache_ = null;
   var queryBuf = [];
   var separator = '';
-  for (var i = 0; i < params.length;) {
-    var k = params[i++];
-    var v = params[i++];
+  for (var j = 0; j < params.length;) {
+    var k = params[j++];
+    var v = params[j++];
     queryBuf.push(separator, encodeURIComponent(k.toString()));
     separator = '&';
     if (v) {

Reply via email to