Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistRubyLinter.php
Context not available. | |||||
$matches = array(); | $matches = array(); | ||||
$regex = '/^ruby (?P<version>\d+\.\d+\.\d+)+/'; | $regex = '/^ruby (?P<version>\d+\.\d+\.\d+)+/'; | ||||
if (preg_match($regex, $stdout, $matches)) { | if (@preg_match($regex, $stdout, $matches)) { | ||||
return $matches['version']; | return $matches['version']; | ||||
} else { | } else { | ||||
return false; | return false; | ||||
Context not available. | |||||
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; | ||||
} | } | ||||
Context not available. | |||||
$matches[$key] = trim($match); | $matches[$key] = trim($match); | ||||
} | } | ||||
$code = head(explode(',', $matches[3])); | $code = head(@explode(',', $matches[3])); | ||||
$message = new ArcanistLintMessage(); | $message = new ArcanistLintMessage(); | ||||
$message->setPath($path); | $message->setPath($path); | ||||
Context not available. |
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