jshint/jshint — Issue #394: jsc.sh erroneously reports success when there are more than maxerr errors/warnings
Author: danvk
Created: 2011-12-26 04:58:22+00:00
State: open

Under some circumstances, env/jsc.sh can report that a file passes when it actually has more than maxerr errors.

I ran into this while jshint-ifying dygraphs. So to reproduce, reset back to before my lint-cleanup:

$ git clone git://github.com/danvk/dygraphs.git
$ git reset --hard 27561e51dd6cc693ace32b7d2e3a2c3b2994a09f
$ jshint/env/jsc.sh dygraph.js
[jshint] dygraph.js passed!

but...
$ jshint/env/jsc.sh dygraph.js 'maxerr:1000' | wc -l
483

So in reality there are a ton of errors. This really threw me for a loop before I discovered the "maxerr" option.

I tried to create a simple test case for this, but did not run into the issue for my test JS file. I always saw the "Too many errors. (X% scanned)" message. So there's something about my real-world JS file that is causing this.