Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistPyLintLinter.php
Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | foreach ($lines as $line) { | ||||
continue; | continue; | ||||
} | } | ||||
// NOTE: PyLint sometimes returns -1 as the character offset for a | // NOTE: PyLint sometimes returns -1 as the character offset for a | ||||
// message. If it does, treat it as 0. See T9257. | // message. If it does, treat it as 0. See T9257. | ||||
$char = (int)$matches[1]; | $char = (int)$matches[1]; | ||||
$char = max(0, $char); | $char = max(0, $char); | ||||
$message = id(new ArcanistLintMessage()) | $message = (new ArcanistLintMessage()) | ||||
->setPath($path) | ->setPath($path) | ||||
->setLine($matches[0]) | ->setLine($matches[0]) | ||||
->setChar($char) | ->setChar($char) | ||||
->setCode($matches[2]) | ->setCode($matches[2]) | ||||
->setSeverity($this->getLintMessageSeverity($matches[2])) | ->setSeverity($this->getLintMessageSeverity($matches[2])) | ||||
->setName(ucwords(str_replace('-', ' ', $matches[3]))) | ->setName(ucwords(str_replace('-', ' ', $matches[3]))) | ||||
->setDescription($matches[4]); | ->setDescription($matches[4]); | ||||
Show All 37 Lines |
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