From 48d62ed444cf009abbde9eb8300fe94f63807686 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Mon, 23 Jun 2014 10:33:01 +1000 Subject: [PATCH] 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 --- src/lint/linter/ArcanistJSHintLinter.php | 1 - src/lint/linter/reporter.js | 1 - 2 files changed, 2 deletions(-) diff --git a/src/lint/linter/ArcanistJSHintLinter.php b/src/lint/linter/ArcanistJSHintLinter.php index a3b49155..ea286bc1 100644 --- a/src/lint/linter/ArcanistJSHintLinter.php +++ b/src/lint/linter/ArcanistJSHintLinter.php @@ -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; } diff --git a/src/lint/linter/reporter.js b/src/lint/linter/reporter.js index 42d0d07b..d66c6cdc 100644 --- a/src/lint/linter/reporter.js +++ b/src/lint/linter/reporter.js @@ -10,7 +10,6 @@ module.exports = { 'col' : error.character, 'reason' : error.reason, 'code' : error.code, - 'evidence': error.evidence, }); });