]> khamidou — GitHub mirrors - arcanist.git/commitdiff
canRun should return false on scala linter instead of raising an exception
authorDavid Cramer <dcramer@gmail.com>
Mon, 3 Dec 2012 23:25:16 +0000 (15:25 -0800)
committerepriestley <git@epriestley.com>
Mon, 3 Dec 2012 23:25:28 +0000 (15:25 -0800)
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

index cccc8b2277a56a11da4a39b4f6a365dfd8e17c4a..8081d645c9651cb100a34ef1b156ce23c44fc870 100644 (file)
@@ -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;
   }