From dc2f89040c494994e33de09a98e9fd257ee68be0 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Mon, 1 Nov 2021 13:40:52 +0100 Subject: [PATCH] Do not error when baseline is generated when all errors are fixed --- src/Command/AnalyseCommand.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Command/AnalyseCommand.php b/src/Command/AnalyseCommand.php index 0fab3d7261..0ca81a3a54 100644 --- a/src/Command/AnalyseCommand.php +++ b/src/Command/AnalyseCommand.php @@ -239,11 +239,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int } if ($generateBaselineFile !== null) { - if (!$analysisResult->hasErrors()) { - $inceptionResult->getStdOutput()->getStyle()->error('No errors were found during the analysis. Baseline could not be generated.'); - - return $inceptionResult->handleReturn(1); - } if ($analysisResult->hasInternalErrors()) { $inceptionResult->getStdOutput()->getStyle()->error('An internal error occurred. Baseline could not be generated. Re-run PHPStan without --generate-baseline to see what\'s going on.');