diff --git a/src/Command/AnalyseCommand.php b/src/Command/AnalyseCommand.php index f30200feef..21019ca695 100644 --- a/src/Command/AnalyseCommand.php +++ b/src/Command/AnalyseCommand.php @@ -605,7 +605,7 @@ private function generateBaseline(string $generateBaselineFile, InceptionResult if (!$fileSpecificError->canBeIgnored()) { $unignorableCount++; if ($output->isVeryVerbose()) { - $inceptionResult->getStdOutput()->writeLineFormatted('Unignorable could not be added to the baseline:'); + $inceptionResult->getStdOutput()->writeLineFormatted('Unignorable errors could not be added to the baseline:'); $inceptionResult->getStdOutput()->writeLineFormatted($fileSpecificError->getMessage()); $inceptionResult->getStdOutput()->writeLineFormatted($fileSpecificError->getFile()); $inceptionResult->getStdOutput()->writeLineFormatted(''); @@ -624,7 +624,11 @@ private function generateBaseline(string $generateBaselineFile, InceptionResult ) { $inceptionResult->getStdOutput()->getStyle()->success($message); } else { - $inceptionResult->getStdOutput()->getStyle()->warning($message . "\nSome errors could not be put into baseline. Re-run PHPStan and fix them."); + if ($output->isVeryVerbose()) { + $inceptionResult->getStdOutput()->getStyle()->warning($message . "\nSome errors could not be put into baseline."); + } else { + $inceptionResult->getStdOutput()->getStyle()->warning($message . "\nSome errors could not be put into baseline. Re-run PHPStan with \"-vv\" and fix them."); + } } $exitCode = 0;