-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
71 lines (61 loc) · 1.54 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
# Base Style
BasedOnStyle: LLVM
# Indentation
IndentWidth: 2
TabWidth: 2
UseTab: Never
IndentCaseLabels: true
IndentPPDirectives: AfterHash
NamespaceIndentation: None
# Brace Wrapping
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterStruct: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
BreakBeforeBraces: Custom
# Line Breaking
ColumnLimit: 120
BreakTemplateDeclarations: Yes
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false
# Penalties
PenaltyExcessCharacter: 50
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 1000
PenaltyBreakFirstLessLess: 10
PenaltyBreakString: 100
PenaltyReturnTypeOnItsOwnLine: 50
# Spacing
SpacesInSquareBrackets: false
SpaceBeforeParens: ControlStatements
PointerAlignment: Left
SpacesBeforeTrailingComments: 2
SpacesInParentheses: false
SpacesInAngles: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterCStyleCast: true
SpaceBeforeAssignmentOperators: true
# Short Constructs Formatting
AllowShortBlocksOnASingleLine: Always
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
# Constructor Initializers
PackConstructorInitializers: NextLineOnly
# Include Sorting
SortIncludes: Never
# Comment Formatting
AlignTrailingComments: true
ReflowComments: true
# Miscellaneous
MaxEmptyLinesToKeep: 1