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
Unknown Object (File)
Tue, Nov 19, 2:21 AM
Unknown Object (File)
Thu, Nov 7, 3:04 AM
Unknown Object (File)
Fri, Nov 1, 1:00 PM
Unknown Object (File)
Fri, Nov 1, 1:00 PM
Unknown Object (File)
Fri, Nov 1, 1:00 PM
Unknown Object (File)
Fri, Nov 1, 12:46 PM
Unknown Object (File)
Oct 25 2024, 2:26 AM
Unknown Object (File)
Oct 15 2024, 8:02 PM
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.