forked from OpenTrustGroup/fuchsia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
28 lines (28 loc) · 1.12 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Google
# This defaults to 'Auto'. Explicitly set it for a while, so that
# 'vector<vector<int> >' in existing files gets formatted to
# 'vector<vector<int>>'. ('Auto' means that clang-format will only use
# 'int>>' if the file already contains at least one such instance.)
Standard: Cpp11
SortIncludes: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
DerivePointerAlignment: true
PointerAlignment: Left
ColumnLimit: 100
ForEachMacros: ['list_for_every_entry','list_for_every_entry_safe']
IncludeBlocks: Regroup
IncludeCategories:
# C Header: <foo.h>, <net/foo.h>, etc
- Regex: '^(<((zircon/|lib/|fuchsia/|arpa/|net/|netinet/|sys/)[a-zA-Z0-9_/-]+\.h|[a-zA-Z0-9_-]+\.h)>)'
Priority: 1
# Cpp Header: <foo> and <experimental/foo>
- Regex: '^(<(experimental/)*[a-zA-Z0-9_-]+>)'
Priority: 2
# Libraries: <foo/bar.h>
- Regex: '^(<[a-zA-Z0-9_/-]+\.h>)'
Priority: 3
# Local headers: "foo/bar.h"
- Regex: '^("[.a-zA-Z0-9_/-]+\.h")'
Priority: 4