Skip to content
Browse files

`do_warn` now respects `JSLint.suppressed_messages` setting and retur…

…ns false instead of warning object when appropriate; `stop` only stops if the return value of `do_warn` is not false
  • Loading branch information...
1 parent 3903a0d commit 7e47250e5d765165b84742f0d7c052f75c34d6ad @penartur committed
Showing with 6 additions and 1 deletion.
  1. +6 −1 jslint.js
View
7 jslint.js
@@ -1116,6 +1116,9 @@ var JSLINT = (function () {
function do_warn(message, offender, a, b, c, d) {
var character, line, warning;
+ if (JSLINT.suppressed_messages[message] === true) {
+ return false;
+ }
offender = offender || next_token; // ~~
line = offender.line || 0;
character = offender.from || 0;
@@ -1157,7 +1160,9 @@ var JSLINT = (function () {
function stop(message, offender, a, b, c, d) {
var warning = do_warn(message, offender, a, b, c, d);
- quit(bundle.stopping, warning.line, warning.character);
+ if (warning !== false) {
+ quit(bundle.stopping, warning.line, warning.character);
+ }
}
function stop_at(message, line, character, a, b, c, d) {

0 comments on commit 7e47250

Please sign in to comment.
Something went wrong with that request. Please try again.