1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +01:00

Fix context for lint errors at top of file in JSON renderer

This commit is contained in:
vrana 2012-06-01 23:43:21 -07:00
parent 2a99dc8b38
commit 5d78869de0

View file

@ -41,7 +41,7 @@ final class ArcanistLintJSONRenderer implements ArcanistLintRenderer {
'char' => $message->getChar(),
'context' => implode("\n", array_slice(
$data,
$message->getLine() - self::LINES_OF_CONTEXT,
max(1, $message->getLine() - self::LINES_OF_CONTEXT),
self::LINES_OF_CONTEXT * 2 + 1
)),
'description' => $message->getDescription(),