Differential D17783 Diff 42759 src/lint/linter/standards/__tests__/ArcanistLinterStandardTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/standards/__tests__/ArcanistLinterStandardTestCase.php
<?php | <?php | ||||
final class ArcanistLinterStandardTestCase extends PhutilTestCase { | abstract class ArcanistLinterStandardTestCase | ||||
extends ArcanistExternalLinterTestCase { | |||||
joshuaspence: You should extend `ArcanistLinterTestCase` instead | |||||
public function testLoadAllStandards() { | abstract protected function getTestLinter(); | ||||
joshuaspenceUnsubmitted Done Inline ActionsMaybe call this getBaseLinter? joshuaspence: Maybe call this `getBaseLinter`? | |||||
ArcanistLinterStandard::loadAllStandards(); | |||||
$this->assertTrue(true); | abstract protected function getTestStandard(); | ||||
joshuaspenceUnsubmitted Done Inline ActionsI think this should be called getStandard joshuaspence: I think this should be called `getStandard` | |||||
protected function getLinter() { | |||||
$linter = $this->getTestLinter(); | |||||
$standard = $this->getTestStandard(); | |||||
foreach ($standard->getLinterConfiguration() as $key => $value) { | |||||
$linter->setLinterConfigurationValue($key, $value); | |||||
} | |||||
$linter->addCustomSeverityMap($standard->getLinterSeverityMap()); | |||||
joshuaspenceUnsubmitted Done Inline ActionsIdeally, we should have some sort of $linter->applyStandard($standard) method... because this code is currently duplicated from ArcanistLinter joshuaspence: Ideally, we should have some sort of `$linter->applyStandard($standard)` method... because this… | |||||
return $linter; | |||||
} | } | ||||
joshuaspenceUnsubmitted Done Inline ActionsYou might want to leave this. joshuaspence: You //might// want to leave this. | |||||
} | } |
You should extend ArcanistLinterTestCase instead