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
F19075529: D18538.id44509.diff
Mon, Dec 1, 10:10 AM
F19005378: D18538.diff
Fri, Nov 21, 3:21 PM
F18994439: D18538.diff
Wed, Nov 19, 11:08 AM
F18849675: D18538.id.diff
Oct 30 2025, 11:21 AM
F18845614: D18538.diff
Oct 29 2025, 1:28 PM
F18790962: D18538.id44515.diff
Oct 15 2025, 9:47 PM
F18768570: D18538.id44509.diff
Oct 8 2025, 4:16 AM
F18466779: D18538.id44515.diff
Sep 2 2025, 10:49 AM
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.