-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
40 lines (33 loc) · 918 Bytes
/
.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
---
BasedOnStyle: LLVM
IndentWidth: 4
---
Language: Cpp
ColumnLimit: 80 # After how many characters to break into a new line
PointerAlignment: Right
SpacesInParens: Custom
SpacesInParensOptions:
InConditionalStatements: true # if(cond) -> if( cond )
# self explanatory
AllowShortIfStatementsOnASingleLine: true
# aligns assignments along =
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
# aligns assignments along variable name
AlignConsecutiveDeclarations:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
# align preprocessor macros
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
# indent 'case' statements in a switch block
IndentCaseLabels: true
AlignTrailingComments:
Kind: Always
OverEmptyLines: 1
AllowShortBlocksOnASingleLine: Empty # When a {} block is empty, put it on a single line