diff options
author | Eric Jeong <ericjeong@google.com> | 2020-09-21 12:19:16 -0700 |
---|---|---|
committer | Eric Jeong <ericjeong@google.com> | 2020-09-21 13:29:22 -0700 |
commit | 2de705f5b733af162ebe74de1bb20ad16f712ef2 (patch) | |
tree | 0a26a271d86d3fdff700ecf6a5591dfd8caafaeb | |
parent | 0cabd31ed96cbee2b3f8a850842d0a8ceff7e3d3 (diff) | |
download | Car-2de705f5b733af162ebe74de1bb20ad16f712ef2.tar.gz |
Apply Android framework header inclusion order
- Android framework header order is 1) local header and 2) system header.
- This CL further divide system headers into 2-1) Android system header
and 2-2) C++ standard header.
Bug: 168720830
Test: manual test
Change-Id: I188ca201f2d9532d02b03e26fb1c12a34859ec77
-rw-r--r-- | .clang-format | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/.clang-format b/.clang-format index 82e72e732a..fd72b1ddc3 100644 --- a/.clang-format +++ b/.clang-format @@ -17,11 +17,25 @@ TabWidth: 4 ContinuationIndentWidth: 8 ConstructorInitializerIndentWidth: 6 SpacesBeforeTrailingComments: 2 -IncludeBlocks: Preserve DerivePointerAlignment: false PointerAlignment: Left UseTab: Never BreakInheritanceList: AfterColon BreakConstructorInitializers: AfterColon PenaltyBreakBeforeFirstCallParameter: 100000 +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^<[[:alnum:]_]+\.h>' + Priority: 3 + SortPriority: 3 + - Regex: '^<sys/(auxv|cachectl|capability|cdefs|endian|epoll|errno|eventfd|fcntl|file|fsuid|ifunc|inotify|ioctl|ipc|klog|limits|mman|mount|msg|mtio|param|personality|poll|prctl|procfs|ptrace|queue|quota|random|reboot|reg|resource|select|sem|sendfile|shm|signalfd|signal|socket|statfs|stat|statvfs|swap|syscall|sysconf|sysinfo|syslog|sysmacros|_system_properties|system_properties|thread_properties|time|timerfd|times|timex|ttydefaults|types|ucontext|uio|un|unistd|user|utsname|vfs|vt|wait|xattr)\.h>' + Priority: 3 + SortPriority: 3 + - Regex: '^<[[:alnum:]_]+>' + Priority: 3 + SortPriority: 4 + - Regex: '^<.*/[[:alnum:]_]+\.h>' + Priority: 2 + - Regex: '^".*' + Priority: 1 --- |