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

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
This commit is contained in:
Peng Li 2014-03-11 15:26:31 -07:00 committed by epriestley
parent 37dac61131
commit ac82dea3c9

View file

@ -188,6 +188,7 @@ EOTEXT
$engine = newv($lint_engine, array()); $engine = newv($lint_engine, array());
$engine->setWorkingCopy($working_copy); $engine->setWorkingCopy($working_copy);
$engine->setConfigurationManager($this->getConfigurationManager());
$engine->setMinimumSeverity(ArcanistLintSeverity::SEVERITY_ERROR); $engine->setMinimumSeverity(ArcanistLintSeverity::SEVERITY_ERROR);
$engine->setPaths($paths); $engine->setPaths($paths);
$engine->setCommitHookMode(true); $engine->setCommitHookMode(true);