Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15440265
D11197.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
25 KB
Referenced Files
None
Subscribers
None
D11197.diff
View Options
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -71,6 +71,7 @@
'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 @@
'ArcanistBrowseWorkflow' => 'ArcanistWorkflow',
'ArcanistBundleTestCase' => 'ArcanistTestCase',
'ArcanistCSSLintLinter' => 'ArcanistExternalLinter',
- 'ArcanistCSSLintLinterTestCase' => 'ArcanistArcanistLinterTestCase',
+ 'ArcanistCSSLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
'ArcanistCSharpLinter' => 'ArcanistLinter',
'ArcanistCallConduitWorkflow' => 'ArcanistWorkflow',
'ArcanistCapabilityNotSupportedException' => 'Exception',
@@ -239,9 +240,9 @@
'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 @@
'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 @@
'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 @@
'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 @@
'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',
diff --git a/src/lint/linter/__tests__/ArcanistCSSLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistCSSLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistCSSLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistCSSLintLinterTestCase.php
@@ -1,9 +1,9 @@
<?php
final class ArcanistCSSLintLinterTestCase
- extends ArcanistArcanistLinterTestCase {
+ extends ArcanistExternalLinterTestCase {
- public function testCSSLintLinter() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/csslint/');
}
diff --git a/src/lint/linter/__tests__/ArcanistClosureLinterTestCase.php b/src/lint/linter/__tests__/ArcanistClosureLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistClosureLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistClosureLinterTestCase.php
@@ -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'));
diff --git a/src/lint/linter/__tests__/ArcanistCoffeeLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistCoffeeLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistCoffeeLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistCoffeeLintLinterTestCase.php
@@ -1,9 +1,9 @@
<?php
final class ArcanistCoffeeLintLinterTestCase
- extends ArcanistArcanistLinterTestCase {
+ extends ArcanistExternalLinterTestCase {
- public function testCoffeeLintLinter() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/coffeelint/');
}
diff --git a/src/lint/linter/__tests__/ArcanistCommitLinterTestCase.php b/src/lint/linter/__tests__/ArcanistCommitLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistCommitLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistCommitLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistCommitLinterTestCase
extends ArcanistArcanistLinterTestCase {
- public function testCommitLint() {
+ public function testLinter() {
return $this->executeTestsInDirectory(dirname(__FILE__).'/commit/');
}
diff --git a/src/lint/linter/__tests__/ArcanistCppcheckLinterTestCase.php b/src/lint/linter/__tests__/ArcanistCppcheckLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistCppcheckLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistCppcheckLinterTestCase.php
@@ -1,9 +1,9 @@
<?php
final class ArcanistCppcheckLinterTestCase
- extends ArcanistArcanistLinterTestCase {
+ extends ArcanistExternalLinterTestCase {
- public function testCppcheckLint() {
+ public function testLinter() {
return $this->executeTestsInDirectory(dirname(__FILE__).'/cppcheck/');
}
diff --git a/src/lint/linter/__tests__/ArcanistCpplintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistCpplintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistCpplintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistCpplintLinterTestCase.php
@@ -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
--- /dev/null
+++ b/src/lint/linter/__tests__/ArcanistExternalLinterTestCase.php
@@ -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());
+ }
+ }
+
+}
diff --git a/src/lint/linter/__tests__/ArcanistFlake8LinterTestCase.php b/src/lint/linter/__tests__/ArcanistFlake8LinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistFlake8LinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistFlake8LinterTestCase.php
@@ -1,9 +1,9 @@
<?php
final class ArcanistFlake8LinterTestCase
- extends ArcanistArcanistLinterTestCase {
+ extends ArcanistExternalLinterTestCase {
- public function testFlake8Lint() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/flake8/');
}
diff --git a/src/lint/linter/__tests__/ArcanistGoLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistGoLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistGoLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistGoLintLinterTestCase.php
@@ -1,9 +1,9 @@
<?php
final class ArcanistGoLintLinterTestCase
- extends ArcanistArcanistLinterTestCase {
+ extends ArcanistExternalLinterTestCase {
- public function testGoLintLinter() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/golint/');
}
diff --git a/src/lint/linter/__tests__/ArcanistHLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistHLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistHLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistHLintLinterTestCase.php
@@ -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/');
}
diff --git a/src/lint/linter/__tests__/ArcanistJSHintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistJSHintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistJSHintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistJSHintLinterTestCase.php
@@ -1,9 +1,9 @@
<?php
final class ArcanistJSHintLinterTestCase
- extends ArcanistArcanistLinterTestCase {
+ extends ArcanistExternalLinterTestCase {
- public function testJSHintLinter() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/jshint/');
}
diff --git a/src/lint/linter/__tests__/ArcanistJSONLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistJSONLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistJSONLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistJSONLintLinterTestCase.php
@@ -1,9 +1,9 @@
<?php
final class ArcanistJSONLintLinterTestCase
- extends ArcanistArcanistLinterTestCase {
+ extends ArcanistExternalLinterTestCase {
- public function testJSONLintLinter() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/jsonlint/');
}
diff --git a/src/lint/linter/__tests__/ArcanistJSONLinterTestCase.php b/src/lint/linter/__tests__/ArcanistJSONLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistJSONLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistJSONLinterTestCase.php
@@ -2,7 +2,7 @@
final class ArcanistJSONLinterTestCase extends ArcanistArcanistLinterTestCase {
- public function testJSONLinter() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/jsonlint/');
}
diff --git a/src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php b/src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistJscsLinterTestCase.php
@@ -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/');
}
diff --git a/src/lint/linter/__tests__/ArcanistLesscLinterTestCase.php b/src/lint/linter/__tests__/ArcanistLesscLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistLesscLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistLesscLinterTestCase.php
@@ -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/');
}
diff --git a/src/lint/linter/__tests__/ArcanistLinterTestCase.php b/src/lint/linter/__tests__/ArcanistLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistLinterTestCase.php
@@ -6,6 +6,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 @@
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))
diff --git a/src/lint/linter/__tests__/ArcanistMergeConflictLinterTestCase.php b/src/lint/linter/__tests__/ArcanistMergeConflictLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistMergeConflictLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistMergeConflictLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistMergeConflictLinterTestCase
extends ArcanistArcanistLinterTestCase {
- public function testMergeConflictLint() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/mergeconflict/');
}
diff --git a/src/lint/linter/__tests__/ArcanistNoLintTestCase.php b/src/lint/linter/__tests__/ArcanistNoLintTestCase.php
--- a/src/lint/linter/__tests__/ArcanistNoLintTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistNoLintTestCase.php
@@ -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 {}
diff --git a/src/lint/linter/__tests__/ArcanistPEP8LinterTestCase.php b/src/lint/linter/__tests__/ArcanistPEP8LinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPEP8LinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPEP8LinterTestCase.php
@@ -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/');
}
diff --git a/src/lint/linter/__tests__/ArcanistPhpLinterTestCase.php b/src/lint/linter/__tests__/ArcanistPhpLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPhpLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPhpLinterTestCase.php
@@ -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/');
}
diff --git a/src/lint/linter/__tests__/ArcanistPhpcsLinterTestCase.php b/src/lint/linter/__tests__/ArcanistPhpcsLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPhpcsLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPhpcsLinterTestCase.php
@@ -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/');
}
diff --git a/src/lint/linter/__tests__/ArcanistPhutilXHPASTLinterTestCase.php b/src/lint/linter/__tests__/ArcanistPhutilXHPASTLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPhutilXHPASTLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPhutilXHPASTLinterTestCase.php
@@ -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.',
diff --git a/src/lint/linter/__tests__/ArcanistPuppetLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistPuppetLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPuppetLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPuppetLintLinterTestCase.php
@@ -1,9 +1,9 @@
<?php
final class ArcanistPuppetLintLinterTestCase
- extends ArcanistArcanistLinterTestCase {
+ extends ArcanistExternalLinterTestCase {
- public function testPuppetLintLinter() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/puppet-lint/');
}
diff --git a/src/lint/linter/__tests__/ArcanistPyFlakesLinterTestCase.php b/src/lint/linter/__tests__/ArcanistPyFlakesLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPyFlakesLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPyFlakesLinterTestCase.php
@@ -1,9 +1,9 @@
<?php
final class ArcanistPyFlakesLinterTestCase
- extends ArcanistArcanistLinterTestCase {
+ extends ArcanistExternalLinterTestCase {
- public function testPyflakesLinter() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/pyflakes/');
}
diff --git a/src/lint/linter/__tests__/ArcanistPyLintLinterTestCase.php b/src/lint/linter/__tests__/ArcanistPyLintLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistPyLintLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistPyLintLinterTestCase.php
@@ -1,9 +1,9 @@
<?php
final class ArcanistPyLintLinterTestCase
- extends ArcanistArcanistLinterTestCase {
+ extends ArcanistExternalLinterTestCase {
- public function testPyLintLinter() {
+ public function testLinter() {
return $this->executeTestsInDirectory(dirname(__FILE__).'/pylint/');
}
diff --git a/src/lint/linter/__tests__/ArcanistRubyLinterTestCase.php b/src/lint/linter/__tests__/ArcanistRubyLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistRubyLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistRubyLinterTestCase.php
@@ -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/');
}
diff --git a/src/lint/linter/__tests__/ArcanistSpellingLinterTestCase.php b/src/lint/linter/__tests__/ArcanistSpellingLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistSpellingLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistSpellingLinterTestCase.php
@@ -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');
diff --git a/src/lint/linter/__tests__/ArcanistTextLinterTestCase.php b/src/lint/linter/__tests__/ArcanistTextLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistTextLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistTextLinterTestCase.php
@@ -2,7 +2,7 @@
final class ArcanistTextLinterTestCase extends ArcanistArcanistLinterTestCase {
- public function testTextLint() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/text/');
}
diff --git a/src/lint/linter/__tests__/ArcanistXHPASTLinterTestCase.php b/src/lint/linter/__tests__/ArcanistXHPASTLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistXHPASTLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistXHPASTLinterTestCase.php
@@ -3,7 +3,7 @@
final class ArcanistXHPASTLinterTestCase
extends ArcanistArcanistLinterTestCase {
- public function testXHPASTLint() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/xhpast/');
}
diff --git a/src/lint/linter/__tests__/ArcanistXMLLinterTestCase.php b/src/lint/linter/__tests__/ArcanistXMLLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistXMLLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistXMLLinterTestCase.php
@@ -6,7 +6,7 @@
*/
final class ArcanistXMLLinterTestCase extends ArcanistArcanistLinterTestCase {
- public function testXMLLint() {
+ public function testLinter() {
$this->executeTestsInDirectory(dirname(__FILE__).'/xml/');
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 27, 11:44 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7651759
Default Alt Text
D11197.diff (25 KB)
Attached To
Mode
D11197: Create an `ArcanistExternalLinterTestCase` class
Attached
Detach File
Event Timeline
Log In to Comment