Skip to content
Permalink
Browse files

Prevent erroneous unused suppressions from plugin

  • Loading branch information...
muglug committed Aug 18, 2019
1 parent 6ea68e9 commit 43a9ff073595092bbadd22e8b27245910e44a3fa
@@ -152,7 +152,7 @@ public function analyze(
$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 @@ public function enterNode(PhpParser\Node $node, &$traverseChildren = true)
}
if ($end_offset !== 0) {
/** @psalm-suppress MixedOperand */
$node->setAttribute('endFilePos', $stmt_end_pos + $end_offset);
}

0 comments on commit 43a9ff0

Please sign in to comment.
You can’t perform that action at this time.