cjdev2 / jshint-mojo

A simple, speedy maven plugin for running javascript code through jshint
GNU General Public License v2.0
40 stars 32 forks source link

Check if globals property found by Matcher #53

Open bobpearson opened 10 years ago

bobpearson commented 10 years ago

A JsHint conf file might not necessarily have a globals property defined. The return of find() should be checked before proceeding to parse the results of matching. The current code generates an IllegalStateException if there is no globals section and group(1) is called.

Optimally, a heavy-duty JSON parser lib (Jackson, GSON?) would be ideal, but I realize that is overkill for your project.

Thanks!