summaryrefslogtreecommitdiff
path: root/PREUPLOAD.cfg
diff options
context:
space:
mode:
authorJordan Demeulenaere <jdemeulenaere@google.com>2022-08-12 11:45:06 +0200
committerJordan Demeulenaere <jdemeulenaere@google.com>2022-08-12 15:17:54 +0200
commite261526d2c9113382bee2d9d1cb8663f0e360585 (patch)
tree504a3f4481900dc0d4d6eca39d364fbd05ba10de /PREUPLOAD.cfg
parenteddeda4f93ae44c5e6dce02dc6a0a7d24b69bd85 (diff)
downloadbase-e261526d2c9113382bee2d9d1cb8663f0e360585.tar.gz
Add a ktfmt hook for some SystemUI files
This CL enables a ktfmt hook to check that Kotlin files are properly formatted. The set of files or directories that should be included is specified in a simple ktfmt_includes.txt file. That way, existing files that are not properly formatted yet won't be checked and uploaders won't be bothered by this check. In the future, we will check all files created after some baseline. At the moment, only Kotlin files that I know are already formatted with ktfmt were included in that list. Test: Manual Bug: 235461679 Change-Id: Idaed15c39f6af413c305f4c74f142a2895b5a753
Diffstat (limited to 'PREUPLOAD.cfg')
-rw-r--r--PREUPLOAD.cfg2
1 files changed, 2 insertions, 0 deletions
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index 65b2511bb30f..c10c380c23cf 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -26,6 +26,8 @@ hidden_api_txt_checksorted_hook = ${REPO_ROOT}/tools/platform-compat/hiddenapi/c
hidden_api_txt_exclude_hook = ${REPO_ROOT}/frameworks/base/tools/hiddenapi/exclude.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}
+ktfmt_hook = ${REPO_ROOT}/external/ktfmt/ktfmt.py --check -i ${REPO_ROOT}/frameworks/base/ktfmt_includes.txt ${PREUPLOAD_FILES}
+
ktlint_hook = ${REPO_ROOT}/prebuilts/ktlint/ktlint.py -f ${PREUPLOAD_FILES}
owners_hook = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} "OWNERS$"