]> khamidou — GitHub mirrors - arcanist.git/commit
Don't use error context from JSHint in linter messages
authorJoshua Spence <josh@joshuaspence.com>
Mon, 23 Jun 2014 00:33:01 +0000 (10:33 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Mon, 23 Jun 2014 00:33:01 +0000 (10:33 +1000)
commit48d62ed444cf009abbde9eb8300fe94f63807686
tree9f876d13c5f4eada46a1dfa7523866ca5ffd40f0
parent4fd6c99a93318838e2ca1a9cab5c5c61747e4bc1
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
src/lint/linter/reporter.js