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
F18756184: D21290.id.diff
Sun, Oct 5, 9:55 AM
F18734305: D21290.id.diff
Tue, Sep 30, 10:51 PM
F18631570: D21290.diff
Sep 16 2025, 3:44 PM
F18620316: D21290.id.diff
Sep 15 2025, 4:53 AM
F18617273: D21290.id50699.diff
Sep 14 2025, 8:46 PM
F18611104: D21290.diff
Sep 14 2025, 6:13 AM
F18600768: D21290.id.diff
Sep 13 2025, 10:33 AM
F18597810: D21290.diff
Sep 13 2025, 3:43 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
Branch
white1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 24519
Build 33789: Run Core Tests
Build 33788: arc lint + arc unit