Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14447658
D9096.id21607.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D9096.id21607.diff
View Options
diff --git a/src/lint/linter/__tests__/ArcanistArcanistLinterTestCase.php b/src/lint/linter/__tests__/ArcanistArcanistLinterTestCase.php
--- a/src/lint/linter/__tests__/ArcanistArcanistLinterTestCase.php
+++ b/src/lint/linter/__tests__/ArcanistArcanistLinterTestCase.php
@@ -1,8 +1,5 @@
<?php
-/**
- * @group testcase
- */
abstract class ArcanistArcanistLinterTestCase extends ArcanistLinterTestCase {
protected function getLink($method) {
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,15 +1,11 @@
<?php
-/**
- * Test cases for @{class:ArcanistCpplintLinter}.
- *
- * @group testcase
- */
+
final class ArcanistCpplintLinterTestCase
extends ArcanistArcanistLinterTestCase {
public function testCpplintLint() {
return $this->executeTestsInDirectory(
- dirname(__FILE__).'/cpp/',
+ dirname(__FILE__).'/cpplint/',
new ArcanistCpplintLinter());
}
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,14 +1,10 @@
<?php
-/**
- * Test cases for @{class:ArcanistFlake8Linter}.
- *
- * @group testcase
- */
+
final class ArcanistFlake8LinterTestCase
extends ArcanistArcanistLinterTestCase {
public function testFlake8Lint() {
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/flake8/',
new ArcanistFlake8Linter());
}
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
@@ -2,8 +2,6 @@
/**
* Facilitates implementation of test cases for @{class:ArcanistLinter}s.
- *
- * @group testcase
*/
abstract class ArcanistLinterTestCase extends ArcanistPhutilTestCase {
@@ -154,7 +152,7 @@
$char = $message->getChar();
$code = $message->getCode();
$name = $message->getName();
- $message_key = $sev.":".$line.":".$char;
+ $message_key = $sev.':'.$line.':'.$char;
$message_map[$message_key] = $message;
$seen[] = $message_key;
$raised[] = " {$sev} at line {$line}, char {$char}: {$code} {$name}";
@@ -173,7 +171,7 @@
$seen = array_fill_keys($seen, true);
if (!$raised) {
- $raised = array("No messages.");
+ $raised = array('No messages.');
}
$raised = "Actually raised:\n".implode("\n", $raised);
@@ -186,7 +184,6 @@
}
foreach (array_diff_key($seen, $expect) as $surprising => $ignored) {
-
$message = $message_map[$surprising];
$message_info = $message->getDescription();
@@ -205,6 +202,6 @@
$this->assertEqual(
$expected,
$actual,
- "File as patched by lint did not match the expected patched file.");
+ 'File as patched by lint did not match the expected patched file.');
}
}
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
@@ -1,13 +1,6 @@
<?php
/**
- * Test for @{class:ArcanistNoLintLinter}.
- *
- * Not a real test... meant to fail lint
- * if @nolint is not respected.
- *
- * @group testcase
+ * Not a real test... meant to fail lint if @nolint is not respected.
*/
-final class ArcanistNoLintTestCaseMisnamed extends ArcanistLinterTestCase {
-
-}
+final class ArcanistNoLintTestCaseMisnamed extends ArcanistLinterTestCase {}
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
@@ -3,7 +3,7 @@
final class ArcanistPHPCSLinterTestCase extends ArcanistArcanistLinterTestCase {
public function testPHPCSLint() {
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/phpcs/',
new ArcanistPhpcsLinter());
}
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
@@ -1,8 +1,5 @@
<?php
-/**
- * @group testcase
- */
final class ArcanistPhutilXHPASTLinterTestCase
extends ArcanistArcanistLinterTestCase {
@@ -12,7 +9,7 @@
'deprecated_function' => 'This function is most likely deprecated.',
));
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/phlxhp/',
$linter);
}
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
@@ -4,7 +4,7 @@
extends ArcanistArcanistLinterTestCase {
public function testPuppetLintLinter() {
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/puppet-lint/',
new ArcanistPuppetLintLinter());
}
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
@@ -4,7 +4,7 @@
extends ArcanistArcanistLinterTestCase {
public function testPyflakesLinter() {
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/pyflakes/',
new ArcanistPyFlakesLinter());
}
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,14 +1,9 @@
<?php
-/**
- * Test cases for @{class:ArcanistRubyLinter}.
- *
- * @group testcase
- */
final class ArcanistRubyLinterTestCase extends ArcanistArcanistLinterTestCase {
public function testRubyLint() {
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/ruby/',
new ArcanistRubyLinter());
}
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
@@ -1,10 +1,5 @@
<?php
-/**
- * Test cases for @{class:ArcanistSpellingLinter}.
- *
- * @group testcase
- */
final class ArcanistSpellingLinterTestCase
extends ArcanistArcanistLinterTestCase {
@@ -13,7 +8,7 @@
$linter->addPartialWordRule('supermn', 'superman');
$linter->addWholeWordRule('batmn', 'batman');
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/spelling/',
$linter);
}
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
@@ -1,14 +1,9 @@
<?php
-/**
- * Test cases for @{class:ArcanistTextLinter}.
- *
- * @group testcase
- */
final class ArcanistTextLinterTestCase extends ArcanistArcanistLinterTestCase {
public function testTextLint() {
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/text/',
new ArcanistTextLinter());
}
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
@@ -1,10 +1,5 @@
<?php
-/**
- * Tests for @{class:ArcanistXHPASTLinter}.
- *
- * @group testcase
- */
final class ArcanistXHPASTLinterTestCase
extends ArcanistArcanistLinterTestCase {
@@ -17,7 +12,7 @@
=> ArcanistLintSeverity::SEVERITY_WARNING,
));
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/xhpast/',
$linter);
}
diff --git a/src/lint/linter/__tests__/cpp/googlestyle.lint-test b/src/lint/linter/__tests__/cpplint/googlestyle.lint-test
rename from src/lint/linter/__tests__/cpp/googlestyle.lint-test
rename to src/lint/linter/__tests__/cpplint/googlestyle.lint-test
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 27, 2:09 PM (9 h, 8 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6932048
Default Alt Text
D9096.id21607.diff (8 KB)
Attached To
Mode
D9096: Minor cleanup of linter testing code.
Attached
Detach File
Event Timeline
Log In to Comment