1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 06:42:41 +01:00

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
This commit is contained in:
Joshua Spence 2015-01-13 06:37:25 +11:00
parent 25f4563fc8
commit c86c1ff6f2

View 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;