From 73feffbe7036bf4ab63b9a7c9792a6a72a312685 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Wed, 20 May 2015 07:01:53 +1000 Subject: [PATCH] Remove the `ArcanistConduitLinter` Summary: This linter is a relic from Facebook days. As Harbormaster becomes more useful (T1049) this linter should become obsolete. Instead of modernising this linter to be compatible with modern infrastructure, it is easier to just let it die. Test Plan: N/A Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D10533 --- src/__phutil_library_map__.php | 2 - src/lint/linter/ArcanistConduitLinter.php | 98 ----------------------- 2 files changed, 100 deletions(-) delete mode 100644 src/lint/linter/ArcanistConduitLinter.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 4c9ef369..c8bfd3f4 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -41,7 +41,6 @@ phutil_register_library_map(array( 'ArcanistCommitWorkflow' => 'workflow/ArcanistCommitWorkflow.php', 'ArcanistCompilerLintRenderer' => 'lint/renderer/ArcanistCompilerLintRenderer.php', 'ArcanistComprehensiveLintEngine' => 'lint/engine/ArcanistComprehensiveLintEngine.php', - 'ArcanistConduitLinter' => 'lint/linter/ArcanistConduitLinter.php', 'ArcanistConfiguration' => 'configuration/ArcanistConfiguration.php', 'ArcanistConfigurationDrivenLintEngine' => 'lint/engine/ArcanistConfigurationDrivenLintEngine.php', 'ArcanistConfigurationManager' => 'configuration/ArcanistConfigurationManager.php', @@ -242,7 +241,6 @@ phutil_register_library_map(array( 'ArcanistCommitWorkflow' => 'ArcanistWorkflow', 'ArcanistCompilerLintRenderer' => 'ArcanistLintRenderer', 'ArcanistComprehensiveLintEngine' => 'ArcanistLintEngine', - 'ArcanistConduitLinter' => 'ArcanistLinter', 'ArcanistConfigurationDrivenLintEngine' => 'ArcanistLintEngine', 'ArcanistConsoleLintRenderer' => 'ArcanistLintRenderer', 'ArcanistCoverWorkflow' => 'ArcanistWorkflow', diff --git a/src/lint/linter/ArcanistConduitLinter.php b/src/lint/linter/ArcanistConduitLinter.php deleted file mode 100644 index 8991c503..00000000 --- a/src/lint/linter/ArcanistConduitLinter.php +++ /dev/null @@ -1,98 +0,0 @@ -conduitURI = $conduit_uri; - $this->linterName = $linter_name; - } - - public function getLinterName() { - return $this->linterName; - } - - public function getLintNameMap() { - // See @{method:getLintSeverityMap} for rationale. - throw new ArcanistUsageException( - pht('%s does not support a name map.', __CLASS__)); - } - - public function getLintSeverityMap() { - // The rationale here is that this class will only be used for custom - // linting in installations. No two server endpoints will be the same across - // different instantiations. Therefore, the server can handle all severity - // customization directly. - throw new ArcanistUsageException( - pht( - '%s does not support client-side severity customization.', - __CLASS__)); - } - - protected function canCustomizeLintSeverities() { - return false; - } - - public function willLintPaths(array $paths) { - // Load all file path data into $this->data. - array_map(array($this, 'getData'), $paths); - - $conduit = new ConduitClient($this->conduitURI); - - $this->results = $conduit->callMethodSynchronous( - self::CONDUIT_METHOD, - array( - 'file_contents' => $this->data, - )); - } - - public function lintPath($path) { - $lints = idx($this->results, $path); - - if (!$lints) { - return; - } - - foreach ($lints as $lint) { - $this->addLintMessage(ArcanistLintMessage::newFromDictionary($lint)); - } - } - -}