mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +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';
|
return 'chmod';
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function shouldLintBinaryFiles() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getLintNameMap() {
|
public function getLintNameMap() {
|
||||||
return array(
|
return array(
|
||||||
self::LINT_INVALID_EXECUTABLE => pht('Invalid Executable'),
|
self::LINT_INVALID_EXECUTABLE => pht('Invalid Executable'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getLintSeverityMap() {
|
protected function getDefaultMessageSeverity($code) {
|
||||||
return array(
|
return ArcanistLintSeverity::SEVERITY_WARNING;
|
||||||
self::LINT_INVALID_EXECUTABLE => ArcanistLintSeverity::SEVERITY_WARNING,
|
}
|
||||||
);
|
|
||||||
|
protected function shouldLintBinaryFiles() {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function lintPath($path) {
|
public function lintPath($path) {
|
||||||
|
@ -97,10 +95,11 @@ final class ArcanistChmodLinter extends ArcanistLinter {
|
||||||
self::LINT_INVALID_EXECUTABLE,
|
self::LINT_INVALID_EXECUTABLE,
|
||||||
pht("'%s' files should not be executable.", $mime));
|
pht("'%s' files should not be executable.", $mime));
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
// Path is a binary file, which makes it a valid executable.
|
default:
|
||||||
return;
|
// Path is a binary file, which makes it a valid executable.
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else if ($this->getShebang($path)) {
|
} else if ($this->getShebang($path)) {
|
||||||
// Path contains a shebang, which makes it a valid executable.
|
// Path contains a shebang, which makes it a valid executable.
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue