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.

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

Change-Id: I8843bff80bbf98c491642a91672f0aec46632437
Tested-by: Josh Triplett <>
Reviewed-by: Mike Frysinger <>
Commit-Queue: Josh Triplett <>
2 files changed