mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 00:32:41 +01:00
Initialize used variable in lint console renderer
This commit is contained in:
parent
9d92253903
commit
2464f54ecf
1 changed files with 2 additions and 4 deletions
|
@ -89,9 +89,9 @@ final class ArcanistLintConsoleRenderer extends ArcanistLintRenderer {
|
|||
}
|
||||
|
||||
$text = $message->getOriginalText();
|
||||
$start = $message->getChar() - 1;
|
||||
// Refine original and replacement text to eliminate start and end in common
|
||||
if ($message->isPatchable()) {
|
||||
$start = $message->getChar() - 1;
|
||||
$patch = $message->getReplacementText();
|
||||
$text_strlen = strlen($text);
|
||||
$patch_strlen = strlen($patch);
|
||||
|
@ -152,9 +152,7 @@ final class ArcanistLintConsoleRenderer extends ArcanistLintRenderer {
|
|||
$data = substr_replace(
|
||||
$data,
|
||||
phutil_console_format('##%s##', $text_line),
|
||||
($cursor == $line_num)
|
||||
? ($message->isPatchable() ? $start : $message->getChar() - 1)
|
||||
: 0,
|
||||
($cursor == $line_num ? $start : 0),
|
||||
strlen($text_line));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue