aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-09-26 17:37:59 -0500
committerTao Bao2017-11-02 18:23:58 -0500
commit6b1aae376a06837d03e96fd19e842d995d967c1f (patch)
treec4eb62412169843499b196496e8d0ae0a349eb39 /PREUPLOAD.cfg
parent43f194c8bc383fdda40505813db98c9f7860417b (diff)
downloadplatform-bootable-recovery-6b1aae376a06837d03e96fd19e842d995d967c1f.tar.gz
platform-bootable-recovery-6b1aae376a06837d03e96fd19e842d995d967c1f.tar.xz
platform-bootable-recovery-6b1aae376a06837d03e96fd19e842d995d967c1f.zip
Add a repohook to clang-format changes.
It would clang-format according to the local style file in .clang-format, unless explicitly skipped with --no-verify. An example output is as follows: [COMMIT dda6b1ee4247] test [FAILED] clang_format The following files have formatting errors: screen_ui.cpp You can run `/mnt/aosp/aosp-master/tools/repohooks/tools/clang-format.py --fix --clang-format /mnt/aosp/aosp-master/prebuilts/clang/host/linux-x86/clang-stable/bin/clang-format --git-clang-format /mnt/aosp/aosp-master/prebuilts/clang/host/linux-x86/clang-stable/bin/git-clang-format --style file --commit dda6b1ee424710760bbab4421e95239fa6a2b40d` to fix this [COMMIT be69a2c4ba16] Add a repohook to clang-format the change. [RUNNING 2/2] clang_format An automatic fix can be attempted for the "clang_format" hook. Do you want to run it? (Yes/no)? Fix successfully applied. Amend the current commit before attempting to upload again. More details about repohooks can be found at: https://android.googlesource.com/platform/tools/repohooks/ Test: `repo upload` a CL. Change-Id: Ie8203a317eb3be7acd5592e03374873997647aa0
Diffstat (limited to 'PREUPLOAD.cfg')
-rw-r--r--PREUPLOAD.cfg6
1 files changed, 6 insertions, 0 deletions
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
new file mode 100644
index 00000000..b5f5f036
--- /dev/null
+++ b/PREUPLOAD.cfg
@@ -0,0 +1,6 @@
1[Builtin Hooks]
2clang_format = true
3
4[Builtin Hooks Options]
5# Handle native codes only.
6clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp