]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Minor changes to `ArcanistChmodLinter`
authorJoshua Spence <josh@joshuaspence.com>
Mon, 12 Jan 2015 19:37:25 +0000 (06:37 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Mon, 12 Jan 2015 19:37:25 +0000 (06:37 +1100)
Summary: Self-explanatory.

Test Plan: Eyeball it.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11342

src/lint/linter/ArcanistChmodLinter.php

index cca739b77b0012d50ebaae9b28a78be0c45119ff..71e8a1be2b8be2d3cfc5b9773eadaa00a1ac72c4 100644 (file)
@@ -27,20 +27,18 @@ final class ArcanistChmodLinter extends ArcanistLinter {
     return 'chmod';
   }
 
-  protected function shouldLintBinaryFiles() {
-    return true;
-  }
-
   public function getLintNameMap() {
     return array(
       self::LINT_INVALID_EXECUTABLE => pht('Invalid Executable'),
     );
   }
 
-  public function getLintSeverityMap() {
-    return array(
-      self::LINT_INVALID_EXECUTABLE => ArcanistLintSeverity::SEVERITY_WARNING,
-    );
+  protected function getDefaultMessageSeverity($code) {
+    return ArcanistLintSeverity::SEVERITY_WARNING;
+  }
+
+  protected function shouldLintBinaryFiles() {
+    return true;
   }
 
   public function lintPath($path) {
@@ -97,10 +95,11 @@ final class ArcanistChmodLinter extends ArcanistLinter {
               self::LINT_INVALID_EXECUTABLE,
               pht("'%s' files should not be executable.", $mime));
             return;
-        }
 
-        // Path is a binary file, which makes it a valid executable.
-        return;
+          default:
+            // Path is a binary file, which makes it a valid executable.
+            return;
+        }
       } else if ($this->getShebang($path)) {
         // Path contains a shebang, which makes it a valid executable.
         return;