Skip to content

Commit dd028cb

Browse files
committed
Detect --generate-baseline combined with --pro
1 parent 1310ce9 commit dd028cb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Command/AnalyseCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
264264
}
265265

266266
if ($fix) {
267+
if ($generateBaselineFile !== null) {
268+
$inceptionResult->getStdOutput()->getStyle()->error('You cannot pass the --generate-baseline option when running PHPStan Pro.');
269+
return $inceptionResult->handleReturn(1, null);
270+
}
271+
267272
return $this->runFixer($inceptionResult, $container, $onlyFiles, $input, $output, $files);
268273
}
269274

0 commit comments

Comments
 (0)