-
Notifications
You must be signed in to change notification settings - Fork 19
/
.clang-format
40 lines (33 loc) · 1.14 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
29
30
31
32
33
34
35
36
37
38
39
40
---
Language: Cpp
BasedOnStyle: Chromium
BreakBeforeBraces: Allman # Always break before braces.
PointerAlignment: Left # "int& count", "char* str", etc.
DerivePointerAlignment: false # Otherwise it may do things like "int &count",
# depending on the rest of the file.
ColumnLimit: 100
BinPackArguments: false
BinPackParameters: false
AccessModifierOffset: -4
ContinuationIndentWidth: 4
IndentCaseLabels: false
IndentWidth: 4
SortIncludes: true
IncludeCategories:
# Badly behaved libraries that need to come first.
- Regex: '^<(Python\.h|[wW]indows\.h)>'
Priority: -1
# C system headers
- Regex: '^<((sys|arpa|netinet|net)/)?[a-zA-Z0-9_]+\.h>'
Priority: 1
# C++ system headers
- Regex: '^<((tr1|experimental)/)?[a-zA-Z0-9_]+>'
Priority: 2
# Third-party system headers
- Regex: '^<(boost|gtest)/'
Priority: 3
# Sort '<' includes before '"' includes.
- Regex: '^<'
Priority: 4
IncludeIsMainRegex: '(Test)?$'
...