Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15196882
D7377.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D7377.id.diff
View Options
Index: src/lint/engine/ArcanistLintEngine.php
===================================================================
--- src/lint/engine/ArcanistLintEngine.php
+++ src/lint/engine/ArcanistLintEngine.php
@@ -63,11 +63,22 @@
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;
Index: src/lint/engine/ArcanistSingleLintEngine.php
===================================================================
--- src/lint/engine/ArcanistSingleLintEngine.php
+++ src/lint/engine/ArcanistSingleLintEngine.php
@@ -15,7 +15,8 @@
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(
Index: src/lint/linter/ArcanistScriptAndRegexLinter.php
===================================================================
--- src/lint/linter/ArcanistScriptAndRegexLinter.php
+++ src/lint/linter/ArcanistScriptAndRegexLinter.php
@@ -348,7 +348,9 @@
*/
private function getConfiguredScript() {
$key = 'linter.scriptandregex.script';
- $config = $this->getConfigFromAnySource($key);
+ $config = $this->getEngine()
+ ->getConfigurationManager()
+ ->getConfigFromAnySource($key);
if (!$config) {
throw new ArcanistUsageException(
@@ -373,7 +375,9 @@
*/
private function getConfiguredRegex() {
$key = 'linter.scriptandregex.regex';
- $config = $this->getConfigFromAnySource($key);
+ $config = $this->getEngine()
+ ->getConfigurationManager()
+ ->getConfigFromAnySource($key);
if (!$config) {
throw new ArcanistUsageException(
Index: src/workflow/ArcanistLintWorkflow.php
===================================================================
--- src/workflow/ArcanistLintWorkflow.php
+++ src/workflow/ArcanistLintWorkflow.php
@@ -261,7 +261,8 @@
$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));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 23, 7:43 PM (4 h, 51 s)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7187578
Default Alt Text
D7377.id.diff (2 KB)
Attached To
Mode
D7377: Provide ConfigurationManager to LintEngine in Arcanist
Attached
Detach File
Event Timeline
Log In to Comment