1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 06:42:41 +01:00

Don't use error context from JSHint in linter messages

Summary:
The error context (a.k.a. "original text") as provided by `jshint` is not very useful and actually causes `arc lint` to display the lint message incorrectly.

{F169277}

The underlying problem here is that the error context from `jshint` contains the entire line from the input file rather than just the offending source code.

Test Plan: Ran `arc lint -- webroot/rsrc/js/core/behavior-hovercard.js` (in rP) and verified that the output looked reasonable.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9675
This commit is contained in:
Joshua Spence 2014-06-23 10:33:01 +10:00
parent 4fd6c99a93
commit 48d62ed444
2 changed files with 0 additions and 2 deletions

View file

@ -157,7 +157,6 @@ final class ArcanistJSHintLinter extends ArcanistExternalLinter {
$message->setName('JSHint'.idx($err, 'code'));
$message->setDescription(idx($err, 'reason'));
$message->setSeverity($this->getLintMessageSeverity(idx($err, 'code')));
$message->setOriginalText(idx($err, 'evidence'));
$messages[] = $message;
}

View file

@ -10,7 +10,6 @@ module.exports = {
'col' : error.character,
'reason' : error.reason,
'code' : error.code,
'evidence': error.evidence,
});
});