Merge "Enable rustfmt for system/security" am: ed2fe02dd0
Original change: https://android-review.googlesource.com/c/platform/system/security/+/1347562
Change-Id: I80f9e1eb030af2a0618c38c5605f17d1c407783c
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index dcf92be..68df61f 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -1,8 +1,10 @@
[Builtin Hooks]
clang_format = true
+rustfmt = true
[Builtin Hooks Options]
clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
+rustfmt = --check --config-path=rustfmt.toml ${PREUPLOAD_FILES}
[Hook Scripts]
aosp_hook = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} "."
diff --git a/rustfmt.toml b/rustfmt.toml
new file mode 120000
index 0000000..ee92d9e
--- /dev/null
+++ b/rustfmt.toml
@@ -0,0 +1 @@
+../../build/soong/scripts/rustfmt.toml
\ No newline at end of file