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
F13130956: D18509.diff
Wed, May 1, 1:11 PM
F13128479: D18509.diff
Wed, May 1, 12:04 AM
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
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
Branch
ldisplay2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 18242
Build 24534: Run Core Tests
Build 24533: arc lint + arc unit

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.