Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistRubyLinter.php
| Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | final class ArcanistRubyLinter extends ArcanistExternalLinter { | ||||
| protected function parseLinterOutput($path, $err, $stdout, $stderr) { | protected function parseLinterOutput($path, $err, $stdout, $stderr) { | ||||
| $lines = phutil_split_lines($stderr, $retain_endings = false); | $lines = phutil_split_lines($stderr, $retain_endings = false); | ||||
| $messages = array(); | $messages = array(); | ||||
| foreach ($lines as $line) { | foreach ($lines as $line) { | ||||
| $matches = null; | $matches = null; | ||||
| if (!preg_match("/(.*?):(\d+): (.*?)$/", $line, $matches)) { | if (!preg_match('/(.*?):(\d+): (.*?)$/', $line, $matches)) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| foreach ($matches as $key => $match) { | foreach ($matches as $key => $match) { | ||||
| $matches[$key] = trim($match); | $matches[$key] = trim($match); | ||||
| } | } | ||||
| $code = head(explode(',', $matches[3])); | $code = head(explode(',', $matches[3])); | ||||
| Show All 20 Lines | |||||