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.

TEST=`./` passes
TEST=made local changes to a PRESUBMIT.cfg and observed behavior

Change-Id: I0d7c4f9328484b62fa4f85c3746cc30344ed72ba
Tested-by: Mike Frysinger <>
Reviewed-by: Mike Frysinger <>
1 file changed