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: true, plusplus: true,
25 regexp: true, rhino: true, undef: true, white: true})) {
26 for (i = 0; i < JSLINT.errors.length; i += 1) {
29 print('Lint at line ' + e.line + ' character ' +
30 e.character + ': ' + e.reason);
31 print((e.evidence || '').
32 replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"));
38 print("jslint: No problems found in " + a[0]);