summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-01-13 21:28:41 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-01-13 21:28:41 +0000
commit34bf3f76212f468bc6995ecab4c262a9747597ca (patch)
tree13d4e37d4903f6e9da6fca319571bfae53803931
parenta7e19bb81caf1347f9eeb61e516a0db079c5d2e7 (diff)
parentbdde7f9dd3268309d6811596c2fbd4effddc8c7a (diff)
downloaddevice_generic_trusty-34bf3f76212f468bc6995ecab4c262a9747597ca.tar.gz
device_generic_trusty-34bf3f76212f468bc6995ecab4c262a9747597ca.tar.bz2
device_generic_trusty-34bf3f76212f468bc6995ecab4c262a9747597ca.zip
Merge "Added PREUPLOAD.cfg"
-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} "."