summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBowgo Tsai2017-03-08 02:32:23 -0600
committerBowgo Tsai2017-03-08 02:51:26 -0600
commit1aeb8d21076ba50bf423379364158cd71e933bf9 (patch)
tree0afd7cdb6cddda2f3e92285372532d7d7bec3d21 /.clang-format
parent5811a434fc079a50fbf830dc001b0cb46fd4f2d0 (diff)
downloadplatform-system-core-1aeb8d21076ba50bf423379364158cd71e933bf9.tar.gz
platform-system-core-1aeb8d21076ba50bf423379364158cd71e933bf9.tar.xz
platform-system-core-1aeb8d21076ba50bf423379364158cd71e933bf9.zip
Add a PREUPLOAD.cfg file to run git-clang-format on every commit
The style file .clang-format is copied from adb/.clang-format. Each sub folders still can have different style by adding their own .clang-format because git-clang-format uses the style file located in one of the parent directories of the *source file*. Also see the following link for previous discussions: https://android-review.googlesource.com/#/c/340106 Bug: 36046320 Test: repo upload, checks pre-submit fails when the uploading commit doesn't meet the style Change-Id: I94369af197da1ccce581bbd861c8737f6a197429
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format13
1 files changed, 13 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 000000000..fc4eb1bc0
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,13 @@
1BasedOnStyle: Google
2AllowShortBlocksOnASingleLine: false
3AllowShortFunctionsOnASingleLine: false
4
5AccessModifierOffset: -2
6ColumnLimit: 100
7CommentPragmas: NOLINT:.*
8DerivePointerAlignment: false
9IndentWidth: 4
10PointerAlignment: Left
11TabWidth: 4
12UseTab: Never
13PenaltyExcessCharacter: 32