mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 08:52:39 +01:00
Fix context for lint errors at top of file in JSON renderer
This commit is contained in:
parent
2a99dc8b38
commit
5d78869de0
1 changed files with 1 additions and 1 deletions
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue