From dfdaed0b27fbe7c8561f15b324fe42697d60be03 Mon Sep 17 00:00:00 2001 From: Aviv Eyal Date: Wed, 9 Jul 2014 15:33:58 -0700 Subject: [PATCH] Don't build unused linters for the `ArcanistConfigurationDrivenLintEngine` Summary: Fixes T5124. Test Plan: `arc lint` on a Phabricator diff that doesn't have JS files doesn't complain on missing JSHint. Reviewers: #blessed_reviewers, joshuaspence, epriestley Reviewed By: joshuaspence Subscribers: epriestley, Korvin Maniphest Tasks: T5124 Differential Revision: https://secure.phabricator.com/D9843 --- src/lint/engine/ArcanistConfigurationDrivenLintEngine.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lint/engine/ArcanistConfigurationDrivenLintEngine.php b/src/lint/engine/ArcanistConfigurationDrivenLintEngine.php index e812f4de..88eeb9d8 100644 --- a/src/lint/engine/ArcanistConfigurationDrivenLintEngine.php +++ b/src/lint/engine/ArcanistConfigurationDrivenLintEngine.php @@ -121,10 +121,10 @@ final class ArcanistConfigurationDrivenLintEngine extends ArcanistLintEngine { count($paths), $name); - $linter->setPaths($paths); - - - $built_linters[] = $linter; + if ($paths) { + $linter->setPaths($paths); + $built_linters[] = $linter; + } } return $built_linters;