@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Recognize the official "Go" magic regexp for generated code as generated

Summary: See PHI1112. See T784. Although some more general/flexible solution is arriving eventually, adding this rule seems reasonable for now, since it's not a big deal if we remove it later to replace this with some fancier system.

Test Plan: Created a diff with the official Go generated marker, saw the changeset marked as generated.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20237

+6
+6
src/applications/differential/engine/DifferentialChangesetEngine.php
··· 54 54 if (strpos($new_data, '@'.'generated') !== false) { 55 55 return true; 56 56 } 57 + 58 + // See PHI1112. This is the official pattern for marking Go code as 59 + // generated. 60 + if (preg_match('(^// Code generated .* DO NOT EDIT\.$)m', $new_data)) { 61 + return true; 62 + } 57 63 } 58 64 59 65 return false;