mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-01-11 07:11:03 +01:00
Speedup implicit fallthrough lint rule by 99.5 %
Summary: At least on my sample file. Test Plan: Saw time 0.073 s instead of 12.606 s. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5086
This commit is contained in:
parent
4d28d91d98
commit
aadaf9a795
1 changed files with 3 additions and 2 deletions
|
@ -534,9 +534,10 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
|
||||||
$tokens = $block->getTokens();
|
$tokens = $block->getTokens();
|
||||||
$last = end($tokens);
|
$last = end($tokens);
|
||||||
while ($last && $last = $last->getNextToken()) {
|
while ($last && $last = $last->getNextToken()) {
|
||||||
if (!$last->isSemantic()) {
|
if ($last->isSemantic()) {
|
||||||
$tokens[$last->getTokenID()] = $last;
|
break;
|
||||||
}
|
}
|
||||||
|
$tokens[$last->getTokenID()] = $last;
|
||||||
}
|
}
|
||||||
|
|
||||||
$blocks[$key] = array(
|
$blocks[$key] = array(
|
||||||
|
|
Loading…
Reference in a new issue