From: Joshua Spence Date: Thu, 9 Jan 2014 00:23:58 +0000 (-0800) Subject: Allow `ArcanistLinterTestCase` to find "lint-test" files at an arbitrary depth X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=e2234a5be96a5512929df8f45c43e1706864ac8c;p=arcanist.git Allow `ArcanistLinterTestCase` to find "lint-test" files at an arbitrary depth 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 --- diff --git a/src/lint/linter/__tests__/ArcanistLinterTestCase.php b/src/lint/linter/__tests__/ArcanistLinterTestCase.php index 3c500b3a..2d273eb0 100644 --- a/src/lint/linter/__tests__/ArcanistLinterTestCase.php +++ b/src/lint/linter/__tests__/ArcanistLinterTestCase.php @@ -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); } }