Summary: Unbreaks ArcanistSingleLintEngine / ArcanistScriptAndRegexLinter from recent config churn.
Test Plan: `arc lint --engine ArcanistSingleLintEngine --rev HEAD^`
Reviewers: btrahan
Reviewed By: btrahan
CC: csilvers, aran
Differential Revision: https://secure.phabricator.com/D7377
private $enableAsyncLint = false;
private $postponedLinters = array();
+ private $configurationManager;
public function __construct() {
}
+ public function setConfigurationManager(
+ ArcanistConfigurationManager $configuration_manager) {
+ $this->configurationManager = $configuration_manager;
+ return $this;
+ }
+
+ public function getConfigurationManager() {
+ return $this->configurationManager;
+ }
+
public function setWorkingCopy(ArcanistWorkingCopyIdentity $working_copy) {
$this->workingCopy = $working_copy;
return $this;
public function buildLinters() {
$key = 'lint.engine.single.linter';
- $linter_name = $this->getWorkingCopy()->getConfigFromAnySource($key);
+ $linter_name = $this->getConfigurationManager()
+ ->getConfigFromAnySource($key);
if (!$linter_name) {
throw new ArcanistUsageException(
*/
private function getConfiguredScript() {
$key = 'linter.scriptandregex.script';
- $config = $this->getConfigFromAnySource($key);
+ $config = $this->getEngine()
+ ->getConfigurationManager()
+ ->getConfigFromAnySource($key);
if (!$config) {
throw new ArcanistUsageException(
*/
private function getConfiguredRegex() {
$key = 'linter.scriptandregex.regex';
- $config = $this->getConfigFromAnySource($key);
+ $config = $this->getEngine()
+ ->getConfigurationManager()
+ ->getConfigFromAnySource($key);
if (!$config) {
throw new ArcanistUsageException(
$engine = newv($engine, array());
$this->engine = $engine;
- $engine->setWorkingCopy($working_copy); // todo setConfig?
+ $engine->setWorkingCopy($working_copy);
+ $engine->setConfigurationManager($configuration_manager);
$engine->setMinimumSeverity(
$this->getArgument('severity', self::DEFAULT_SEVERITY));