Loading ...
Sorry, an error occurred while loading the content.

Re: Testfile, wsh and stop error

Expand Messages
  • larserik78
    Ah, didn t notice that menu item. My plugin should be in there. :) (http://resharperjslint.codeplex.com) I m using the wsh snippet JSLint.VS is using.
    Message 1 of 5 , Apr 10 11:30 AM
    • 0 Attachment
      Ah, didn't notice that menu item.
      My plugin should be in there. :) (http://resharperjslint.codeplex.com)

      I'm using the wsh snippet JSLint.VS is using.
      Apparently it has been in the main repository once and there's some strays around other repos.

      // wsh.js
      // 2006-08-15

      // This is the WSH companion to fulljslint.js.
      /*
      Copyright (c) 2002 Douglas Crockford (www.JSLint.com) WSH Edition
      */

      /*extern JSLINT, WScript */

      (function () {

      // Predrag: options placeholder for JSLint.VS
      var options = /*[[0]]*/null;

      if (!JSLINT(WScript.StdIn.ReadAll(), options)) {
      for (var i = 0 ; i < JSLINT.errors.length ; i++) {
      var e = JSLINT.errors[i];
      WScript.StdErr.Write(
      (e.line + 1) + '\t' +
      (e.character + 1) + '\t' +
      (e.reason) + '\t' +
      (e.evidence || '').replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1") + '\n'
      );
      }
      WScript.Quit(1);
      }
      })();


      It's a bit shorter, and apparently Mr. Crockford wrote it years ago. That's why I'm questioning not finding it on github.
      I modified it according to the post about linecount the other day though. (Not this one, that's the one from JSLint.VS)

      Anyway it's not that advanced, so I'll just keep using it.

      About my other two questions, I gather I'll just have to live with the stopping scans. As long as I indicate it somehow in the plugin, and I guess peeps using it are already aquinted with JSLint anyway.
      I'll write multiple small testcases instead of one big.
    Your message has been successfully submitted and would be delivered to recipients shortly.