Skip to content
Permalink
Browse files

Use the long progress bar for CI logs (#2364)

  • Loading branch information
TysonAndre authored and muglug committed Nov 22, 2019
1 parent cff354e commit 6bc152e2da855d9e3cc9d0676e3dbad127ce0dd3
Showing with 11 additions and 2 deletions.
  1. +3 −0 src/command_functions.php
  2. +8 −2 src/psalm.php
@@ -376,6 +376,9 @@ function getPsalmHelpText(): string
--no-progress
Disable the progress indicator
--long-progress
Use a progress indicator suitable for Continuous Integration logs
--alter
Run Psalter
@@ -8,6 +8,7 @@
use Psalm\IssueBuffer;
use Psalm\Progress\DebugProgress;
use Psalm\Progress\DefaultProgress;
use Psalm\Progress\LongProgress;
use Psalm\Progress\VoidProgress;
// show all errors
@@ -62,6 +63,7 @@
'refactor',
'shepherd::',
'no-progress',
'long-progress',
'include-php-versions', // used for baseline
'track-tainted-input',
'find-unused-psalm-suppress',
@@ -414,7 +416,7 @@ function ($arg) {
|| isset($_SERVER['GITLAB_CI'])
|| isset($_SERVER['GITHUB_WORKFLOW'])
) {
$options['no-progress'] = true;
$options['long-progress'] = true;
}
$debug = array_key_exists('debug', $options) || array_key_exists('debug-by-line', $options);
@@ -425,7 +427,11 @@ function ($arg) {
$progress = new VoidProgress();
} else {
$show_errors = !$config->error_baseline || isset($options['ignore-baseline']);
$progress = new DefaultProgress($show_errors, $show_info);
if (isset($options['long-progress'])) {
$progress = new LongProgress($show_errors, $show_info);
} else {
$progress = new DefaultProgress($show_errors, $show_info);
}
}
if (isset($options['no-cache'])) {

0 comments on commit 6bc152e

Please sign in to comment.
You can’t perform that action at this time.