summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ferris2017-03-10 13:25:32 -0600
committerChristopher Ferris2017-03-10 15:01:39 -0600
commita78d9a293cf3bdca23c5cd6ef92966f40e851009 (patch)
treee6bd26df8f57c00017eddb7b4fa067889bd3bfa0 /.clang-format-4
parentce7ee088ff7524b1101441bd84db90821be41c6c (diff)
downloadplatform-system-core-a78d9a293cf3bdca23c5cd6ef92966f40e851009.tar.gz
platform-system-core-a78d9a293cf3bdca23c5cd6ef92966f40e851009.tar.xz
platform-system-core-a78d9a293cf3bdca23c5cd6ef92966f40e851009.zip
Add a 2 width option of clang format.
Make the default the 4 tab space version. Add a link to the 2 space version for libbacktrace. The only other difference between the 4 space and 2 space tab version is that the 2 space tab version allows short functions on a single line. This is for things like constructors, short destructors, or accessor functions. I believe this is closer to the Google C++ style guide. Bug: 36046320 Test: NA Change-Id: Ida08db18902eeb101f42869dd5590182529d54ef
Diffstat (limited to '.clang-format-4')
-rw-r--r--.clang-format-413
1 files changed, 13 insertions, 0 deletions
diff --git a/.clang-format-4 b/.clang-format-4
new file mode 100644
index 000000000..fc4eb1bc0
--- /dev/null
+++ b/.clang-format-4
@@ -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