Page MenuHomePhabricator

Fix a prefix/suffix counting issue in Arcanist lint rendering
ClosedPublic

Authored by epriestley on Sep 5 2017, 6:50 PM.
Tags
None
Referenced Files
F13312384: D18538.diff
Tue, Jun 11, 6:30 AM
F13307498: D18538.id44515.diff
Sun, Jun 9, 6:45 PM
F13298449: D18538.diff
Fri, Jun 7, 6:48 AM
F13281570: D18538.diff
Sun, Jun 2, 10:56 AM
F13247351: D18538.id44510.diff
Thu, May 23, 6:36 PM
F13210998: D18538.diff
Fri, May 17, 5:24 AM
F13196323: D18538.diff
Sun, May 12, 11:11 PM
Unknown Object (File)
May 6 2024, 5:18 PM
Subscribers
None

Details

Summary

Ref T9846. See PHI48. For replacing text in the form "ABC" with "ABBC", the trimmer had a bug.

Test Plan

Added failing tests, fixed 'em.

Diff Detail

Repository
rARC Arcanist
Branch
midline
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 18291
Build 24613: Run Core Tests
Build 24612: arc lint + arc unit

Event Timeline

That build failure might be "legitimate-ish" -- maybe a version difference.

PHP 7.0.0 - If string is equal to start characters long, an empty string will be returned. Prior to this version, FALSE was returned in this case.
http://php.net/substr

Thanks, PHP.

  • Add some casting to force PHP7 behavior?
This revision is now accepted and ready to land.Sep 5 2017, 8:04 PM
This revision was automatically updated to reflect the committed changes.