Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistClosureLinter.php
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | protected function parseLinterOutput($path, $err, $stdout, $stderr) { | ||||
| $messages = array(); | $messages = array(); | ||||
| foreach ($lines as $line) { | foreach ($lines as $line) { | ||||
| $matches = null; | $matches = null; | ||||
| if (!preg_match('/^Line (\d+), E:(\d+): (.*)/', $line, $matches)) { | if (!preg_match('/^Line (\d+), E:(\d+): (.*)/', $line, $matches)) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| $message = id(new ArcanistLintMessage()) | $messages[] = id(new ArcanistLintMessage()) | ||||
| ->setPath($path) | ->setPath($path) | ||||
| ->setLine($matches[1]) | ->setLine($matches[1]) | ||||
| ->setSeverity(ArcanistLintSeverity::SEVERITY_ERROR) | ->setCode($matches[2]) | ||||
| ->setCode($this->getLinterName().$matches[2]) | |||||
| ->setDescription($matches[3]); | ->setDescription($matches[3]); | ||||
| $messages[] = $message; | |||||
| } | } | ||||
| return $messages; | return $messages; | ||||
| } | } | ||||
| } | } | ||||