Skip to content

Commit

Permalink
Merge pull request #8827 from weirdan/improve-source-autodiscovery-fa…
Browse files Browse the repository at this point in the history
…ilure-message

Improve source autodiscovery failure message
  • Loading branch information
orklah committed Dec 4, 2022
2 parents 4a77f24 + 45bf0d9 commit 496b71d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Psalm/Config/Creator.php
Expand Up @@ -132,7 +132,7 @@ public static function getLevel(array $issues, int $counted_types): int
$issues_at_level[$issue_level][$issue_type] = 0;
}

$issues_at_level[$issue_level][$issue_type] += 100/$counted_types;
$issues_at_level[$issue_level][$issue_type] += 100 / $counted_types;
}

foreach ($issues_at_level as $level => $issues) {
Expand Down Expand Up @@ -186,7 +186,10 @@ public static function getPaths(string $current_dir, ?string $suggested_dir): ar

if (!file_exists($composer_json_location)) {
throw new ConfigCreationException(
'Problem during config autodiscovery - could not find composer.json during initialization.'
'Problem during source autodiscovery - could not find composer.json during initialization. '
. 'If your project doesn\'t use Composer autoloader you will need to run '
. '`psalm --init source_folder`, e.g. `psalm --init library` if your source files '
. 'reside in `library` folder'
);
}
try {
Expand Down

0 comments on commit 496b71d

Please sign in to comment.