Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistCpplintLinter.php
Context not available. | |||||
} | } | ||||
protected function parseLinterOutput($path, $err, $stdout, $stderr) { | protected function parseLinterOutput($path, $err, $stdout, $stderr) { | ||||
$lines = explode("\n", $stderr); | $lines = @explode("\n", $stderr); | ||||
$messages = array(); | $messages = array(); | ||||
foreach ($lines as $line) { | foreach ($lines as $line) { | ||||
$line = trim($line); | $line = trim($line); | ||||
$matches = null; | $matches = null; | ||||
$regex = '/(\d+):\s*(.*)\s*\[(.*)\] \[(\d+)\]$/'; | $regex = '/(\d+):\s*(.*)\s*\[(.*)\] \[(\d+)\]$/'; | ||||
if (!preg_match($regex, $line, $matches)) { | if (!@preg_match($regex, $line, $matches)) { | ||||
continue; | continue; | ||||
} | } | ||||
foreach ($matches as $key => $match) { | foreach ($matches as $key => $match) { | ||||
Context not available. | |||||
} | } | ||||
protected function getLintCodeFromLinterConfigurationKey($code) { | protected function getLintCodeFromLinterConfigurationKey($code) { | ||||
if (!preg_match('@^[a-z_]+/[a-z0-9_+]+$@', $code)) { | if (!@preg_match('@^[a-z_]+/[a-z0-9_+]+$@', $code)) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Unrecognized lint message code "%s". Expected a valid cpplint '. | 'Unrecognized lint message code "%s". Expected a valid cpplint '. | ||||
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