Add flags to disable BUG= and TEST= checks

Commits in some upstream-targeted repositories need to follow upstream
commit message conventions, and thus should not have the BUG= and TEST=
fields.  Add new bug_field_check and test_field_check options to support
disabling those from a repo's PRESUBMIT.cfg configuration.

BUG=None
TEST=Set up a PRESUBMIT.cfg with the new options; verify that the hook
     passes with no BUG or TEST.

Change-Id: I8843bff80bbf98c491642a91672f0aec46632437
Reviewed-on: https://chromium-review.googlesource.com/196681
Tested-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Josh Triplett <josh@joshtriplett.org>
2 files changed