Skip to content

Commit d931c89

Browse files
committed
Show a hint about -vv for unignorable errors when generating the baseline
1 parent 5a63154 commit d931c89

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Command/AnalyseCommand.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ private function generateBaseline(string $generateBaselineFile, InceptionResult
605605
if (!$fileSpecificError->canBeIgnored()) {
606606
$unignorableCount++;
607607
if ($output->isVeryVerbose()) {
608-
$inceptionResult->getStdOutput()->writeLineFormatted('Unignorable could not be added to the baseline:');
608+
$inceptionResult->getStdOutput()->writeLineFormatted('<error>Unignorable errors could not be added to the baseline:</error>');
609609
$inceptionResult->getStdOutput()->writeLineFormatted($fileSpecificError->getMessage());
610610
$inceptionResult->getStdOutput()->writeLineFormatted($fileSpecificError->getFile());
611611
$inceptionResult->getStdOutput()->writeLineFormatted('');
@@ -624,7 +624,11 @@ private function generateBaseline(string $generateBaselineFile, InceptionResult
624624
) {
625625
$inceptionResult->getStdOutput()->getStyle()->success($message);
626626
} else {
627-
$inceptionResult->getStdOutput()->getStyle()->warning($message . "\nSome errors could not be put into baseline. Re-run PHPStan and fix them.");
627+
if ($output->isVeryVerbose()) {
628+
$inceptionResult->getStdOutput()->getStyle()->warning($message . "\nSome errors could not be put into baseline.");
629+
} else {
630+
$inceptionResult->getStdOutput()->getStyle()->warning($message . "\nSome errors could not be put into baseline. Re-run PHPStan with \"-vv\" and fix them.");
631+
}
628632
}
629633

630634
$exitCode = 0;

0 commit comments

Comments
 (0)