mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +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:
parent
af343e4ca6
commit
e72a43a992
1 changed files with 14 additions and 21 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue