mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 16:22:42 +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:
parent
25f4563fc8
commit
c86c1ff6f2
1 changed files with 10 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue