-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.clang-format
More file actions
42 lines (41 loc) · 1.14 KB
/
.clang-format
File metadata and controls
42 lines (41 loc) · 1.14 KB
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
# We'll use defaults from the LLVM style, but with 4 columns indentation.
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 80
ReflowComments: false
PointerAlignment: Left
BinPackParameters: false
BinPackArguments: false
BreakConstructorInitializers: BeforeComma
BreakTemplateDeclarations: true
ConstructorInitializerIndentWidth: 2
PackConstructorInitializers: CurrentLine
MaxEmptyLinesToKeep: 3
AlignOperands: AlignAfterOperator
AllowAllArgumentsOnNextLine: false
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AllowShortLoopsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: WithoutElse
AlignTrailingComments:
Kind: Always
OverEmptyLines: 2
BreakBeforeTernaryOperators: true
BreakBeforeBinaryOperators: All
# Penalties
PenaltyReturnTypeOnItsOwnLine: 150
# Case statements
AlignConsecutiveShortCaseStatements:
Enabled: true
AcrossEmptyLines: false
AcrossComments: true
AlignCaseColons: false
AllowShortCaseExpressionOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: true
AttributeMacros: [MP_EXPORT]