pre-upload: allow projects to turn on specific checks

The set of extended hook checks can only be turned on by hardcoding the
project in this pre upload script.  The PRESUBMIT.cfg file lets you turn
off specific checks, but only ones that were already explicitly enabled.
If you have a repo that wants to use an extended hook but isn't listed
here, then you can't.

Lets extend the PRESUBMIT.cfg so that it works as one might expect: you
can list any of the extended hook keys and, based on its value, explicitly
enable or disable the test.

BUG=chromium:466264
TEST=`./pre-upload_unittest.py` passes
TEST=made local changes to a PRESUBMIT.cfg and observed behavior

Change-Id: I0d7c4f9328484b62fa4f85c3746cc30344ed72ba
Reviewed-on: https://chromium-review.googlesource.com/258691
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed