Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15492253
D13569.id32793.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13569.id32793.diff
View Options
diff --git a/src/lint/engine/ArcanistLintEngine.php b/src/lint/engine/ArcanistLintEngine.php
--- a/src/lint/engine/ArcanistLintEngine.php
+++ b/src/lint/engine/ArcanistLintEngine.php
@@ -471,19 +471,33 @@
}
private function executeLinters(array $runnable) {
+ assert_instances_of($runnable, 'ArcanistLinter');
+
$all_paths = $this->getPaths();
$path_chunks = array_chunk($all_paths, 32, $preserve_keys = true);
+ $progress = id(new PhutilConsoleProgressBar())
+ ->setTotal(count($all_paths) * count($runnable));
+
$exception_lists = array();
foreach ($path_chunks as $chunk) {
- $exception_lists[] = $this->executeLintersOnChunk($runnable, $chunk);
+ $exception_lists[] = $this->executeLintersOnChunk(
+ $progress,
+ $runnable,
+ $chunk);
}
+ $progress->done(false);
+
return array_mergev($exception_lists);
}
- private function executeLintersOnChunk(array $runnable, array $path_list) {
+ private function executeLintersOnChunk(
+ PhutilConsoleProgressBar $progress,
+ array $runnable,
+ array $path_list) {
+
assert_instances_of($runnable, 'ArcanistLinter');
$path_map = array_fuse($path_list);
@@ -540,6 +554,8 @@
try {
$this->executeLinterOnPaths($linter, $paths);
$did_lint[] = array($linter, $paths);
+
+ $progress->update(count($paths));
} catch (Exception $ex) {
$exceptions[] = $ex;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 13, 12:47 PM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7733916
Default Alt Text
D13569.id32793.diff (1 KB)
Attached To
Mode
D13569: Show progress when running `arc lint`
Attached
Detach File
Event Timeline
Log In to Comment