From: Joshua Spence Date: Mon, 6 Apr 2015 21:26:09 +0000 (+1000) Subject: Don't pass data to `jshint` via STDIN X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=4b2d8e3f69c2bdd672a490b306315f57e7729a09;p=arcanist.git Don't pass data to `jshint` via STDIN Summary: Fixes T7464. JSHint is unable to exclude files from linting (via the `jshintignore` file) if the data is piped through `STDIN`. An alternative would be to pass `$options[] = '--filename='.$this->getActivePath()`, but `$this->getActivePath()` is not set when the command arguments are constructed. Test Plan: Created a file and linted it with `ArcanistJSHintLinter`. Was able to exclude the file from linting with a `jshintignore` file. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T7464 Differential Revision: https://secure.phabricator.com/D12298 --- diff --git a/src/lint/linter/ArcanistJSHintLinter.php b/src/lint/linter/ArcanistJSHintLinter.php index 47483d4c..7a730db1 100644 --- a/src/lint/linter/ArcanistJSHintLinter.php +++ b/src/lint/linter/ArcanistJSHintLinter.php @@ -73,14 +73,6 @@ final class ArcanistJSHintLinter extends ArcanistExternalLinter { return pht('Install JSHint using `npm install -g jshint`.'); } - public function supportsReadDataFromStdin() { - return true; - } - - public function getReadDataFromStdinFilename() { - return '-'; - } - protected function getMandatoryFlags() { $options = array();