-
Notifications
You must be signed in to change notification settings - Fork 1
/
.clang-format
67 lines (54 loc) · 1.43 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
63
64
65
66
67
IndentWidth: 4
ColumnLimit: 120
AccessModifierOffset: 0
# function names
AlignAfterOpenBracket: BlockIndent
AllowAllArgumentsOnNextLine: true
IndentWrappedFunctionNames: false
AlignOperands: false
SeparateDefinitionBlocks: Always
# prevent break between return type and function decl
PenaltyReturnTypeOnItsOwnLine: 10000
InsertNewlineAtEOF: true
AllowShortFunctionsOnASingleLine: Empty
# braces placement
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterStruct: false
AfterUnion: false
BeforeElse: false
IndentBraces: false
AlignEscapedNewlines: DontAlign
# pointers
PointerAlignment: Right
SpacesInCStyleCastParentheses: false
SpaceAfterCStyleCast: false
ReferenceAlignment: Right
# includes
IndentPPDirectives: BeforeHash
SortIncludes: true
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"[[:alnum:]./]+"' # project heahders
Priority: 3
- Regex: '<criterion/[a-z]+\.h>' # Criterion headers
Priority: 2
- Regex: "<[[:alnum:]./]+>" # System/Standard headers
Priority: 1
# Make args on multiple lines if line overflow
BinPackArguments: false
BinPackParameters: false
ExperimentalAutoDetectBinPacking: false
AllowAllParametersOfDeclarationOnNextLine: false
# namespaces
NamespaceIndentation: None
# switch cases
IndentCaseLabels: true
# templates
AlwaysBreakTemplateDeclarations: true
# enum
AllowShortEnumsOnASingleLine: false