mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 00:32:41 +01:00
Allow willLintPaths
and didLintPaths
to be overridden
Summary: I'm not sure if the upstream will be interested in this change, but we are writing a linter which works by running an external command on the entire repository. This can't be done with `ArcanistExternalLinter` at the moment, which meant that we ended up copy-pasting most of `ArcanistFutureLinter`. This would be a lot easier if we could override `willLintPaths` and `didLintPaths`, but these methods are currently marked as `final`. An alternative solution would be some sort of `ArcanistLinter::transformPath` method. Test Plan: N/A Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: faulconbridge, Korvin Differential Revision: https://secure.phabricator.com/D19630
This commit is contained in:
parent
e1e93271e6
commit
30b7835c37
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ abstract class ArcanistFutureLinter extends ArcanistLinter {
|
||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
final public function willLintPaths(array $paths) {
|
public function willLintPaths(array $paths) {
|
||||||
$limit = $this->getFuturesLimit();
|
$limit = $this->getFuturesLimit();
|
||||||
$this->futures = id(new FutureIterator(array()))->limit($limit);
|
$this->futures = id(new FutureIterator(array()))->limit($limit);
|
||||||
foreach ($this->buildFutures($paths) as $path => $future) {
|
foreach ($this->buildFutures($paths) as $path => $future) {
|
||||||
|
@ -23,7 +23,7 @@ abstract class ArcanistFutureLinter extends ArcanistLinter {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final public function didLintPaths(array $paths) {
|
public function didLintPaths(array $paths) {
|
||||||
if (!$this->futures) {
|
if (!$this->futures) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue