diff --git a/src/Psalm/Internal/Cli/Psalter.php b/src/Psalm/Internal/Cli/Psalter.php index 1e9f815ba89..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; @@ -86,7 +87,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 +132,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 +262,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);