HomePhabricator

[LINTER] Improve check-doc regex

Description

[LINTER] Improve check-doc regex

Summary:
Improve the regex:

  • Use Perl type regex in grep to remove duplication. Previously there

was 2 alsmost identical regex, one posix compliant for egrep and one
Perl compliant for python re.

  • Exclude the test folder from the source path rather than subtracting

its matching output

This improvements make the -h now detectable; it is added to the
undocumented exceptions.

Inspired from core PR12820.
Note that GNU grep is used instead of git grep to allow for
multiline regex (required due to our code format).

Test Plan:
Should return no error:

arc lint

./test/lint/check-doc.py

There should be 1 more used argument than before this patch (-h),
otherwise the output should be identical.

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: teamcity, schancel

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

Details

Provenance
FabienAuthored on Mar 15 2019, 16:55
FabienPushed on Mar 19 2019, 10:42
Reviewer
Restricted Project
Differential Revision
D2694: [LINTER] Improve check-doc regex
Parents
rSTAGINGc0dc1ba156be: Pass SendCoinsRecipient (208 bytes) by const reference
Branches
Unknown
Tags
Unknown