1[Builtin Hooks]
2clang_format = true
3bpfmt = true
4ktfmt = true
5
6[Builtin Hooks Options]
7# Only turn on clang-format check for the following subfolders.
8clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
9               cmds/hid/
10               cmds/input/
11               cmds/uinput/
12               core/jni/
13               libs/hwui/
14               libs/input/
15               native/
16               services/core/jni/
17               services/incremental/
18               tests/
19               tools/
20bpfmt = -d
21ktfmt = --kotlinlang-style --include-dirs=services/permission,packages/SystemUI
22
23[Hook Scripts]
24checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
25
26hidden_api_txt_checksorted_hook = ${REPO_ROOT}/tools/platform-compat/hiddenapi/checksorted_sha.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}
27
28hidden_api_txt_exclude_hook = ${REPO_ROOT}/frameworks/base/tools/hiddenapi/exclude.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}
29
30ktlint_hook = ${REPO_ROOT}/prebuilts/ktlint/ktlint.py --no-verify-format -f ${PREUPLOAD_FILES}
31
32# This flag check hook runs only for "packages/SystemUI" subdirectory. If you want to include this check for other subdirectories, please modify flag_check.py.
33flag_hook = ${REPO_ROOT}/frameworks/base/packages/SystemUI/flag_check.py --msg=${PREUPLOAD_COMMIT_MESSAGE} --files=${PREUPLOAD_FILES} --project=${REPO_PROJECT}
34
35[Tool Paths]
36ktfmt = ${REPO_ROOT}/external/ktfmt/ktfmt.sh
37