From 11a6ff9b4f73db127d26c6d24290041a271a798a Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Tue, 15 Nov 2022 15:02:48 +0100 Subject: [PATCH 1/2] add --no-progress to psalter like exists in Psalm.php --- src/Psalm/Internal/Cli/Psalter.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Psalm/Internal/Cli/Psalter.php b/src/Psalm/Internal/Cli/Psalter.php index 1e9f815ba89..b9e61b78a4a 100644 --- a/src/Psalm/Internal/Cli/Psalter.php +++ b/src/Psalm/Internal/Cli/Psalter.php @@ -86,7 +86,8 @@ final class Psalter 'find-unused-code', 'threads:', 'codeowner:', 'allow-backwards-incompatible-changes:', 'add-newline-between-docblock-annotations:', - 'no-cache' + 'no-cache', + 'no-progress' ]; /** @param array $argv */ @@ -130,6 +131,9 @@ public static function run(array $argv): void -m, --monochrome Enable monochrome output + --no-progress + Disable the progress indicator + -r, --root If running Psalm globally you'll need to specify a project root. Defaults to cwd @@ -257,9 +261,13 @@ public static function run(array $argv): void } $debug = array_key_exists('debug', $options) || array_key_exists('debug-by-line', $options); - $progress = $debug - ? new DebugProgress() - : new DefaultProgress(); + if ($debug) { + $progress = new DebugProgress(); + } elseif (isset($options['no-progress'])) { + $progress = new VoidProgress(); + } else { + $progress = new DefaultProgress(); + } $stdout_report_options = new ReportOptions(); $stdout_report_options->use_color = !array_key_exists('m', $options); From ad90cc2744496816817620fff541d8cc4d2dafa4 Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Tue, 15 Nov 2022 19:49:15 +0100 Subject: [PATCH 2/2] add missing use statement --- src/Psalm/Internal/Cli/Psalter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Psalm/Internal/Cli/Psalter.php b/src/Psalm/Internal/Cli/Psalter.php index b9e61b78a4a..11978e72c7a 100644 --- a/src/Psalm/Internal/Cli/Psalter.php +++ b/src/Psalm/Internal/Cli/Psalter.php @@ -21,6 +21,7 @@ use Psalm\IssueBuffer; use Psalm\Progress\DebugProgress; use Psalm\Progress\DefaultProgress; +use Psalm\Progress\VoidProgress; use Psalm\Report; use Psalm\Report\ReportOptions;