Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistJSONLintLinter.php
| Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | foreach ($lines as $line) { | ||||
| '/^(?:(?<path>.+): )?'. | '/^(?:(?<path>.+): )?'. | ||||
| 'line (?<line>\d+), col (?<column>\d+), '. | 'line (?<line>\d+), col (?<column>\d+), '. | ||||
| '(?<description>.*)$/', | '(?<description>.*)$/', | ||||
| $line, | $line, | ||||
| $matches); | $matches); | ||||
| if ($match) { | if ($match) { | ||||
| $message = new ArcanistLintMessage(); | $message = new ArcanistLintMessage(); | ||||
| $message->setPath($path); | ->setPath($path) | ||||
| $message->setLine($matches['line']); | ->setLine($matches['line']) | ||||
| $message->setChar($matches['column']); | ->setChar($matches['column']) | ||||
| $message->setCode($this->getLinterName()); | ->setDescription(ucfirst($matches['description'])); | ||||
| $message->setDescription(ucfirst($matches['description'])); | |||||
| $message->setSeverity(ArcanistLintSeverity::SEVERITY_ERROR); | |||||
| $messages[] = $message; | $messages[] = $message; | ||||
| } | } | ||||
| } | } | ||||
| return $messages; | return $messages; | ||||
| } | } | ||||
| } | } | ||||