Changeset View
Changeset View
Standalone View
Standalone View
src/lint/renderer/ArcanistConsoleLintRenderer.php
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | protected function renderContext( | ||||
$original = $message->getOriginalText(); | $original = $message->getOriginalText(); | ||||
$replacement = $message->getReplacementText(); | $replacement = $message->getReplacementText(); | ||||
$line = $message->getLine(); | $line = $message->getLine(); | ||||
$char = $message->getChar(); | $char = $message->getChar(); | ||||
$old = $data; | $old = $data; | ||||
$old_lines = phutil_split_lines($old); | $old_lines = phutil_split_lines($old); | ||||
if ($original == null) { | |||||
$original = ''; | |||||
} | |||||
$old_impact = substr_count($original, "\n") + 1; | $old_impact = substr_count($original, "\n") + 1; | ||||
$start = $line; | $start = $line; | ||||
// See PHI1782. If a linter raises a message at a line that does not | // See PHI1782. If a linter raises a message at a line that does not | ||||
// exist, just render a warning message. | // exist, just render a warning message. | ||||
// Linters are permitted to raise a warning at the very end of a file. | // Linters are permitted to raise a warning at the very end of a file. | ||||
// For example, if a file is 13 lines long, it is valid to raise a message | // For example, if a file is 13 lines long, it is valid to raise a message | ||||
▲ Show 20 Lines • Show All 254 Lines • Show Last 20 Lines |