blob: d83109a1a9866d8febaf497e7c34df9354dc3e95 [file] [log] [blame]
Siarhei Vishniakoua3117ca2019-12-09 16:08:46 -08001[Builtin Hooks]
2clang_format = true
Songchun Fand4574b52021-03-02 20:05:57 +00003bpfmt = true
Jordan Demeulenaere846b7982024-05-29 15:22:56 +02004ktfmt = true
Siarhei Vishniakoua3117ca2019-12-09 16:08:46 -08005
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/
Chris Ye3c5b8092020-08-07 09:15:19 -070011 cmds/uinput/
Siarhei Vishniakoucd2fe532020-01-03 10:59:17 -080012 core/jni/
Siarhei Vishniakoud11f38f2021-01-12 20:45:29 -100013 libs/hwui/
Siarhei Vishniakoua3117ca2019-12-09 16:08:46 -080014 libs/input/
Vishnu Nairce1a6482020-10-22 17:41:30 -070015 native/
Siarhei Vishniakou44d50fe2020-01-27 11:31:29 -060016 services/core/jni/
Alex Buynytskyy1d892162020-04-03 23:00:19 -070017 services/incremental/
Vishnu Nair57928e62020-09-16 19:01:04 -070018 tests/
Siarhei Vishniakou2da17762020-09-08 22:43:35 -050019 tools/
Songchun Fand4574b52021-03-02 20:05:57 +000020bpfmt = -d
Gustav Sennton52f3a202024-11-25 16:52:32 +000021ktfmt = --kotlinlang-style --include-dirs=services/permission,packages/SystemUI,libs/WindowManager/Shell/src/com/android/wm/shell/freeform,libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode
Jeff Sharkey6e2c5662022-08-03 13:50:23 -060022
Aurimas Liutikas5c19b542016-10-11 14:01:36 -070023[Hook Scripts]
Aurimas Liutikasd5c5ac62020-07-10 16:28:19 +000024checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
25
Paul Duffin738f9192021-04-14 13:36:53 +010026hidden_api_txt_checksorted_hook = ${REPO_ROOT}/tools/platform-compat/hiddenapi/checksorted_sha.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}
Paul Duffin00537c12018-11-28 12:22:14 +000027
28hidden_api_txt_exclude_hook = ${REPO_ROOT}/frameworks/base/tools/hiddenapi/exclude.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}
Jeff Sharkey0a9c7312018-08-23 22:01:53 -060029
Jordan Demeulenaere8fb6d0e2022-10-06 14:55:44 +020030ktlint_hook = ${REPO_ROOT}/prebuilts/ktlint/ktlint.py --no-verify-format -f ${PREUPLOAD_FILES}
Anushree Ganjamda9c6242023-10-19 14:33:35 -070031
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.
Adrian Roos81b2c9b2024-05-17 12:04:16 +020033flag_hook = ${REPO_ROOT}/frameworks/base/packages/SystemUI/flag_check.py --msg=${PREUPLOAD_COMMIT_MESSAGE} --files=${PREUPLOAD_FILES} --project=${REPO_PROJECT}
Jordan Demeulenaere846b7982024-05-29 15:22:56 +020034
35[Tool Paths]
Jordan Demeulenaere3ccfedb2024-06-12 20:14:38 +020036ktfmt = ${REPO_ROOT}/external/ktfmt/ktfmt.sh