mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Linter fixes
Summary: Apply various minor linter fixes. Test Plan: `arc lint` Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: aurelijus, Korvin, epriestley Differential Revision: https://secure.phabricator.com/D13106
This commit is contained in:
parent
4e83efb31d
commit
4754a3e156
4 changed files with 6 additions and 6 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
abstract class ArcanistExternalLinterTestCase extends ArcanistLinterTestCase {
|
abstract class ArcanistExternalLinterTestCase extends ArcanistLinterTestCase {
|
||||||
|
|
||||||
public final function testVersion() {
|
final public function testVersion() {
|
||||||
try {
|
try {
|
||||||
$version = $this->getLinter()->getVersion();
|
$version = $this->getLinter()->getVersion();
|
||||||
$this->assertTrue(
|
$this->assertTrue(
|
||||||
|
|
|
@ -10,7 +10,7 @@ abstract class ArcanistLinterTestCase extends PhutilTestCase {
|
||||||
*
|
*
|
||||||
* @return ArcanistLinter
|
* @return ArcanistLinter
|
||||||
*/
|
*/
|
||||||
protected final function getLinter() {
|
final protected function getLinter() {
|
||||||
$matches = null;
|
$matches = null;
|
||||||
if (!preg_match('/^(\w+Linter)TestCase$/', get_class($this), $matches) ||
|
if (!preg_match('/^(\w+Linter)TestCase$/', get_class($this), $matches) ||
|
||||||
!is_subclass_of($matches[1], 'ArcanistLinter')) {
|
!is_subclass_of($matches[1], 'ArcanistLinter')) {
|
||||||
|
@ -20,7 +20,7 @@ abstract class ArcanistLinterTestCase extends PhutilTestCase {
|
||||||
return newv($matches[1], array());
|
return newv($matches[1], array());
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract function testLinter();
|
abstract public function testLinter();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes all tests from the specified subdirectory. If a linter is not
|
* Executes all tests from the specified subdirectory. If a linter is not
|
||||||
|
|
|
@ -668,7 +668,7 @@ abstract class PhutilTestCase {
|
||||||
*
|
*
|
||||||
* @return map
|
* @return map
|
||||||
*/
|
*/
|
||||||
private static final function getCallerInfo() {
|
final private static function getCallerInfo() {
|
||||||
$callee = array();
|
$callee = array();
|
||||||
$caller = array();
|
$caller = array();
|
||||||
$seen = false;
|
$seen = false;
|
||||||
|
|
|
@ -138,9 +138,9 @@ final class ArcanistPhpunitTestResultParser extends ArcanistTestResultParser {
|
||||||
if ($line->getAttribute('type') != 'stmt') {
|
if ($line->getAttribute('type') != 'stmt') {
|
||||||
$coverage .= 'N';
|
$coverage .= 'N';
|
||||||
} else {
|
} else {
|
||||||
if ((int) $line->getAttribute('count') == 0) {
|
if ((int)$line->getAttribute('count') == 0) {
|
||||||
$coverage .= 'U';
|
$coverage .= 'U';
|
||||||
} else if ((int) $line->getAttribute('count') > 0) {
|
} else if ((int)$line->getAttribute('count') > 0) {
|
||||||
$coverage .= 'C';
|
$coverage .= 'C';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue