netd: Enable the clang_format preupload hook
Copied verbatim from system/core/PREUPLOAD.cfg.
For more details, see //tools/repohooks/README.md.
Demo usage:
---------------- cut ----------------
codewiz@xyzzy:~/src/aosp/system/netd% repo upload .
[COMMIT 15bb55c11df2] netd: Enable clang-tidy and fix all warnings
[FAILED] clang_format
The following files have formatting errors:
server/SockDiag.cpp
server/SockDiag.h
You can run `[...snip...]` to fix this
An automatic fix can be attempted for the "clang_format" hook. Do you want to run it? (Yes/no)? y
Fix successfully applied. Amend the current commit before attempting to upload again.
---------------- cut ----------------
In case clang-format produces unwanted reformatting, the preupload check
can be bypassed by:
repo upload --no-verify
Test: as shown in demo above
Change-Id: I04f9fc860b894609d493b688f58a04fff362d1d2
1 file changed