Skip to content

Check if globals property found by Matcher#53

Open
bobpearson wants to merge 1 commit intocjdev2:masterfrom
bobpearson:patch-1
Open

Check if globals property found by Matcher#53
bobpearson wants to merge 1 commit intocjdev2:masterfrom
bobpearson:patch-1

Conversation

@bobpearson
Copy link
Copy Markdown

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!

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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant