]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Lint engine seems to get null configuration manager in svn precommit hook workflow
authorPeng Li <pengli@fb.com>
Tue, 11 Mar 2014 22:26:31 +0000 (15:26 -0700)
committerepriestley <git@epriestley.com>
Tue, 11 Mar 2014 22:35:28 +0000 (15:35 -0700)
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

index 2a4fe06f9ffb7a8eacaf617a82725a1e472b2c16..7c54d32e100829c4d652ea0143b6d081c74b6422 100644 (file)
@@ -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);