summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-01-13 22:03:59 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-01-13 22:03:59 +0000
commit196bffec58c180d928c1ed52912e55d11747f9f0 (patch)
tree13d4e37d4903f6e9da6fca319571bfae53803931
parent4e325cff7b1b81c229248836d2fdf58d5bf37531 (diff)
parent912a135c5b34c0c74f39ec42c4866ad2222efce7 (diff)
downloaddevice_generic_trusty-196bffec58c180d928c1ed52912e55d11747f9f0.tar.gz
device_generic_trusty-196bffec58c180d928c1ed52912e55d11747f9f0.tar.bz2
device_generic_trusty-196bffec58c180d928c1ed52912e55d11747f9f0.zip
Merge "Added PREUPLOAD.cfg" am: 34bf3f7621 am: 912a135c5b
Change-Id: I399930552566f47fd765e46692cd5904cd03f612
-rw-r--r--.clang-format10
-rw-r--r--PREUPLOAD.cfg8
2 files changed, 18 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..b0dc94c
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,10 @@
+BasedOnStyle: LLVM
+IndentWidth: 4
+UseTab: Never
+BreakBeforeBraces: Attach
+AllowShortFunctionsOnASingleLine: Inline
+AllowShortIfStatementsOnASingleLine: true
+IndentCaseLabels: false
+ColumnLimit: 100
+PointerBindsToType: true
+SpacesBeforeTrailingComments: 2
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
new file mode 100644
index 0000000..dcf92be
--- /dev/null
+++ b/PREUPLOAD.cfg
@@ -0,0 +1,8 @@
+[Builtin Hooks]
+clang_format = true
+
+[Builtin Hooks Options]
+clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
+
+[Hook Scripts]
+aosp_hook = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} "."