summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuexi Ma <yuexima@google.com>2017-05-05 01:11:08 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-05-05 01:11:08 +0000
commit8da639e33f706e4312d4a506d4c48615dcf964ce (patch)
treeaf2fac9caf461058f25b3a1352afc15661c4f63d
parentd2c550929913d6e7f4608d93b5cf65b6705f233f (diff)
parente4efa6de120bc8c86c40aa2282797b2fe5b31043 (diff)
downloadperformance-8da639e33f706e4312d4a506d4c48615dcf964ce.tar.gz
Merge "Add pre-upload style checker for cpp and java code" am: c2cf5485ab am: 19d70201c4 am: 81a4f8657e
am: e4efa6de12 Change-Id: I4a849bf10429baad6550b8d0d8ad02d94c3598a3
-rw-r--r--.clang-format13
-rw-r--r--PREUPLOAD.cfg6
2 files changed, 19 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..6027082
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,13 @@
+---
+Language: Cpp
+BasedOnStyle: Google
+ColumnLimit: 80
+IndentWidth: 2
+ContinuationIndentWidth: 4
+---
+Language: Java
+BasedOnStyle: Google
+ColumnLimit: 100
+IndentWidth: 4
+ContinuationIndentWidth: 8
+...
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
new file mode 100644
index 0000000..6be6e5f
--- /dev/null
+++ b/PREUPLOAD.cfg
@@ -0,0 +1,6 @@
+[Builtin Hooks]
+clang_format = true
+
+[Builtin Hooks Options]
+clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp,java
+