Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bug fix, give proper character count for supernew and return identifier #598

Merged
merged 1 commit into from

2 participants

@goatslacker

Nothing broken, just missing some useful information. Would like proper character count and the identifier.

@valueof valueof merged commit 1100b59 into from
@goatslacker

I've got a million of these fixes, should I batch it up into one giant pull request or keep sending these tiny ones?

Owner

If they are the same (adding a character) then batch them up. Otherwise send separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 3 deletions.
  1. +2 −1  jshint.js
  2. +4 −2 tests/unit/options.js
View
3  jshint.js
@@ -3155,7 +3155,8 @@ loop: for (;;) {
}
adjacent(token, nexttoken);
if (nexttoken.id !== '(' && !option.supernew) {
- warning("Missing '()' invoking a constructor.");
+ warning("Missing '()' invoking a constructor.",
+ token, token.value);
}
this.first = c;
return this;
View
6 tests/unit/options.js
@@ -515,8 +515,10 @@ exports.supernew = function () {
TestRun()
.addError(1, "Weird construction. Delete 'new'.")
- .addError(9, "Missing '()' invoking a constructor.")
- .addError(11, "Missing '()' invoking a constructor.")
+ .addError(9, "Missing '()' invoking a constructor.", { character: 1 })
+ .addError(11, "Missing '()' invoking a constructor.", {
+ character: 13
+ })
.test(src);
TestRun().test(src, { supernew: true });
Something went wrong with that request. Please try again.