HomePhabricator

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

Description

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

Summary:
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
script.

Test Plan:

time ./test/lint/check-rpc-mappings.py .

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

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, deadalnix, jasonbcox

Subscribers: jasonbcox, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D3757

Details

Provenance
FabienAuthored on Jul 29 2019, 12:46
FabienPushed on Aug 5 2019, 16:18
Reviewer
Restricted Project
Differential Revision
D3757: Use a regex to determine the list of sources for check-rpc-mappings
Parents
rABCffff62ffe555: Avoid copies in range-for loops and add a warning to detect them
Branches
Unknown
Tags
Unknown