Page MenuHomePhabricator

Extract and cover the logic for "trimming" a lint message
ClosedPublic

Authored by epriestley on Aug 31 2017, 4:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 8, 9:01 PM
Unknown Object (File)
Mar 4 2024, 7:05 AM
Unknown Object (File)
Feb 24 2024, 4:41 PM
Unknown Object (File)
Feb 24 2024, 4:06 PM
Unknown Object (File)
Feb 24 2024, 3:02 PM
Unknown Object (File)
Feb 3 2024, 8:49 AM
Unknown Object (File)
Jan 26 2024, 12:51 PM
Unknown Object (File)
Jan 17 2024, 12:27 AM
Subscribers
None

Details

Summary

Ref T9846. Sometimes, a lint message says to replace "the big bad wolf" with "the huge bad wolf": that is, the original and replacement text are the same at the beginning, or the end, or both.

To make this easier for humans to understand, we want to just show that "big" is being replaced with "huge", not that the entire phrase is being replaced.

This logic currently happens inline in console rendering. Pull it out and cover it so a future change can simplify console rendering.

Test Plan

Ran unit tests.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Pretty sure that test failure is a false positive since I didn't change anything and I remember that test being flaky, but I'll take a look.

  • Remove failing XML test.
  • Add coverage for patches with prefix newlines.
This revision is now accepted and ready to land.Aug 31 2017, 6:55 PM
This revision was automatically updated to reflect the committed changes.