From e2234a5be96a5512929df8f45c43e1706864ac8c Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Wed, 8 Jan 2014 16:23:58 -0800 Subject: [PATCH] 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 --- src/lint/linter/__tests__/ArcanistLinterTestCase.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } }