Skip to content

Commit

Permalink
add --no-progress to psalter
Browse files Browse the repository at this point in the history
like exists in Psalm.php
  • Loading branch information
kkmuffme committed Nov 15, 2022
1 parent 2a29fd7 commit 11a6ff9
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/Psalm/Internal/Cli/Psalter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<int,string> $argv */
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 11a6ff9

Please sign in to comment.