<?php
-/**
- * @group testcase
- */
abstract class ArcanistArcanistLinterTestCase extends ArcanistLinterTestCase {
protected function getLink($method) {
<?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());
}
<?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());
}
/**
* Facilitates implementation of test cases for @{class:ArcanistLinter}s.
- *
- * @group testcase
*/
abstract class ArcanistLinterTestCase extends ArcanistPhutilTestCase {
$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}";
$seen = array_fill_keys($seen, true);
if (!$raised) {
- $raised = array("No messages.");
+ $raised = array('No messages.');
}
$raised = "Actually raised:\n".implode("\n", $raised);
}
foreach (array_diff_key($seen, $expect) as $surprising => $ignored) {
-
$message = $message_map[$surprising];
$message_info = $message->getDescription();
$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.');
}
}
<?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 {}
final class ArcanistPHPCSLinterTestCase extends ArcanistArcanistLinterTestCase {
public function testPHPCSLint() {
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/phpcs/',
new ArcanistPhpcsLinter());
}
<?php
-/**
- * @group testcase
- */
final class ArcanistPhutilXHPASTLinterTestCase
extends ArcanistArcanistLinterTestCase {
'deprecated_function' => 'This function is most likely deprecated.',
));
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/phlxhp/',
$linter);
}
extends ArcanistArcanistLinterTestCase {
public function testPuppetLintLinter() {
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/puppet-lint/',
new ArcanistPuppetLintLinter());
}
extends ArcanistArcanistLinterTestCase {
public function testPyflakesLinter() {
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/pyflakes/',
new ArcanistPyFlakesLinter());
}
<?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());
}
<?php
-/**
- * Test cases for @{class:ArcanistSpellingLinter}.
- *
- * @group testcase
- */
final class ArcanistSpellingLinterTestCase
extends ArcanistArcanistLinterTestCase {
$linter->addPartialWordRule('supermn', 'superman');
$linter->addWholeWordRule('batmn', 'batman');
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/spelling/',
$linter);
}
<?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());
}
<?php
-/**
- * Tests for @{class:ArcanistXHPASTLinter}.
- *
- * @group testcase
- */
final class ArcanistXHPASTLinterTestCase
extends ArcanistArcanistLinterTestCase {
=> ArcanistLintSeverity::SEVERITY_WARNING,
));
- return $this->executeTestsInDirectory(
+ $this->executeTestsInDirectory(
dirname(__FILE__).'/xhpast/',
$linter);
}