Enable clang-format on presubmit
This only applies to new CLs involving libs/{gui,ui,vr} and
services/{surfaceflinger,vr}
Test: repo upload .
Change-Id: Ia65fb0c23ea1a258ee69dcd5e94d31623aee3101
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index f8f0265..385d6f1 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -1,3 +1,15 @@
+[Builtin Hooks]
+clang_format = true
+
+[Builtin Hooks Options]
+# Only turn on clang-format check for the following subfolders.
+clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
+ libs/gui/
+ libs/ui/
+ libs/vr/
+ services/surfaceflinger/
+ services/vr/
+
[Hook Scripts]
owners_hook = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} "OWNERS$"
installd_hook = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} "^cmds/installd/"