From 2f870dbc33235f561ee0221370f7b0163fc51c3b Mon Sep 17 00:00:00 2001 From: Patrick Rohr Date: Fri, 28 Mar 2025 10:04:34 -0700 Subject: [PATCH] Add rustfmt to p/m/C Test: try to upload .rs Change-Id: I8ccea161da10db8505e1f0aa5fb22f6c6952373e --- PREUPLOAD.cfg | 2 ++ rustfmt.toml | 1 + 2 files changed, 3 insertions(+) create mode 120000 rustfmt.toml diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg index c301397593..cbe321c5f9 100644 --- a/PREUPLOAD.cfg +++ b/PREUPLOAD.cfg @@ -1,9 +1,11 @@ [Builtin Hooks] bpfmt = true clang_format = true +rustfmt = true [Builtin Hooks Options] clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp,hpp +rustfmt = --config-path=rustfmt.toml [Hook Scripts] checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT} diff --git a/rustfmt.toml b/rustfmt.toml new file mode 120000 index 0000000000..475ba8fde7 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1 @@ +../../../build/soong/scripts/rustfmt.toml \ No newline at end of file