Skip to content

Commit

Permalink
Merge pull request #10628 from weirdan/fix-baseline-usage-with-paths-…
Browse files Browse the repository at this point in the history
…passed-via-cli-args
  • Loading branch information
weirdan authored Feb 1, 2024
2 parents 04ba935 + 138c7b8 commit 8c473e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Psalm/Internal/Cli/Psalm.php
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,8 @@ private static function initBaseline(
if ($paths_to_check !== null) {
$filtered_issue_baseline = [];
foreach ($paths_to_check as $path_to_check) {
$path_to_check = substr($path_to_check, strlen($config->base_dir));
// +1 to remove the initial slash from $path_to_check
$path_to_check = substr($path_to_check, strlen($config->base_dir) + 1);
if (isset($issue_baseline[$path_to_check])) {
$filtered_issue_baseline[$path_to_check] = $issue_baseline[$path_to_check];
}
Expand Down

0 comments on commit 8c473e2

Please sign in to comment.