Jshint: Concept of "Too Many Errors" should be removed

Created on 2 Jun 2011  ·  11Comments  ·  Source: jshint/jshint

When there are still controversial items such as "mixed tabs & spaces" warnings that cannot be turned off in JSHint, thee limit on errors (i.e. "Too Many Errors") should be removed so that the file can be fully processed.

I don't care about "mixed tabs and spaces" warnings - I care about things that are going to break my code. Therefore even if everyone else in the whole world disagrees and loves these warnings so much that they must be mandatory in JSHint, I should at least have the ability to run my whole file even if I am forced to sift through these errors.

Most helpful comment

maxerror should be opt-in rather than opt-out. It's really frustrating that jshint refuses to finish processing my file. Imagine if grep would stop halfway saying "too many matches". This is how I feel right now.

All 11 comments

You can change this by setting /*jshint maxerr: 1000 */. That said, it'd be nice if http://jshint.com allowed for changing that using the interface (but I think that's a bug for the site repository, and there's a new interface coming up anyway, if I'm not mistaken).

I agree, there should be an option to turn that off completely. Marking as accepted.

+1 It should replace/extend "Stop on first error" option.

Can we merge this in?

If you look at the commit history, we did merge that in _two years ago_ but then had to back out because on large scripts JSHint would be too slow.

@antonkovalyov Ah, that makes sense.

What if JSHint scanned files concurrently, printing to the console whenever a file finished (with queing so that files aren't interspersed)? This could solve JSHint being too slow, as well as enable this option again.

maxerror should be opt-in rather than opt-out. It's really frustrating that jshint refuses to finish processing my file. Imagine if grep would stop halfway saying "too many matches". This is how I feel right now.

As I said above this is a technical limitation.

@antonkovalyov Would you mind expanding on the technical limitation a bit? Perhaps I (or someone) else can write a patch that would please everyone? I can understand the concern for a long running process in regards to the JSHint.com installation, but in my experience working in a legacy codebase this error is all too familiar :)

@b-long AFAIK you can set maxerr to Infinity and you can watch the script take forever to complete.

My mistake, I was using a configuration like /*jshint maxerr: 200 */ rather than /*jshint maxerr:200 */ (with JSHint 2.1.4) . The whitespace after maxerr: tripped me up, it looks like maxerr must be followed (without spaces) by the colon and number.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Guichaguri picture Guichaguri  ·  8Comments

ghost picture ghost  ·  5Comments

TheSavior picture TheSavior  ·  3Comments

ghost picture ghost  ·  3Comments

arian picture arian  ·  7Comments