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

Special case ArcanistTextLinter for completely empty files.

This commit is contained in:
epriestley 2011-03-22 11:08:59 -07:00
parent aa44db2f96
commit b8e7e9017a

View file

@ -65,6 +65,12 @@ class ArcanistTextLinter extends ArcanistLinter {
} }
public function lintPath($path) { public function lintPath($path) {
if (!strlen($this->getData($path))) {
// If the file is empty, don't bother; particularly, don't require
// the user to add a newline.
return;
}
$this->lintNewlines($path); $this->lintNewlines($path);
$this->lintTabs($path); $this->lintTabs($path);