1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Prevent issues being forgotten when another error crops up

This commit is contained in:
Matthew Brown 2019-02-07 14:06:37 -05:00
parent d9e972d2f0
commit fbe5801345

View File

@ -446,6 +446,8 @@ class Analyzer
continue;
}
$matched = false;
foreach ($file_diff_map as list($from, $to, $file_offset, $line_offset)) {
if ($issue_data['from'] >= $from && $issue_data['from'] <= $to) {
$issue_data['from'] += $file_offset;
@ -454,10 +456,13 @@ class Analyzer
$issue_data['snippet_to'] += $file_offset;
$issue_data['line_from'] += $line_offset;
$issue_data['line_to'] += $line_offset;
} else {
unset($file_issues[$i]);
$matched = true;
}
}
if (!$matched) {
unset($file_issues[$i]);
}
}
}