mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Prevent erroneous unused suppressions from plugin
This commit is contained in:
parent
6ea68e9f7f
commit
43a9ff0735
@ -152,7 +152,7 @@ abstract class FunctionLikeAnalyzer extends SourceAnalyzer implements Statements
|
||||
|
||||
$classlike_storage_provider = $codebase->classlike_storage_provider;
|
||||
|
||||
if ($codebase->track_unused_suppressions) {
|
||||
if ($codebase->track_unused_suppressions && !isset($storage->suppressed_issues[0])) {
|
||||
foreach ($storage->suppressed_issues as $offset => $issue_name) {
|
||||
IssueBuffer::addUnusedSuppression($this->getFilePath(), $offset, $issue_name);
|
||||
}
|
||||
|
@ -309,7 +309,6 @@ class PartialParserVisitor extends PhpParser\NodeVisitorAbstract implements PhpP
|
||||
}
|
||||
|
||||
if ($end_offset !== 0) {
|
||||
/** @psalm-suppress MixedOperand */
|
||||
$node->setAttribute('endFilePos', $stmt_end_pos + $end_offset);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user