-
Notifications
You must be signed in to change notification settings - Fork 179
/
.clang-format
58 lines (43 loc) · 1.27 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
# This format file is made especially for clang-format-3.7
---
BasedOnStyle: Google
IndentWidth: 4
# clang-format is not very good to break long lines, don't let it do it
ColumnLimit: 0
---
Language: Cpp
Standard: Cpp11
# Tune some indentations
AccessModifierOffset: -4
ConstructorInitializerIndentWidth: 8
# Only control statements should have spaces
SpaceBeforeParens: ControlStatements
# No block and its body should EVER be on a single line
AllowShortFunctionsOnASingleLine: Empty
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
# Better C++11 support
Cpp11BracedListStyle: true
# Avoid too many empty lines
MaxEmptyLinesToKeep: 1
# Templates should always be on a separate line
AlwaysBreakTemplateDeclarations: true
# Nice alignement
AlignConsecutiveAssignments: true
# Improve ternary operators alignement
BreakBeforeTernaryOperators: true
# Tabs are bad news
UseTab: Never
# Configure comments
AlignTrailingComments: true
SpacesBeforeTrailingComments: 1
# Don't mess with my comments
CommentPragmas: '^[^ ]'
# Avoid empty lines
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
# Force pointers to the type
DerivePointerAlignment: false
PointerAlignment: Left