Page MenuHomePhabricator

[LINTER] Fix check doc incompatibility with BSD grep
ClosedPublic

Authored by Fabien on Mar 16 2019, 10:07.

Details

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'

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien retitled this revision from [WIP][LINTER] Fix check doc incompatibility with BSD grep to [LINTER] Fix check doc incompatibility with BSD grep.Mar 16 2019, 10:55

Tested functional on OSX

This revision is now accepted and ready to land.Mar 18 2019, 21:34
This revision was automatically updated to reflect the committed changes.