Page MenuHomePhabricator

Correct some lint console renderer issues with files missing trailing newlines
ClosedPublic

Authored by epriestley on Oct 20 2017, 4:34 PM.
Tags
None
Referenced Files
F13234547: D18716.diff
Tue, May 21, 3:31 AM
F13227560: D18716.diff
Mon, May 20, 4:13 AM
F13217349: D18716.id44930.diff
Sat, May 18, 4:44 AM
F13212542: D18716.diff
Fri, May 17, 6:51 AM
F13196179: D18716.diff
Sun, May 12, 11:02 PM
F13178648: D18716.diff
Wed, May 8, 8:33 PM
Unknown Object (File)
Sun, May 5, 2:14 AM
Unknown Object (File)
Thu, Apr 25, 3:07 AM
Subscribers
None

Details

Summary

See PHI162. This corrects a couple more bugs:

  • If the old file didn't end in a newline, we could end up printing two lines next to each other in the output.
  • If the patch targeted "Line 6, character 1" instead of "line 5, character 3" in a file "1\n2\n3\n4\n5\n", we would fail to figure out what that meant when computing an offset because the last line has 0 characters on it.
Test Plan

Added failing unit tests, made them pass. Also tested with some fake linters similar to the ones described in PHI162.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley created this revision.
This revision is now accepted and ready to land.Oct 20 2017, 5:24 PM
This revision was automatically updated to reflect the committed changes.