mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-23 05:50:54 +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();
|
||||
$last = end($tokens);
|
||||
while ($last && $last = $last->getNextToken()) {
|
||||
if (!$last->isSemantic()) {
|
||||
$tokens[$last->getTokenID()] = $last;
|
||||
if ($last->isSemantic()) {
|
||||
break;
|
||||
}
|
||||
$tokens[$last->getTokenID()] = $last;
|
||||
}
|
||||
|
||||
$blocks[$key] = array(
|
||||
|
|
Loading…
Reference in a new issue