]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Don't pass data to `jshint` via STDIN
authorJoshua Spence <josh@joshuaspence.com>
Mon, 6 Apr 2015 21:26:09 +0000 (07:26 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Mon, 6 Apr 2015 21:26:10 +0000 (07:26 +1000)
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

src/lint/linter/ArcanistJSHintLinter.php

index 47483d4c1b73a4658c98a646fa3946b833f9624a..7a730db1a01ede97052bc1b7d2bd6c88b3b2fcda 100644 (file)
@@ -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();