-
Notifications
You must be signed in to change notification settings - Fork 25
/
.clang-format
90 lines (71 loc) · 2.19 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
Language: Cpp
# BasedOnStyle: Mozilla
AccessModifierOffset: -2
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
ColumnLimit: 80
IndentCaseLabels: true
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
KeepEmptyLinesAtTheStartOfBlocks: true
NamespaceIndentation: None
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
SpacesBeforeTrailingComments: 1
Standard: Cpp11
IndentWidth: 2
TabWidth: 4
UseTab: Never
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas: '^ IWYU pragma:'
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: ControlStatements
DisableFormat: false
# Dont want spaces inside a cast, eg, ( char* )
SpacesInCStyleCastParentheses: false
# NEEDDS CLANGFORMAT 3.6 -> SpaceAfterCStyleCast : true
# Prefer to derive pointer alignment, and in case it cant be,
# prefer C++ style, with emphasis on the variable type.
DerivePointerAlignment: false
PointerAlignment: Left
# C++11 stuff
Cpp11BracedListStyle: true
# Indents
ConstructorInitializerIndentWidth: 2
# SpaceAfterTemplateKeyword: true
# SpaceAfterCStyleCast: true
# Allow user to have extra spacing
MaxEmptyLinesToKeep: 2
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# ----- Braces -----
# line breaking
AlwaysBreakTemplateDeclarations: false
BreakConstructorInitializersBeforeComma: false
# Custom control of brace style. Needs clang-format 3.8+
BraceWrapping:
BeforeElse: true
BreakBeforeBraces: Custom
# Argument packing
BinPackParameters: true
ExperimentalAutoDetectBinPacking: false
...