4 Copyright (c) 2002 Douglas Crockford (www.JSLint.com) Rhino Edition
7 // This is the Rhino companion to fulljslint.js.
10 /*jslint rhino: true, strict: false */
15 print("Usage: jslint.js file.js");
18 input = readFile(a[0]);
20 print("jslint: Couldn't open file '" + a[0] + "'.");
23 if (!JSLINT(input, {bitwise: true, eqeqeq: true, immed: true,
24 newcap: true, nomen: true, onevar: false, plusplus: false,
25 regexp: true, rhino: true, undef: false, white: false,
27 for (i = 0; i < JSLINT.errors.length; i += 1) {
30 print('Lint at line ' + e.line + ' character ' +
31 e.character + ': ' + e.reason);
32 print((e.evidence || '').
33 replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"));
39 print("jslint: No problems found in " + a[0]);