]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Rename `ArcanistLintRenderer` subclasses
authorJoshua Spence <josh@joshuaspence.com>
Thu, 24 Jul 2014 22:16:29 +0000 (08:16 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Thu, 24 Jul 2014 22:16:29 +0000 (08:16 +1000)
Summary: Ref T5655.

Test Plan: `arc lint` and `arc unit`

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5655

Differential Revision: https://secure.phabricator.com/D10011

src/__phutil_library_map__.php
src/lint/renderer/ArcanistCheckstyleXMLLintRenderer.php [moved from src/lint/renderer/ArcanistLintCheckstyleXMLRenderer.php with 95% similarity]
src/lint/renderer/ArcanistCompilerLikeLintRenderer.php [moved from src/lint/renderer/ArcanistLintLikeCompilerRenderer.php with 91% similarity]
src/lint/renderer/ArcanistConsoleLintRenderer.php [moved from src/lint/renderer/ArcanistLintConsoleRenderer.php with 99% similarity]
src/lint/renderer/ArcanistJSONLintRenderer.php [moved from src/lint/renderer/ArcanistLintJSONRenderer.php with 92% similarity]
src/lint/renderer/ArcanistNoneLintRenderer.php [moved from src/lint/renderer/ArcanistLintNoneRenderer.php with 71% similarity]
src/lint/renderer/ArcanistSummaryLintRenderer.php [moved from src/lint/renderer/ArcanistLintSummaryRenderer.php with 91% similarity]
src/workflow/ArcanistLintWorkflow.php
src/workflow/ArcanistSvnHookPreCommitWorkflow.php

index b0599c102e4b249e2b0b15a78d96fa5e3fb291c3..38515e269fe7386975bae759c930aff5b0e099ae 100644 (file)
@@ -30,6 +30,7 @@ phutil_register_library_map(array(
     'ArcanistCSharpLinter' => 'lint/linter/ArcanistCSharpLinter.php',
     'ArcanistCallConduitWorkflow' => 'workflow/ArcanistCallConduitWorkflow.php',
     'ArcanistCapabilityNotSupportedException' => 'workflow/exception/ArcanistCapabilityNotSupportedException.php',
+    'ArcanistCheckstyleXMLLintRenderer' => 'lint/renderer/ArcanistCheckstyleXMLLintRenderer.php',
     'ArcanistChmodLinter' => 'lint/linter/ArcanistChmodLinter.php',
     'ArcanistChooseInvalidRevisionException' => 'exception/ArcanistChooseInvalidRevisionException.php',
     'ArcanistChooseNoRevisionsException' => 'exception/ArcanistChooseNoRevisionsException.php',
@@ -42,10 +43,12 @@ phutil_register_library_map(array(
     'ArcanistCommentRemover' => 'parser/ArcanistCommentRemover.php',
     'ArcanistCommentRemoverTestCase' => 'parser/__tests__/ArcanistCommentRemoverTestCase.php',
     'ArcanistCommitWorkflow' => 'workflow/ArcanistCommitWorkflow.php',
+    'ArcanistCompilerLikeLintRenderer' => 'lint/renderer/ArcanistCompilerLikeLintRenderer.php',
     'ArcanistConduitLinter' => 'lint/linter/ArcanistConduitLinter.php',
     'ArcanistConfiguration' => 'configuration/ArcanistConfiguration.php',
     'ArcanistConfigurationDrivenLintEngine' => 'lint/engine/ArcanistConfigurationDrivenLintEngine.php',
     'ArcanistConfigurationManager' => 'configuration/ArcanistConfigurationManager.php',
+    'ArcanistConsoleLintRenderer' => 'lint/renderer/ArcanistConsoleLintRenderer.php',
     'ArcanistCoverWorkflow' => 'workflow/ArcanistCoverWorkflow.php',
     'ArcanistCppcheckLinter' => 'lint/linter/ArcanistCppcheckLinter.php',
     'ArcanistCppcheckLinterTestCase' => 'lint/linter/__tests__/ArcanistCppcheckLinterTestCase.php',
@@ -93,6 +96,7 @@ phutil_register_library_map(array(
     'ArcanistJSHintLinterTestCase' => 'lint/linter/__tests__/ArcanistJSHintLinterTestCase.php',
     'ArcanistJSONLintLinter' => 'lint/linter/ArcanistJSONLintLinter.php',
     'ArcanistJSONLintLinterTestCase' => 'lint/linter/__tests__/ArcanistJSONLintLinterTestCase.php',
+    'ArcanistJSONLintRenderer' => 'lint/renderer/ArcanistJSONLintRenderer.php',
     'ArcanistJSONLinter' => 'lint/linter/ArcanistJSONLinter.php',
     'ArcanistJSONLinterTestCase' => 'lint/linter/__tests__/ArcanistJSONLinterTestCase.php',
     'ArcanistJscsLinter' => 'lint/linter/ArcanistJscsLinter.php',
@@ -101,18 +105,12 @@ phutil_register_library_map(array(
     'ArcanistLesscLinter' => 'lint/linter/ArcanistLesscLinter.php',
     'ArcanistLesscLinterTestCase' => 'lint/linter/__tests__/ArcanistLesscLinterTestCase.php',
     'ArcanistLiberateWorkflow' => 'workflow/ArcanistLiberateWorkflow.php',
-    'ArcanistLintCheckstyleXMLRenderer' => 'lint/renderer/ArcanistLintCheckstyleXMLRenderer.php',
-    'ArcanistLintConsoleRenderer' => 'lint/renderer/ArcanistLintConsoleRenderer.php',
     'ArcanistLintEngine' => 'lint/engine/ArcanistLintEngine.php',
-    'ArcanistLintJSONRenderer' => 'lint/renderer/ArcanistLintJSONRenderer.php',
-    'ArcanistLintLikeCompilerRenderer' => 'lint/renderer/ArcanistLintLikeCompilerRenderer.php',
     'ArcanistLintMessage' => 'lint/ArcanistLintMessage.php',
-    'ArcanistLintNoneRenderer' => 'lint/renderer/ArcanistLintNoneRenderer.php',
     'ArcanistLintPatcher' => 'lint/ArcanistLintPatcher.php',
     'ArcanistLintRenderer' => 'lint/renderer/ArcanistLintRenderer.php',
     'ArcanistLintResult' => 'lint/ArcanistLintResult.php',
     'ArcanistLintSeverity' => 'lint/ArcanistLintSeverity.php',
-    'ArcanistLintSummaryRenderer' => 'lint/renderer/ArcanistLintSummaryRenderer.php',
     'ArcanistLintWorkflow' => 'workflow/ArcanistLintWorkflow.php',
     'ArcanistLinter' => 'lint/linter/ArcanistLinter.php',
     'ArcanistLinterTestCase' => 'lint/linter/__tests__/ArcanistLinterTestCase.php',
@@ -127,6 +125,7 @@ phutil_register_library_map(array(
     'ArcanistNoEngineException' => 'exception/usage/ArcanistNoEngineException.php',
     'ArcanistNoLintLinter' => 'lint/linter/ArcanistNoLintLinter.php',
     'ArcanistNoLintTestCaseMisnamed' => 'lint/linter/__tests__/ArcanistNoLintTestCase.php',
+    'ArcanistNoneLintRenderer' => 'lint/renderer/ArcanistNoneLintRenderer.php',
     'ArcanistPEP8Linter' => 'lint/linter/ArcanistPEP8Linter.php',
     'ArcanistPEP8LinterTestCase' => 'lint/linter/__tests__/ArcanistPEP8LinterTestCase.php',
     'ArcanistPHPCSLinterTestCase' => 'lint/linter/__tests__/ArcanistPHPCSLinterTestCase.php',
@@ -164,6 +163,7 @@ phutil_register_library_map(array(
     'ArcanistStopWorkflow' => 'workflow/ArcanistStopWorkflow.php',
     'ArcanistSubversionAPI' => 'repository/api/ArcanistSubversionAPI.php',
     'ArcanistSubversionHookAPI' => 'repository/hookapi/ArcanistSubversionHookAPI.php',
+    'ArcanistSummaryLintRenderer' => 'lint/renderer/ArcanistSummaryLintRenderer.php',
     'ArcanistSvnHookPreCommitWorkflow' => 'workflow/ArcanistSvnHookPreCommitWorkflow.php',
     'ArcanistTasksWorkflow' => 'workflow/ArcanistTasksWorkflow.php',
     'ArcanistTestCase' => 'infrastructure/testing/ArcanistTestCase.php',
@@ -231,6 +231,7 @@ phutil_register_library_map(array(
     'ArcanistCSharpLinter' => 'ArcanistLinter',
     'ArcanistCallConduitWorkflow' => 'ArcanistWorkflow',
     'ArcanistCapabilityNotSupportedException' => 'Exception',
+    'ArcanistCheckstyleXMLLintRenderer' => 'ArcanistLintRenderer',
     'ArcanistChmodLinter' => 'ArcanistLinter',
     'ArcanistChooseInvalidRevisionException' => 'Exception',
     'ArcanistChooseNoRevisionsException' => 'Exception',
@@ -242,8 +243,10 @@ phutil_register_library_map(array(
     'ArcanistCoffeeLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
     'ArcanistCommentRemoverTestCase' => 'ArcanistTestCase',
     'ArcanistCommitWorkflow' => 'ArcanistWorkflow',
+    'ArcanistCompilerLikeLintRenderer' => 'ArcanistLintRenderer',
     'ArcanistConduitLinter' => 'ArcanistLinter',
     'ArcanistConfigurationDrivenLintEngine' => 'ArcanistLintEngine',
+    'ArcanistConsoleLintRenderer' => 'ArcanistLintRenderer',
     'ArcanistCoverWorkflow' => 'ArcanistWorkflow',
     'ArcanistCppcheckLinter' => 'ArcanistExternalLinter',
     'ArcanistCppcheckLinterTestCase' => 'ArcanistArcanistLinterTestCase',
@@ -280,6 +283,7 @@ phutil_register_library_map(array(
     'ArcanistJSHintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
     'ArcanistJSONLintLinter' => 'ArcanistExternalLinter',
     'ArcanistJSONLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistJSONLintRenderer' => 'ArcanistLintRenderer',
     'ArcanistJSONLinter' => 'ArcanistLinter',
     'ArcanistJSONLinterTestCase' => 'ArcanistArcanistLinterTestCase',
     'ArcanistJscsLinter' => 'ArcanistExternalLinter',
@@ -288,12 +292,6 @@ phutil_register_library_map(array(
     'ArcanistLesscLinter' => 'ArcanistExternalLinter',
     'ArcanistLesscLinterTestCase' => 'ArcanistArcanistLinterTestCase',
     'ArcanistLiberateWorkflow' => 'ArcanistWorkflow',
-    'ArcanistLintCheckstyleXMLRenderer' => 'ArcanistLintRenderer',
-    'ArcanistLintConsoleRenderer' => 'ArcanistLintRenderer',
-    'ArcanistLintJSONRenderer' => 'ArcanistLintRenderer',
-    'ArcanistLintLikeCompilerRenderer' => 'ArcanistLintRenderer',
-    'ArcanistLintNoneRenderer' => 'ArcanistLintRenderer',
-    'ArcanistLintSummaryRenderer' => 'ArcanistLintRenderer',
     'ArcanistLintWorkflow' => 'ArcanistWorkflow',
     'ArcanistLinterTestCase' => 'ArcanistPhutilTestCase',
     'ArcanistLintersWorkflow' => 'ArcanistWorkflow',
@@ -306,6 +304,7 @@ phutil_register_library_map(array(
     'ArcanistNoEngineException' => 'ArcanistUsageException',
     'ArcanistNoLintLinter' => 'ArcanistLinter',
     'ArcanistNoLintTestCaseMisnamed' => 'ArcanistLinterTestCase',
+    'ArcanistNoneLintRenderer' => 'ArcanistLintRenderer',
     'ArcanistPEP8Linter' => 'ArcanistExternalLinter',
     'ArcanistPEP8LinterTestCase' => 'ArcanistArcanistLinterTestCase',
     'ArcanistPHPCSLinterTestCase' => 'ArcanistArcanistLinterTestCase',
@@ -340,6 +339,7 @@ phutil_register_library_map(array(
     'ArcanistStopWorkflow' => 'ArcanistPhrequentWorkflow',
     'ArcanistSubversionAPI' => 'ArcanistRepositoryAPI',
     'ArcanistSubversionHookAPI' => 'ArcanistHookAPI',
+    'ArcanistSummaryLintRenderer' => 'ArcanistLintRenderer',
     'ArcanistSvnHookPreCommitWorkflow' => 'ArcanistWorkflow',
     'ArcanistTasksWorkflow' => 'ArcanistWorkflow',
     'ArcanistTestCase' => 'ArcanistPhutilTestCase',
similarity index 95%
rename from src/lint/renderer/ArcanistLintCheckstyleXMLRenderer.php
rename to src/lint/renderer/ArcanistCheckstyleXMLLintRenderer.php
index 30a91485d52af6b5acf842bbc4e935e6215fe263..b4705ad59dc63cc37faea106cd7dfd4b707079a4 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Shows lint messages to the user.
  */
-final class ArcanistLintCheckstyleXMLRenderer extends ArcanistLintRenderer {
+final class ArcanistCheckstyleXMLLintRenderer extends ArcanistLintRenderer {
 
   private $writer;
 
similarity index 91%
rename from src/lint/renderer/ArcanistLintLikeCompilerRenderer.php
rename to src/lint/renderer/ArcanistCompilerLikeLintRenderer.php
index 5ffce5ff6f1f8acd5e63c560b8ea49b1e2ecd60b..0a14ebee83db73f7fefbfc6edc657d9e2bd5fc8d 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Shows lint messages to the user.
  */
-final class ArcanistLintLikeCompilerRenderer extends ArcanistLintRenderer {
+final class ArcanistCompilerLikeLintRenderer extends ArcanistLintRenderer {
 
   public function renderLintResult(ArcanistLintResult $result) {
     $lines = array();
similarity index 99%
rename from src/lint/renderer/ArcanistLintConsoleRenderer.php
rename to src/lint/renderer/ArcanistConsoleLintRenderer.php
index c083abd0da202a077f7d0e3e08b0083c7bf391af..25316c34922b66d1a72cce0663092576b22cf9bb 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Shows lint messages to the user.
  */
-final class ArcanistLintConsoleRenderer extends ArcanistLintRenderer {
+final class ArcanistConsoleLintRenderer extends ArcanistLintRenderer {
 
   private $showAutofixPatches = false;
 
similarity index 92%
rename from src/lint/renderer/ArcanistLintJSONRenderer.php
rename to src/lint/renderer/ArcanistJSONLintRenderer.php
index 7170bdc20f5f936a77fd51ead1ef0aaeb3482593..044323441293bb6ec9383c4aa05db90a7ee752b7 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Shows lint messages to the user.
  */
-final class ArcanistLintJSONRenderer extends ArcanistLintRenderer {
+final class ArcanistJSONLintRenderer extends ArcanistLintRenderer {
 
   const LINES_OF_CONTEXT = 3;
 
similarity index 71%
rename from src/lint/renderer/ArcanistLintNoneRenderer.php
rename to src/lint/renderer/ArcanistNoneLintRenderer.php
index 3e047bed220735af6ee79b874808f7c2d0e996bb..ce74e395b0c8e935364804991603ee59e39e8b54 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-final class ArcanistLintNoneRenderer extends ArcanistLintRenderer {
+final class ArcanistNoneLintRenderer extends ArcanistLintRenderer {
 
   public function renderLintResult(ArcanistLintResult $result) {
     return '';
similarity index 91%
rename from src/lint/renderer/ArcanistLintSummaryRenderer.php
rename to src/lint/renderer/ArcanistSummaryLintRenderer.php
index f4ad6bbac8ca968bad3528bee25fcfde87199ed3..c78374949786e0f32cdd9b7c20abc3bd35416823 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Shows lint messages to the user.
  */
-final class ArcanistLintSummaryRenderer extends ArcanistLintRenderer {
+final class ArcanistSummaryLintRenderer extends ArcanistLintRenderer {
 
   public function renderLintResult(ArcanistLintResult $result) {
     $messages = $result->getMessages();
index 912a708bdcc5d21d68555ada78a5f1364d692e53..396e3ed8f661933e642562fc723b2d7198363d6a 100644 (file)
@@ -424,30 +424,30 @@ EOTEXT
 
     switch ($this->getArgument('output')) {
       case 'json':
-        $renderer = new ArcanistLintJSONRenderer();
+        $renderer = new ArcanistJSONLintRenderer();
         $prompt_patches = false;
         $apply_patches = $this->getArgument('apply-patches');
         break;
       case 'summary':
-        $renderer = new ArcanistLintSummaryRenderer();
+        $renderer = new ArcanistSummaryLintRenderer();
         break;
       case 'none':
         $prompt_patches = false;
         $apply_patches = $this->getArgument('apply-patches');
-        $renderer = new ArcanistLintNoneRenderer();
+        $renderer = new ArcanistNoneLintRenderer();
         break;
       case 'compiler':
-        $renderer = new ArcanistLintLikeCompilerRenderer();
+        $renderer = new ArcanistCompilerLikeLintRenderer();
         $prompt_patches = false;
         $apply_patches = $this->getArgument('apply-patches');
         break;
       case 'xml':
-        $renderer = new ArcanistLintCheckstyleXMLRenderer();
+        $renderer = new ArcanistCheckstyleXMLLintRenderer();
         $prompt_patches = false;
         $apply_patches = $this->getArgument('apply-patches');
         break;
       default:
-        $renderer = new ArcanistLintConsoleRenderer();
+        $renderer = new ArcanistConsoleLintRenderer();
         $renderer->setShowAutofixPatches($prompt_autofix_patches);
         break;
     }
@@ -539,7 +539,7 @@ EOTEXT
 
     if ($failed) {
       if ($failed instanceof ArcanistNoEffectException) {
-        if ($renderer instanceof ArcanistLintNoneRenderer) {
+        if ($renderer instanceof ArcanistNoneLintRenderer) {
           return 0;
         }
       }
index 136bec2e7c59699d7af04a6f97f2e7bef55079a7..41dabb1841a0e3c52726621ef55cf6f5ff008ebd 100644 (file)
@@ -217,7 +217,7 @@ EOTEXT
         "errors to disable lint for that file.\n\n");
       echo phutil_console_wrap($msg);
 
-      $renderer = new ArcanistLintConsoleRenderer();
+      $renderer = new ArcanistConsoleLintRenderer();
       foreach ($failures as $result) {
         echo $renderer->renderLintResult($result);
       }