Skip to content

Commit c1fc053

Browse files
committed
Issue bot quickfix: keep file-specific errors with non-ignorable exception as file-specific errors
Broken since aa92113
1 parent 3265d5f commit c1fc053

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Command/AnalyseCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
331331
}
332332

333333
$internalErrors = [];
334+
$internalFileSpecificErrors = [];
334335
foreach ($analysisResult->getInternalErrorObjects() as $internalError) {
335336
$internalErrors[$internalError->getMessage()] = new InternalError(
336337
$internalError->getTraceAsString() !== null ? sprintf('Internal error: %s', $internalError->getMessage()) : $internalError->getMessage(),
@@ -345,6 +346,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
345346
continue;
346347
}
347348

349+
$internalFileSpecificErrors[] = $fileSpecificError;
350+
348351
$message = $fileSpecificError->getMessage();
349352
$metadata = $fileSpecificError->getMetadata();
350353
if (
@@ -424,7 +427,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
424427

425428
if (count($internalErrors) > 0) {
426429
$analysisResult = new AnalysisResult(
427-
[],
430+
$internalFileSpecificErrors,
428431
array_map(static fn (InternalError $internalError) => $internalError->getMessage(), $internalErrors),
429432
[],
430433
[],

0 commit comments

Comments
 (0)