Add a cpplint preupload hook.
This runs cpplint.py over modified .cc and .h files before uploading
them to gerrit. This generally takes ~1-2 seconds based on my testing
and the longest one I've been able to find was ~10 seconds.
Test: PREUPLOAD_COMMIT=d9911eeca ./tools/cpplint_presubmit.py
Test: PREUPLOAD_COMMIT=405284789 ./tools/cpplint_presubmit.py
Test: PREUPLOAD_COMMIT=9763f2eb7 ./tools/cpplint_presubmit.py
Test: Manual
Bug: 35810246
Bug: 36855589
Change-Id: Ie0ed9136bdde15d78f2aa40c73fef97e12d12dda
2 files changed