]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Create an `ArcanistExternalLinterTestCase` class
authorJoshua Spence <josh@joshuaspence.com>
Sun, 4 Jan 2015 19:41:59 +0000 (06:41 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Sun, 4 Jan 2015 19:41:59 +0000 (06:41 +1100)
Summary: Creates a new base class for unit testing `ArcanistExternalLinter` subclasses. Specifically, add a test case for verifying that we are correctly parsing the output of `$external_linter --version`.

Test Plan: `arc unit`

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

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

31 files changed:
src/__phutil_library_map__.php
src/lint/linter/__tests__/ArcanistCSSLintLinterTestCase.php
src/lint/linter/__tests__/ArcanistClosureLinterTestCase.php
src/lint/linter/__tests__/ArcanistCoffeeLintLinterTestCase.php
src/lint/linter/__tests__/ArcanistCommitLinterTestCase.php
src/lint/linter/__tests__/ArcanistCppcheckLinterTestCase.php
src/lint/linter/__tests__/ArcanistCpplintLinterTestCase.php
src/lint/linter/__tests__/ArcanistExternalLinterTestCase.php [new file with mode: 0644]
src/lint/linter/__tests__/ArcanistFlake8LinterTestCase.php
src/lint/linter/__tests__/ArcanistGoLintLinterTestCase.php
src/lint/linter/__tests__/ArcanistHLintLinterTestCase.php
src/lint/linter/__tests__/ArcanistJSHintLinterTestCase.php
src/lint/linter/__tests__/ArcanistJSONLintLinterTestCase.php
src/lint/linter/__tests__/ArcanistJSONLinterTestCase.php
src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php
src/lint/linter/__tests__/ArcanistLesscLinterTestCase.php
src/lint/linter/__tests__/ArcanistLinterTestCase.php
src/lint/linter/__tests__/ArcanistMergeConflictLinterTestCase.php
src/lint/linter/__tests__/ArcanistNoLintTestCase.php
src/lint/linter/__tests__/ArcanistPEP8LinterTestCase.php
src/lint/linter/__tests__/ArcanistPhpLinterTestCase.php
src/lint/linter/__tests__/ArcanistPhpcsLinterTestCase.php
src/lint/linter/__tests__/ArcanistPhutilXHPASTLinterTestCase.php
src/lint/linter/__tests__/ArcanistPuppetLintLinterTestCase.php
src/lint/linter/__tests__/ArcanistPyFlakesLinterTestCase.php
src/lint/linter/__tests__/ArcanistPyLintLinterTestCase.php
src/lint/linter/__tests__/ArcanistRubyLinterTestCase.php
src/lint/linter/__tests__/ArcanistSpellingLinterTestCase.php
src/lint/linter/__tests__/ArcanistTextLinterTestCase.php
src/lint/linter/__tests__/ArcanistXHPASTLinterTestCase.php
src/lint/linter/__tests__/ArcanistXMLLinterTestCase.php

index f07b2bfbbf488eacc483c8d4c71e691bed0ce7d4..393ebe9a8317d57765c4e13d0d9e9d99ec49b13b 100644 (file)
@@ -71,6 +71,7 @@ phutil_register_library_map(array(
     'ArcanistEventType' => 'events/constant/ArcanistEventType.php',
     'ArcanistExportWorkflow' => 'workflow/ArcanistExportWorkflow.php',
     'ArcanistExternalLinter' => 'lint/linter/ArcanistExternalLinter.php',
+    'ArcanistExternalLinterTestCase' => 'lint/linter/__tests__/ArcanistExternalLinterTestCase.php',
     'ArcanistFeatureWorkflow' => 'workflow/ArcanistFeatureWorkflow.php',
     'ArcanistFilenameLinter' => 'lint/linter/ArcanistFilenameLinter.php',
     'ArcanistFlagWorkflow' => 'workflow/ArcanistFlagWorkflow.php',
@@ -230,7 +231,7 @@ phutil_register_library_map(array(
     'ArcanistBrowseWorkflow' => 'ArcanistWorkflow',
     'ArcanistBundleTestCase' => 'ArcanistTestCase',
     'ArcanistCSSLintLinter' => 'ArcanistExternalLinter',
-    'ArcanistCSSLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistCSSLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistCSharpLinter' => 'ArcanistLinter',
     'ArcanistCallConduitWorkflow' => 'ArcanistWorkflow',
     'ArcanistCapabilityNotSupportedException' => 'Exception',
@@ -239,9 +240,9 @@ phutil_register_library_map(array(
     'ArcanistCloseRevisionWorkflow' => 'ArcanistWorkflow',
     'ArcanistCloseWorkflow' => 'ArcanistWorkflow',
     'ArcanistClosureLinter' => 'ArcanistExternalLinter',
-    'ArcanistClosureLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistClosureLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistCoffeeLintLinter' => 'ArcanistExternalLinter',
-    'ArcanistCoffeeLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistCoffeeLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistCommentRemoverTestCase' => 'ArcanistTestCase',
     'ArcanistCommitLinter' => 'ArcanistLinter',
     'ArcanistCommitLinterTestCase' => 'ArcanistArcanistLinterTestCase',
@@ -252,9 +253,9 @@ phutil_register_library_map(array(
     'ArcanistConsoleLintRenderer' => 'ArcanistLintRenderer',
     'ArcanistCoverWorkflow' => 'ArcanistWorkflow',
     'ArcanistCppcheckLinter' => 'ArcanistExternalLinter',
-    'ArcanistCppcheckLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistCppcheckLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistCpplintLinter' => 'ArcanistExternalLinter',
-    'ArcanistCpplintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistCpplintLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistDiffParserTestCase' => 'ArcanistTestCase',
     'ArcanistDiffUtilsTestCase' => 'ArcanistTestCase',
     'ArcanistDiffWorkflow' => 'ArcanistWorkflow',
@@ -264,37 +265,38 @@ phutil_register_library_map(array(
     'ArcanistEventType' => 'PhutilEventType',
     'ArcanistExportWorkflow' => 'ArcanistWorkflow',
     'ArcanistExternalLinter' => 'ArcanistFutureLinter',
+    'ArcanistExternalLinterTestCase' => 'ArcanistLinterTestCase',
     'ArcanistFeatureWorkflow' => 'ArcanistWorkflow',
     'ArcanistFilenameLinter' => 'ArcanistLinter',
     'ArcanistFlagWorkflow' => 'ArcanistWorkflow',
     'ArcanistFlake8Linter' => 'ArcanistExternalLinter',
-    'ArcanistFlake8LinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistFlake8LinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistFutureLinter' => 'ArcanistLinter',
     'ArcanistGeneratedLinter' => 'ArcanistLinter',
     'ArcanistGetConfigWorkflow' => 'ArcanistWorkflow',
     'ArcanistGitAPI' => 'ArcanistRepositoryAPI',
     'ArcanistGitHookPreReceiveWorkflow' => 'ArcanistWorkflow',
     'ArcanistGoLintLinter' => 'ArcanistExternalLinter',
-    'ArcanistGoLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistGoLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistHLintLinter' => 'ArcanistExternalLinter',
-    'ArcanistHLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistHLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistHelpWorkflow' => 'ArcanistWorkflow',
     'ArcanistHgClientChannel' => 'PhutilProtocolChannel',
     'ArcanistHgServerChannel' => 'PhutilProtocolChannel',
     'ArcanistInfrastructureTestCase' => 'ArcanistTestCase',
     'ArcanistInstallCertificateWorkflow' => 'ArcanistWorkflow',
     'ArcanistJSHintLinter' => 'ArcanistExternalLinter',
-    'ArcanistJSHintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistJSHintLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistJSONLintLinter' => 'ArcanistExternalLinter',
-    'ArcanistJSONLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistJSONLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistJSONLintRenderer' => 'ArcanistLintRenderer',
     'ArcanistJSONLinter' => 'ArcanistLinter',
     'ArcanistJSONLinterTestCase' => 'ArcanistArcanistLinterTestCase',
     'ArcanistJscsLinter' => 'ArcanistExternalLinter',
-    'ArcanistJscsLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistJscsLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistLandWorkflow' => 'ArcanistWorkflow',
     'ArcanistLesscLinter' => 'ArcanistExternalLinter',
-    'ArcanistLesscLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistLesscLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistLiberateWorkflow' => 'ArcanistWorkflow',
     'ArcanistLintWorkflow' => 'ArcanistWorkflow',
     'ArcanistLinterTestCase' => 'ArcanistPhutilTestCase',
@@ -307,16 +309,16 @@ phutil_register_library_map(array(
     'ArcanistNoEffectException' => 'ArcanistUsageException',
     'ArcanistNoEngineException' => 'ArcanistUsageException',
     'ArcanistNoLintLinter' => 'ArcanistLinter',
-    'ArcanistNoLintTestCaseMisnamed' => 'ArcanistLinterTestCase',
+    'ArcanistNoLintTestCaseMisnamed' => 'ArcanistPhutilTestCase',
     'ArcanistNoneLintRenderer' => 'ArcanistLintRenderer',
     'ArcanistPEP8Linter' => 'ArcanistExternalLinter',
-    'ArcanistPEP8LinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistPEP8LinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistPasteWorkflow' => 'ArcanistWorkflow',
     'ArcanistPatchWorkflow' => 'ArcanistWorkflow',
     'ArcanistPhpLinter' => 'ArcanistExternalLinter',
-    'ArcanistPhpLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistPhpLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistPhpcsLinter' => 'ArcanistExternalLinter',
-    'ArcanistPhpcsLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistPhpcsLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistPhrequentWorkflow' => 'ArcanistWorkflow',
     'ArcanistPhutilLibraryLinter' => 'ArcanistLinter',
     'ArcanistPhutilTestCaseTestCase' => 'ArcanistPhutilTestCase',
@@ -325,16 +327,16 @@ phutil_register_library_map(array(
     'ArcanistPhutilXHPASTLinter' => 'ArcanistBaseXHPASTLinter',
     'ArcanistPhutilXHPASTLinterTestCase' => 'ArcanistArcanistLinterTestCase',
     'ArcanistPuppetLintLinter' => 'ArcanistExternalLinter',
-    'ArcanistPuppetLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistPuppetLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistPyFlakesLinter' => 'ArcanistExternalLinter',
-    'ArcanistPyFlakesLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistPyFlakesLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistPyLintLinter' => 'ArcanistLinter',
-    'ArcanistPyLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistPyLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistRepositoryAPIMiscTestCase' => 'ArcanistTestCase',
     'ArcanistRepositoryAPIStateTestCase' => 'ArcanistTestCase',
     'ArcanistRevertWorkflow' => 'ArcanistWorkflow',
     'ArcanistRubyLinter' => 'ArcanistExternalLinter',
-    'ArcanistRubyLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+    'ArcanistRubyLinterTestCase' => 'ArcanistExternalLinterTestCase',
     'ArcanistScriptAndRegexLinter' => 'ArcanistLinter',
     'ArcanistSetConfigWorkflow' => 'ArcanistWorkflow',
     'ArcanistShellCompleteWorkflow' => 'ArcanistWorkflow',
index 0bae09d265935c7d1f2e67906eb482866b953f57..344a5c72c85b9582218660961e4a1a70c64f0811 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 final class ArcanistCSSLintLinterTestCase
-  extends ArcanistArcanistLinterTestCase {
+  extends ArcanistExternalLinterTestCase {
 
-  public function testCSSLintLinter() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/csslint/');
   }
 
index 6b9b72dc4f0dfda3f77516dd19820249c464f6b0..50c01ca5afb4d563308de2478d08e9f6e268f54b 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 final class ArcanistClosureLinterTestCase
-  extends ArcanistArcanistLinterTestCase {
+  extends ArcanistExternalLinterTestCase {
 
-  public function testClosureLinter() {
+  public function testLinter() {
     $linter = new ArcanistClosureLinter();
     $linter->setFlags(array('--additional_extensions=lint-test'));
 
index e359acd4a2ce026739d0cc044e4d4dabd18edde3..c70c82b323a362656cb467b3d10bb2b5f60de71a 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 final class ArcanistCoffeeLintLinterTestCase
-  extends ArcanistArcanistLinterTestCase {
+  extends ArcanistExternalLinterTestCase {
 
-  public function testCoffeeLintLinter() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/coffeelint/');
   }
 
index 6b612ec2b05b077d420bc91f678b6e17a6f83e72..fc139a3fe3bdb0f0b0bbbec133d01fb31514183d 100644 (file)
@@ -3,7 +3,7 @@
 final class ArcanistCommitLinterTestCase
   extends ArcanistArcanistLinterTestCase {
 
-  public function testCommitLint() {
+  public function testLinter() {
     return $this->executeTestsInDirectory(dirname(__FILE__).'/commit/');
   }
 
index c2c7471b8905778aeaf7cba871caa013ff15103d..75310761ccbe0f0abc0cf60b6771efed2041927e 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 final class ArcanistCppcheckLinterTestCase
-  extends ArcanistArcanistLinterTestCase {
+  extends ArcanistExternalLinterTestCase {
 
-  public function testCppcheckLint() {
+  public function testLinter() {
     return $this->executeTestsInDirectory(dirname(__FILE__).'/cppcheck/');
   }
 
index baecac9aa82acd3b669c088975e1eeaf2c31bdfd..f178bb9f4f181cdb4ffc05a344166c0f60a075e0 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 final class ArcanistCpplintLinterTestCase
-  extends ArcanistArcanistLinterTestCase {
+  extends ArcanistExternalLinterTestCase {
 
-  public function testCpplintLint() {
+  public function testLinter() {
     return $this->executeTestsInDirectory(dirname(__FILE__).'/cpplint/');
   }
 
diff --git a/src/lint/linter/__tests__/ArcanistExternalLinterTestCase.php b/src/lint/linter/__tests__/ArcanistExternalLinterTestCase.php
new file mode 100644 (file)
index 0000000..7036cf8
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+
+abstract class ArcanistExternalLinterTestCase extends ArcanistLinterTestCase {
+
+  public final function testVersion() {
+    try {
+      $version = $this->getLinter()->getVersion();
+      $this->assertTrue(
+        $version !== false,
+        pht('Failed to parse version from command.'));
+    } catch (ArcanistUsageException $ex) {
+      $this->assertSkipped($ex->getMessage());
+    }
+  }
+
+}
index 39cabfafe4931b0a730b9fc1519e260a22419120..a0c56e917fa31cd4d462aa0855000275cebb9a19 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 final class ArcanistFlake8LinterTestCase
-  extends ArcanistArcanistLinterTestCase {
+  extends ArcanistExternalLinterTestCase {
 
-  public function testFlake8Lint() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/flake8/');
   }
 
index f906cea96bafb2e0be17822a71ec8e68fabaf8e3..883643257635534dba126ddda9ede6315e4e6dcc 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 final class ArcanistGoLintLinterTestCase
-  extends ArcanistArcanistLinterTestCase {
+  extends ArcanistExternalLinterTestCase {
 
-  public function testGoLintLinter() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/golint/');
   }
 
index 9a8fcf948912e7d6e11797d28329b1c2c6b11e98..39d0e834decfe1d75d8976736982ff0f1906a63e 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-final class ArcanistHLintLinterTestCase extends ArcanistArcanistLinterTestCase {
+final class ArcanistHLintLinterTestCase extends ArcanistExternalLinterTestCase {
 
-  public function testHlintLinter() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/hlint/');
   }
 
index b6c74e03ef5c4b983b18d10b78dd60abe9f008c7..46adb9dad0d354c0a2f13e416f8b00f389b6f00f 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 final class ArcanistJSHintLinterTestCase
-  extends ArcanistArcanistLinterTestCase {
+  extends ArcanistExternalLinterTestCase {
 
-  public function testJSHintLinter() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/jshint/');
   }
 
index 143701519976845e64a99550643e23207ceaf4a9..a81935e5622e90453214fbb0ad1dd198aad006de 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 final class ArcanistJSONLintLinterTestCase
-  extends ArcanistArcanistLinterTestCase {
+  extends ArcanistExternalLinterTestCase {
 
-  public function testJSONLintLinter() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/jsonlint/');
   }
 
index 6cfe206f49b0d5f090e89f667ed9b3446227caf7..4d7eb53b5a160a9fb8565d7d0c4db0294447e7ec 100644 (file)
@@ -2,7 +2,7 @@
 
 final class ArcanistJSONLinterTestCase extends ArcanistArcanistLinterTestCase {
 
-  public function testJSONLinter() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/jsonlint/');
   }
 
index 78764cac4d88b50a0c317be1b9119ec19f783149..dcf47652e200f859d95efa161bb49125f96c88cf 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-final class ArcanistJscsLinterTestCase extends ArcanistArcanistLinterTestCase {
+final class ArcanistJscsLinterTestCase extends ArcanistExternalLinterTestCase {
 
-  public function testJscsLinter() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/jscs/');
   }
 
index cca0a4f921412d3fe071cf2c802843b1234aa78a..62edbe60b59f2c3eebdefc28baa80fee9cd5d6c6 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-final class ArcanistLesscLinterTestCase extends ArcanistArcanistLinterTestCase {
+final class ArcanistLesscLinterTestCase extends ArcanistExternalLinterTestCase {
 
-  public function testLesscLinter() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/lessc/');
   }
 
index 3fa9464366ff033abfc026f6f4aba6f1e198ea26..6062f98562de61b558de0d7c8038ac0af3e6f657 100644 (file)
@@ -5,6 +5,30 @@
  */
 abstract class ArcanistLinterTestCase extends ArcanistPhutilTestCase {
 
+  /**
+   * Returns an instance of the linter being tested.
+   *
+   * @return ArcanistLinter
+   */
+  protected final function getLinter() {
+    $matches = array();
+
+    if (!preg_match('/^(\w+Linter)TestCase$/', get_class($this), $matches)) {
+      throw new Exception(pht('Unable to infer linter class name.'));
+    }
+
+    $linter = id(new ReflectionClass($matches[1]))
+      ->newInstanceWithoutConstructor();
+
+    if (!$linter instanceof ArcanistLinter) {
+      throw new Exception(pht('Unable to infer linter class name.'));
+    }
+
+    return $linter;
+  }
+
+  public abstract function testLinter();
+
   /**
    * Executes all tests from the specified subdirectory. If a linter is not
    * explicitly specified, it will be inferred from the name of the test class.
@@ -14,22 +38,7 @@ abstract class ArcanistLinterTestCase extends ArcanistPhutilTestCase {
     ArcanistLinter $linter = null) {
 
     if (!$linter) {
-      // Infer the linter from the class name. This is a little magical, but
-      // reduces the amount of boiler plate code.
-      $count = 0;
-      $linter_name = preg_replace(
-        '/^(\w+Linter)TestCase$/',
-        '$1',
-        get_class($this),
-        1,
-        $count);
-
-      if (!$count) {
-        throw new Exception(pht('Unable to infer linter class name.'));
-      }
-
-      $linter = id(new ReflectionClass($linter_name))
-        ->newInstanceWithoutConstructor();
+      $linter = $this->getLinter();
     }
 
     $files = id(new FileFinder($root))
index 9c54379d71500047137d0bceb0d1c2b551369f51..279ce78ea6fedcd6a5f436f07660e0449c523f99 100644 (file)
@@ -3,7 +3,7 @@
 final class ArcanistMergeConflictLinterTestCase
   extends ArcanistArcanistLinterTestCase {
 
-  public function testMergeConflictLint() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/mergeconflict/');
   }
 
index f7480b07af676c9e9e7797f0d93bd73ceefd6fd1..6fce0afb1f0e63ec8e59a09331439f090a9ada26 100644 (file)
@@ -3,4 +3,4 @@
 /**
  * Not a real test... meant to fail lint if @nolint is not respected.
  */
-final class ArcanistNoLintTestCaseMisnamed extends ArcanistLinterTestCase {}
+final class ArcanistNoLintTestCaseMisnamed extends ArcanistPhutilTestCase {}
index 41843d60d3dd6921fa514f991e676541101f57d4..9fcd5c4daac5d30b33421176129d45f42bc6eba6 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-final class ArcanistPEP8LinterTestCase extends ArcanistArcanistLinterTestCase {
+final class ArcanistPEP8LinterTestCase extends ArcanistExternalLinterTestCase {
 
-  public function testPEP8Linter() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/pep8/');
   }
 
index b4bf952c32e58f9180689b96380084dbc3582174..f5e1fc5f98939ef10c350ad1be3f15360f7ba326 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-final class ArcanistPhpLinterTestCase extends ArcanistArcanistLinterTestCase {
+final class ArcanistPhpLinterTestCase extends ArcanistExternalLinterTestCase {
 
-  public function testPHPLint() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/php/');
   }
 
index bff0ca07dab5bf95ce3c38434e1950aa0a032d45..fe8670a45957ffa542c3c25e8c06b8657cfdef96 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-final class ArcanistPhpcsLinterTestCase extends ArcanistArcanistLinterTestCase {
+final class ArcanistPhpcsLinterTestCase extends ArcanistExternalLinterTestCase {
 
-  public function testPHPCSLint() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/phpcs/');
   }
 
index 01a7258d62f798ca2ab0c001249b674afb24d8b9..1133e15180fb6541acc59d91a1aa8743051305a4 100644 (file)
@@ -3,7 +3,7 @@
 final class ArcanistPhutilXHPASTLinterTestCase
   extends ArcanistArcanistLinterTestCase {
 
-  public function testPhutilXHPASTLint() {
+  public function testLinter() {
     $linter = new ArcanistPhutilXHPASTLinter();
     $linter->setDeprecatedFunctions(array(
       'deprecated_function' => 'This function is most likely deprecated.',
index 19eb39cd93e3ae886bdb80f3fd3f48354fae8fe1..f16aac6342dd9b137927ad11995573dc6a020636 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 final class ArcanistPuppetLintLinterTestCase
-  extends ArcanistArcanistLinterTestCase {
+  extends ArcanistExternalLinterTestCase {
 
-  public function testPuppetLintLinter() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/puppet-lint/');
   }
 
index 31d3c76119126558b648b500f8048be69f90eac3..c4169e7e375809cbd779b4426377c2a3a2b40dee 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 final class ArcanistPyFlakesLinterTestCase
-  extends ArcanistArcanistLinterTestCase {
+  extends ArcanistExternalLinterTestCase {
 
-  public function testPyflakesLinter() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/pyflakes/');
   }
 
index d1686c989e40a5e0156de42e9f1d8921506dab87..4d93f648b5fb5b68e847ffbccdab4146bf92ae36 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 final class ArcanistPyLintLinterTestCase
-  extends ArcanistArcanistLinterTestCase {
+  extends ArcanistExternalLinterTestCase {
 
-  public function testPyLintLinter() {
+  public function testLinter() {
     return $this->executeTestsInDirectory(dirname(__FILE__).'/pylint/');
   }
 
index 944d4891c6bb8b5fe5a33b26d45930fbe9d78665..c45805c525d576598a2e5be0e9f4d77766cb0ed5 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-final class ArcanistRubyLinterTestCase extends ArcanistArcanistLinterTestCase {
+final class ArcanistRubyLinterTestCase extends ArcanistExternalLinterTestCase {
 
-  public function testRubyLint() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/ruby/');
   }
 
index 36ef7a8ee3123bc1427e767d2d7d4cc73568b076..e649bcf0cd1d95dfbe8fcecf715933df05ca77e8 100644 (file)
@@ -3,7 +3,7 @@
 final class ArcanistSpellingLinterTestCase
   extends ArcanistArcanistLinterTestCase {
 
-  public function testSpellingLint() {
+  public function testLinter() {
     $linter = new ArcanistSpellingLinter();
     $linter->addPartialWordRule('supermn', 'superman');
     $linter->addExactWordRule('batmn', 'batman');
index e2aba519a7051f02918de5e181096a2c9b944c17..cfecf8a6089d045e5c987f4b04d43539dd42d487 100644 (file)
@@ -2,7 +2,7 @@
 
 final class ArcanistTextLinterTestCase extends ArcanistArcanistLinterTestCase {
 
-  public function testTextLint() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/text/');
   }
 
index 557ce0b545810c29263a0ff4eee23eaccc264933..498083b68341f8007f3eb188704d2c45ba182d6b 100644 (file)
@@ -3,7 +3,7 @@
 final class ArcanistXHPASTLinterTestCase
   extends ArcanistArcanistLinterTestCase {
 
-  public function testXHPASTLint() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/xhpast/');
   }
 
index 7dc12d0ac2b22061427524e23ea6dfe7ba1861e3..7b05c657a9e4d9cd85aaacafcab3e514c91c9339 100644 (file)
@@ -6,7 +6,7 @@
  */
 final class ArcanistXMLLinterTestCase extends ArcanistArcanistLinterTestCase {
 
-  public function testXMLLint() {
+  public function testLinter() {
     $this->executeTestsInDirectory(dirname(__FILE__).'/xml/');
   }