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

2817Re: Lines numbers in error report seem to be off in latest version

Expand Messages
  • douglascrockford
    Mar 1, 2012
      --- In jslint_com@yahoogroups.com, "mariana.schiff" <Mariana.Schiff@...> wrote:
      >
      >
      >
      > --- In jslint_com@yahoogroups.com, Satyam <satyam@> wrote:
      > >
      > > It seems the line counter is not counting the blank lines, at least
      > > that's what it seems in the first few lines when the code causing the
      > > error seemed obvious, later on, I could not pinpoint what's setting it
      > > off, if anything else is.
      > >
      >
      > The line counter is off again for me.
      >
      > I'm using JSLint as part of my pre-build process, and as an external tool in my development environment. In both cases, I'm using the WSH ReadAll method to read in the JavaScript file.
      >
      > I've tried changing the line endings of my source files, but WSH.ReadAll must be changing them all back, because the JSLint line counter gets off by one for every blank line in the source, regardless of line ending character(s).
      >
      > I noticed the IE workaround was backed in on Jun 09, 2011, and removed again on Feb 20, 2012. That's when my line counts broke. Is there any hope that this workaround will be put back in? Do I need to use WSH.ReadLine in my script and concatenate the lines before calling JSLINT? I'd expect this change broke anybody using JSLint with WSH.



      This is due to a bug in JScript. The bug has been there for well over a decade.

      I have adopted a pledge to no longer work around Microsoft's bugs. The ultimate result of those workarounds is that Microsoft is under no pressure to ever fix them.

      So until Microsoft acts, I recommend that you not use JScript or WSH. Nodejs is an excellent alternative.
    • Show all 16 messages in this topic