HomePhabricator

Fix an issue when rendering a lint message which removes whitespace at the end…

Description

Fix an issue when rendering a lint message which removes whitespace at the end of a file

Summary:
Ref T13543. If a file ends in spaces and no newline, we'll emit a message suggesting removal of the spaces. This will effectively remove the line, but the code will then attempt to highlight text within the line.

Prior to D21044 this continued without raising an error and produced a reasonable result, but it now fatals. Insetad, don't try to highlight lines which no longer exist.

Test Plan: See T13543 for details.

Maniphest Tasks: T13543

Differential Revision: https://secure.phabricator.com/D21290