diff --git a/src/lint/linter/ArcanistTextLinter.php b/src/lint/linter/ArcanistTextLinter.php --- a/src/lint/linter/ArcanistTextLinter.php +++ b/src/lint/linter/ArcanistTextLinter.php @@ -148,6 +148,11 @@ } protected function lintNewlines($path) { + // ICS Files have weird newlines and that's OK. + if ($this->isICSFile($path)) { + return; + } + $data = $this->getData($path); $pos = strpos($this->getData($path), "\r"); @@ -209,6 +214,11 @@ } protected function lintCharset($path) { + // ICS files have weird newlines, out of expected charset. + if ($this->isICSFile($path)) { + return; + } + $data = $this->getData($path); $matches = null; @@ -315,4 +325,9 @@ ''); } + private function isICSFile($path) { + $ext = pathinfo($path, PATHINFO_EXTENSION); + return $ext === 'ics'; + } + }