diff --git a/src/lint/linter/ArcanistFutureLinter.php b/src/lint/linter/ArcanistFutureLinter.php --- a/src/lint/linter/ArcanistFutureLinter.php +++ b/src/lint/linter/ArcanistFutureLinter.php @@ -3,12 +3,13 @@ abstract class ArcanistFutureLinter extends ArcanistLinter { private $futures; + private $futuresLimit = 32; abstract protected function buildFutures(array $paths); abstract protected function resolveFuture($path, Future $future); final protected function getFuturesLimit() { - return 8; + return $this->futuresLimit; } final public function willLintPaths(array $paths) { @@ -39,6 +40,28 @@ $this->didResolveLinterFutures($map); } + public function getLinterConfigurationOptions() { + $options = array( + 'parallelism' => array( + 'type' => 'optional int', + 'help' => pht('Set a limit for number of futures to run the linter.' + .' Default is 32.'), + ), + ); + + return $options + parent::getLinterConfigurationOptions(); + } + + public function setLinterConfigurationValue($key, $value) { + switch ($key) { + case 'parallelism': + $this->futuresLimit = $value; + return; + + default: + return parent::setLinterConfigurationValue($key, $value); + } + } /** * Hook for cleaning up resources.