From ac82dea3c9e55f72c69cccfc3c36fe3cd01bf541 Mon Sep 17 00:00:00 2001 From: Peng Li Date: Tue, 11 Mar 2014 15:26:31 -0700 Subject: [PATCH] Lint engine seems to get null configuration manager in svn precommit hook workflow Summary: We recently tried to advance the arcanist HEAD in our release branch but failed, due to an exception in SVN pre-commit hook like this: abort: Commit blocked by pre-commit hook (exit code 1) with output: LINT 1.3s FacebookWebJSLintLinter (1 file) Exception Some linters failed: - FacebookWebCopyrightLinter: BadMethodCallException: Call to a member function getConfigFromAnySource() on a non-object (Run with --trace for a full exception trace.) However `arc lint` works just fine. By searching the change history, it looks related to a few commits D7271, D7377, D7382, especially D7377, where configuration manager is added to the lint engine. Add it to the SVN precommit hook workflow too. Test Plan: I am not quite sure how to test it out easily. Any suggestions? Reviewers: lifeihuang, JoelB, epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: aran, epriestley, mikemag, Korvin Differential Revision: https://secure.phabricator.com/D8492 --- src/workflow/ArcanistSvnHookPreCommitWorkflow.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/workflow/ArcanistSvnHookPreCommitWorkflow.php b/src/workflow/ArcanistSvnHookPreCommitWorkflow.php index 2a4fe06f..7c54d32e 100644 --- a/src/workflow/ArcanistSvnHookPreCommitWorkflow.php +++ b/src/workflow/ArcanistSvnHookPreCommitWorkflow.php @@ -188,6 +188,7 @@ EOTEXT $engine = newv($lint_engine, array()); $engine->setWorkingCopy($working_copy); + $engine->setConfigurationManager($this->getConfigurationManager()); $engine->setMinimumSeverity(ArcanistLintSeverity::SEVERITY_ERROR); $engine->setPaths($paths); $engine->setCommitHookMode(true);