Page MenuHomePhabricator

Make the Arcanist comment remover less aggressive about stripping instructional comments
ClosedPublic

Authored by epriestley on Sep 5 2018, 3:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 10:57 PM
Unknown Object (File)
Fri, Dec 20, 2:13 PM
Unknown Object (File)
Fri, Dec 13, 4:39 AM
Unknown Object (File)
Thu, Dec 12, 10:39 PM
Unknown Object (File)
Mon, Dec 9, 4:59 PM
Unknown Object (File)
Nov 22 2024, 12:23 PM
Unknown Object (File)
Nov 21 2024, 11:58 PM
Unknown Object (File)
Nov 20 2024, 4:51 AM
Subscribers

Details

Summary

Ref T13098. See PHI858. If you write this at the end of a message in arc diff:

Subscribers:
#projectname

# NEW DIFFERENTIAL REVISION
# Describe the changes in this new revision.
# ...

...we'll currently eat the #projectname as an instructional comment, even if it is followed by an empty line.

Instead, stop eating stuff once we hit the first empty line. (We escape empty lines in comments already.)

After T13098 I'll maybe adjust this to use a more explicit instruction escape, like ##, since there's no reason we're bound to #.

Test Plan

Added a unit test and made it pass.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Sep 5 2018, 10:40 PM

https://discourse.phabricator-community.org/t/latest-arcanist-incorrecly-parses-comments/2013 reports an issue with this new behavior - probably if the Subscribers is left empty, the parser takes the first line of the comment.