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
F18054523: D18538.id44515.diff
Mon, Aug 4, 6:18 AM
F17948813: D18538.id44510.diff
Thu, Jul 31, 10:04 PM
F17941407: D18538.id44509.diff
Thu, Jul 31, 5:24 AM
F17939619: D18538.id.diff
Thu, Jul 31, 3:14 AM
F17939431: D18538.id44515.diff
Thu, Jul 31, 3:07 AM
F17936802: D18538.diff
Thu, Jul 31, 12:34 AM
F17919363: D18538.id44510.diff
Wed, Jul 30, 2:26 AM
Unknown Object (File)
Jun 27 2025, 10:39 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.