2015-08-24 20:27:58 +02:00
|
|
|
BasedOnStyle: Google
|
|
|
|
AllowShortBlocksOnASingleLine: false
|
|
|
|
AllowShortFunctionsOnASingleLine: false
|
|
|
|
|
2015-11-11 23:21:09 +01:00
|
|
|
ColumnLimit: 100
|
2015-08-24 20:27:58 +02:00
|
|
|
CommentPragmas: NOLINT:.*
|
|
|
|
DerivePointerAlignment: false
|
|
|
|
IndentWidth: 2
|
|
|
|
PointerAlignment: Left
|
|
|
|
TabWidth: 2
|
|
|
|
UseTab: Never
|
|
|
|
PenaltyExcessCharacter: 32
|
2015-08-24 21:56:48 +02:00
|
|
|
|
|
|
|
Cpp11BracedListStyle: false
|
clang-format: Add IncludeBlocks: Preserve
The same change and reasoning as
c077eefc1e5007a5c656183737e82d5c0a7df855 in build/soong, copied below:
As of [1], the Google format, which we default to, uses IncludeBlocks:
Regroup, which sorts all includes with <> and without .h into the top
group reserved for libc headers, e.g.:
+#include <android-base/properties.h>
+#include <android-base/strings.h>
#include <ctype.h>
#include <stdlib.h>
#include <sys/system_properties.h>
#include <iostream>
-#include <android-base/properties.h>
-#include <android-base/strings.h>
This is accurate to the Google C++ style guide, which states that
other library headers should be included with "", however we have a
strong tendency to use <> for these headers for Android, so we must
revert this change.
Note, clang-format allows regexes for creating the blocks as well,
however, short of including all possible libc headers, I don't think
there's a way to differentiate between <sys/wait.h> and
<other_lib/header.h>.
[1]:
https://github.com/llvm-mirror/clang/commit/62e3198c4f5490a1c60ba51d81fe2e1f0dc99135#diff-b689ebff2e51e675b346a88289e74542
Test: clang-format doesn't do the above.
Change-Id: I2e3f6ee75fd725b620174082afcce4ee7f4efa66
2019-11-05 21:29:56 +01:00
|
|
|
IncludeBlocks: Preserve
|