From 0d1d04e434b06ce992b539e60df0aa6c35d738e7 Mon Sep 17 00:00:00 2001 From: David Cramer Date: Mon, 3 Dec 2012 15:25:16 -0800 Subject: [PATCH] canRun should return false on scala linter instead of raising an exception Summary: This was causing the following error in environments that didnt have scala configured: Some linters failed: - ArcanistScalaSBTLinter: ArcanistUsageException: This directory does not appear to be maintained by SBT, as we can't seem to find a working build file (project/Build.scala or build.sbt). Test Plan: . Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4070 --- src/lint/linter/ArcanistScalaSBTLinter.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lint/linter/ArcanistScalaSBTLinter.php b/src/lint/linter/ArcanistScalaSBTLinter.php index cccc8b22..8081d645 100644 --- a/src/lint/linter/ArcanistScalaSBTLinter.php +++ b/src/lint/linter/ArcanistScalaSBTLinter.php @@ -30,10 +30,7 @@ final class ArcanistScalaSBTLinter extends ArcanistLinter { // Hell. We let the build system handle this for us. if (!Filesystem::pathExists('project/Build.scala') && !Filesystem::pathExists('build.sbt')) { - throw new ArcanistUsageException( - "This directory does not appear to be maintained by SBT, as we can't ". - "seem to find a working build file (project/Build.scala or ". - "build.sbt)."); + return false; } return true; }