]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Allow `ArcanistLinterTestCase` to find "lint-test" files at an arbitrary depth
authorJoshua Spence <josh@joshuaspence.com>
Thu, 9 Jan 2014 00:23:58 +0000 (16:23 -0800)
committerepriestley <git@epriestley.com>
Thu, 9 Jan 2014 00:23:58 +0000 (16:23 -0800)
Summary: Self-explanatory

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran
Differential Revision: https://secure.phabricator.com/D7910

src/lint/linter/__tests__/ArcanistLinterTestCase.php

index 3c500b3a573a32386a6373451e24d2732ef05dae..2d273eb02a73f534b3d662c203a1496885d71069 100644 (file)
@@ -8,7 +8,12 @@
 abstract class ArcanistLinterTestCase extends ArcanistPhutilTestCase {
 
   public function executeTestsInDirectory($root, ArcanistLinter $linter) {
-    foreach (Filesystem::listDirectory($root, $hidden = false) as $file) {
+    $files = id(new FileFinder($root))
+      ->withType('f')
+      ->withSuffix('lint-test')
+      ->find();
+
+    foreach ($files as $file) {
       $this->lintFile($root.$file, $linter);
     }
   }