[LINTER] Fix check doc incompatibility with BSD grep
Summary:
BSD grep on OSX and FreeBSD does not provide the same options as GNU
grep which prevent using them for multiline search.
This diff uses only python regex to avoid this incompatibility.
As a bonus, it runs about 3x faster.
Depends on D2694
Test Plan:
Should return no error:
arc lint
In src/init.cpp delete the line 1279:
logger.m_print_to_console = gArgs.GetBoolArg("-printtoconsole", false);
Then run arc lint and check the linter outputs an Unknown argument
error:
'-printtoconsole' is documented but not used'
Restore the previously deleted line in src/init.cpp and now delete the
lines 792 to 794:
strUsage += HelpMessageOpt( "-printtoconsole", _("Send trace/debug info to console instead of debug.log file"));
Then run arc lint and check the linter outputs an Undocumented
argument error:
'-printtoconsole' is undocumented'
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2695