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
F19800091: D18538.id44509.diff
Sat, Feb 28, 11:38 AM
F19796093: D18538.id.diff
Fri, Feb 27, 11:01 AM
F19787178: D18538.diff
Wed, Feb 25, 1:21 PM
F19641740: D18538.id44509.diff
Feb 5 2026, 7:46 PM
F19536188: D18538.diff
Jan 21 2026, 10:34 AM
F19526604: D18538.id.diff
Jan 18 2026, 6:25 PM
F19236691: D18538.id44510.diff
Dec 21 2025, 7:26 PM
F19075529: D18538.id44509.diff
Dec 1 2025, 10:10 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.