Skip to content

Commit

Permalink
Do not call CollectedDataNode rules if internal errors are present
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Oct 3, 2022
1 parent fc0f990 commit 8778350
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Command/AnalyseApplication.php
Expand Up @@ -104,10 +104,13 @@ public function analyse(
$analyserResult = $resultCacheResult->getAnalyserResult();
$internalErrors = $analyserResult->getInternalErrors();
$errors = $analyserResult->getErrors();
foreach ($this->getCollectedDataErrors($analyserResult->getCollectedData()) as $error) {
$errors[] = $error;
$hasInternalErrors = count($internalErrors) > 0 || $analyserResult->hasReachedInternalErrorsCountLimit();
if (!$hasInternalErrors) {
foreach ($this->getCollectedDataErrors($analyserResult->getCollectedData()) as $error) {
$errors[] = $error;
}
}
$errors = $ignoredErrorHelperResult->process($errors, $onlyFiles, $files, count($internalErrors) > 0 || $analyserResult->hasReachedInternalErrorsCountLimit());
$errors = $ignoredErrorHelperResult->process($errors, $onlyFiles, $files, $hasInternalErrors);
$collectedData = $analyserResult->getCollectedData();
$savedResultCache = $resultCacheResult->isSaved();
if ($analyserResult->hasReachedInternalErrorsCountLimit()) {
Expand Down

0 comments on commit 8778350

Please sign in to comment.