Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistClosureLinter.php
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | 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 = id(new ArcanistLintMessage()) | ||||
->setPath($path) | ->setPath($path) | ||||
->setLine($matches[1]) | ->setLine($matches[1]) | ||||
->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; | ||||
} | } | ||||
} | } |