-
Notifications
You must be signed in to change notification settings - Fork 55
/
.clang-format
62 lines (55 loc) · 1.49 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# allowing custom formatting
# // clang-format off
# some code;
# // clang-format on
---
BasedOnStyle: LLVM
UseTab: Never
IndentWidth: 4
ColumnLimit: 0
AccessModifierOffset: -4
MaxEmptyLinesToKeep: 1
FixNamespaceComments: true
ReflowComments: false
PointerAlignment: Left
QualifierAlignment: Left
IndentPPDirectives: AfterHash
AlignTrailingComments: false
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLambdasOnASingleLine: Inline
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
SortIncludes: CaseInsensitive
IncludeBlocks: Regroup
IncludeCategories:
# Headers in <> without extension.
- Regex: '<([[:alnum:]\Q/-_\E])+>'
Priority: 3
# Headers in <> with extension.
- Regex: '<([[:alnum:].\Q/-_\E])+>'
Priority: 2
# Headers in "" with extension.
- Regex: '"([[:alnum:].\Q/-_\E])+"'
Priority: 1
ForEachMacros: ["TEST_CASE"]
StatementMacros: []
WhitespaceSensitiveMacros: ["ATT_STRINGIZE"]
BreakBeforeBraces: Custom # nearly identical to Allman, but slightly better c++20 support
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false # default: true
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false # default: true
SplitEmptyRecord: false # default: true
SplitEmptyNamespace: false # default: true