Page MenuHomePhabricator

Use a regex to determine the list of sources for check-rpc-mappings

Authored by Fabien on Mon, Jul 29, 12:51.



This addresses @deadalnix comment from D3751.

The script used to take a constant list to determine the source files to
be parsed. This is not ideal as it is easy to forgot to add/remove one
when the code is updated.

This diff sets the input to a list of regexes so that the parsing
remains narrow scoped while reducing the amount of maintenance for the

Test Plan
time ./test/lint/ .

Check the output is the same, and that there is no significant
performance drop.

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Mon, Jul 29, 12:51
Herald added a reviewer: Restricted Project. · View Herald TranscriptMon, Jul 29, 12:51
jasonbcox requested changes to this revision.Wed, Jul 31, 01:18
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
105 ↗(On Diff #10512)

Is it necessary for sources to be cast to a list? Pretty sure you can iterate over a set with a foreach loop.

This revision now requires changes to proceed.Wed, Jul 31, 01:18
Fabien updated this revision to Diff 10538.Wed, Jul 31, 07:51

Avoid a useless cast.

Fabien added inline comments.Wed, Jul 31, 07:52
105 ↗(On Diff #10512)

Clearly it's not, good catch.

deadalnix accepted this revision.Fri, Aug 2, 00:40
jasonbcox accepted this revision.Mon, Aug 5, 15:46
This revision is now accepted and ready to land.Mon, Aug 5, 15:46