aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiƩbaud Weksteen <tweek@google.com>2020-12-14 11:34:16 +0100
committerThiƩbaud Weksteen <tweek@google.com>2020-12-14 11:36:37 +0100
commit570a292d86d66d7b2b7a5413564b23caf21c6c24 (patch)
tree4cc2be24abbdbdca46e3ff63ed33bf12e60ca002
parent95ed26fb3e1717ea9c33bebae96c4850e127b92f (diff)
downloadbt-570a292d86d66d7b2b7a5413564b23caf21c6c24.tar.gz
Use canonical version of rustfmt
Enable rustfmt repohook. Test: repo upload Change-Id: I9836672a755021c16b9f609cea147664f92bd6e5
-rw-r--r--PREUPLOAD.cfg5
-rw-r--r--gd/rust/rustfmt.toml3
l---------rustfmt.toml1
3 files changed, 5 insertions, 4 deletions
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
index a4730406c..04963df9d 100644
--- a/PREUPLOAD.cfg
+++ b/PREUPLOAD.cfg
@@ -3,8 +3,11 @@ ignore_merged_commits = true
[Builtin Hooks]
clang_format = true
+rustfmt = true
+
+[Builtin Hooks Options]
+rustfmt = --config-path=rustfmt.toml
[Hook Scripts]
aosp_first = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} ".*$"
yapf_hook = ./tools/scripts/yapf_checker.py
-
diff --git a/gd/rust/rustfmt.toml b/gd/rust/rustfmt.toml
deleted file mode 100644
index 238a8f66d..000000000
--- a/gd/rust/rustfmt.toml
+++ /dev/null
@@ -1,3 +0,0 @@
-edition = "2018"
-#width_heuristics = "Max" uncomment out once main rustfmt supports this option
-newline_style = "Unix"
diff --git a/rustfmt.toml b/rustfmt.toml
new file mode 120000
index 000000000..ee92d9efc
--- /dev/null
+++ b/rustfmt.toml
@@ -0,0 +1 @@
+../../build/soong/scripts/rustfmt.toml \ No newline at end of file