From c86c1ff6f2f5284ebebde043c91391eda71bed28 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Tue, 13 Jan 2015 06:37:25 +1100 Subject: [PATCH] Minor changes to `ArcanistChmodLinter` 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 | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/lint/linter/ArcanistChmodLinter.php b/src/lint/linter/ArcanistChmodLinter.php index cca739b7..71e8a1be 100644 --- a/src/lint/linter/ArcanistChmodLinter.php +++ b/src/lint/linter/ArcanistChmodLinter.php @@ -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; -- 2.43.0