From 4fd6c99a93318838e2ca1a9cab5c5c61747e4bc1 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Mon, 23 Jun 2014 10:30:57 +1000 Subject: [PATCH] Only lint files in the working copy with `arc lint --everything`. Summary: Fixes T5442. `arc lint --everything` currently uses a `FileFinder` to discover paths for linting. A consequence of this is that files that are ignored or otherwise excluded from version control are linted. Test Plan: Ran `arc lint --everything` in rPHU and noticed that I wasn't prompted to add a trailing newline to `src/.phutil_module_cache`. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T5442 Differential Revision: https://secure.phabricator.com/D9674 --- src/workflow/ArcanistLintWorkflow.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/workflow/ArcanistLintWorkflow.php b/src/workflow/ArcanistLintWorkflow.php index 545481ba..96943d85 100644 --- a/src/workflow/ArcanistLintWorkflow.php +++ b/src/workflow/ArcanistLintWorkflow.php @@ -218,21 +218,7 @@ EOTEXT } if ($everything) { - // Recurse through project from root - switch ($this->getRepositoryApi()->getSourceControlSystemName()) { - case 'git': - $filter = '*/.git'; - break; - case 'svn': - $filter = '*/.svn'; - break; - case 'hg': - $filter = '*/.hg'; - break; - } - $paths = id(new FileFinder($working_copy->getProjectRoot())) - ->excludePath($filter) - ->find(); + $paths = iterator_to_array($this->getRepositoryApi()->getAllFiles()); $this->shouldLintAll = true; } else { $paths = $this->selectPathsForWorkflow($paths, $rev);