Ignore newlines in code diffs on Phab
Open, WishlistPublic

Description

Richard writes in Trac #9976:

Doing code reviews in Phab is great. However, the way that the lint feature works encourages patchers to split lines as they means that more attention is drawn to split lines than perhaps should be.

As a concrete example, I'm reading ​Phab:D538 this morning, and looking at line 402 of DsArrows. Alan has added a new field to a data structure and needed to insert a _ to make the code remain well typed... but this forced a line split to avoid a lint error. Now, I have to check if there are any changes in the second half of the line manually, because the character-diff highlighting fails after the line split.

Is there a way to improve this behavior? I can think of two approaches:

(Better option) Teach the character-diff highlighting feature to look across linebreaks.
(Worse option) Encourage patchers not to make new line breaks until their final commit. Suppress lint problems about line breaks by request.
This is, of course, minor, but it would certainly be nice!

Related Objects

thomie created this task.Sep 17 2015, 8:43 AM
thomie updated the task description. (Show Details)
thomie raised the priority of this task from to Needs Triage.
thomie assigned this task to austin.
thomie added a project: GHC.
thomie moved this task to Backlog on the GHC board.
thomie added subscribers: thomie, goldfire.
austin triaged this task as Wishlist priority.Sep 28 2015, 3:08 PM

Option 1 sounds nice but probably isn't going to happen soon... There's no real way to configure it and I'm not aware of any ways to tweak the algorithm already.

I think this is something painful we just have to deal with as we gradually clean up code more and more...