Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistClosureLinter.php
Show All 40 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()) | $message = (new ArcanistLintMessage()) | ||||
->setPath($path) | ->setPath($path) | ||||
->setLine($matches[1]) | ->setLine($matches[1]) | ||||
->setName('GJSLINT'.$matches[2]) | ->setName('GJSLINT'.$matches[2]) | ||||
->setSeverity(ArcanistLintSeverity::SEVERITY_ERROR) | ->setSeverity(ArcanistLintSeverity::SEVERITY_ERROR) | ||||
->setCode($this->getLinterName().$matches[2]) | ->setCode($this->getLinterName().$matches[2]) | ||||
->setDescription($matches[3]); | ->setDescription($matches[3]); | ||||
$messages[] = $message; | $messages[] = $message; | ||||
} | } | ||||
return $messages; | return $messages; | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0