Page MenuHomePhabricator

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

Authored by epriestley on May 27 2020, 6:26 PM.
Tags
None
Referenced Files
F13078349: D21290.diff
Tue, Apr 23, 2:53 PM
Unknown Object (File)
Tue, Apr 9, 10:09 PM
Unknown Object (File)
Thu, Apr 4, 4:53 AM
Unknown Object (File)
Fri, Mar 29, 2:26 PM
Unknown Object (File)
Mar 7 2024, 1:41 PM
Unknown Object (File)
Feb 21 2024, 12:31 PM
Unknown Object (File)
Jan 16 2024, 12:54 AM
Unknown Object (File)
Jan 9 2024, 8:08 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable