fix tests
This commit is contained in:
parent
8c97bba86a
commit
8edefd21a7
2 changed files with 20 additions and 15 deletions
|
|
@ -102,7 +102,6 @@ oop.inherits(JavaScriptWorker, Mirror);
|
|||
return;
|
||||
}
|
||||
var errors = [];
|
||||
var ranges = [];
|
||||
|
||||
// jshint reports many false errors
|
||||
// report them as error only if code is actually invalid
|
||||
|
|
@ -111,11 +110,6 @@ oop.inherits(JavaScriptWorker, Mirror);
|
|||
eval("throw 0;" + value);
|
||||
} catch(e) {
|
||||
if (e != 0) {
|
||||
errors.push({
|
||||
row: e.lineNumber,
|
||||
type: "error",
|
||||
text: e.message
|
||||
});
|
||||
maxErrorLevel = "error";
|
||||
}
|
||||
}
|
||||
|
|
@ -133,7 +127,13 @@ oop.inherits(JavaScriptWorker, Mirror);
|
|||
var type = "warning";
|
||||
|
||||
if (raw == "Missing semicolon.") {
|
||||
type = "info";
|
||||
var str = error.evidence.substr(error.character);
|
||||
str = str.charAt(str.search(/\S/));
|
||||
if (maxErrorLevel == "error" && str && /[\w\d{([]/.test(str)) {
|
||||
error.reason = 'Missing ";" before statement';
|
||||
type = "error";
|
||||
} else
|
||||
type = "info";
|
||||
}
|
||||
else if (disabledWarningsRe.test(raw)) {
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue