1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 00:32:41 +01:00

Remove "commit hook mode" workarounds for ArcanistXHPASTLinter

Summary: Ref T7674. `ArcanistXHPASTLinter` has some workarounds for running in "commit hook" mode (which has since been removed). This linter should always have a working copy.

Test Plan: `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T7674

Differential Revision: https://secure.phabricator.com/D12956
This commit is contained in:
Joshua Spence 2015-05-21 15:05:50 +10:00
parent af343e4ca6
commit e72a43a992

View file

@ -957,14 +957,12 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
private function lintImplicitFallthrough(XHPASTNode $root) {
$hook_obj = null;
$working_copy = $this->getEngine()->getWorkingCopy();
if ($working_copy) {
$hook_class = $this->switchhook;
if ($hook_class) {
$hook_obj = newv($hook_class, array());
assert_instances_of(array($hook_obj), 'ArcanistXHPASTLintSwitchHook');
}
}
$switches = $root->selectDescendantsOfType('n_SWITCH');
foreach ($switches as $switch) {
@ -2253,10 +2251,6 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
}
}
$engine = $this->getEngine();
$working_copy = $engine->getWorkingCopy();
if ($working_copy) {
// If a naming hook is configured, give it a chance to override the
// default results for all the symbol names.
$hook_class = $this->naminghook;
@ -2268,7 +2262,6 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
$names[$k][3] = $result;
}
}
}
// Raise anything we're left with.
foreach ($names as $k => $name_attrs) {