-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.clang-format
37 lines (32 loc) · 916 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
BasedOnStyle: Google
UseTab: Never
ColumnLimit: 140
FixNamespaceComments: true
IncludeBlocks: Regroup
MaxEmptyLinesToKeep: 2
# spacing
SpaceBeforeParens: Never
SpacesInParentheses: true
SpaceAfterTemplateKeyword: false
# line breakes
BreakBeforeBraces: Custom
BraceWrapping:
AfterFunction: true
AlwaysBreakAfterReturnType: TopLevelDefinitions
BreakConstructorInitializers: AfterColon
ConstructorInitializerAllOnOneLineOrOnePerLine: true
BreakBeforeBinaryOperators: NonAssignment
AlignAfterOpenBracket: true
# indention
IndentWidth: 4
IndentCaseLabels: true
AccessModifierOffset: -4
IndentPPDirectives: AfterHash
# alignment
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
#AlignConsecutiveMacros: true # not available in current clang-formatter supplied with VS Code C++ extension
# penalties
PenaltyBreakComment: 50
PenaltyBreakAssignment: 100
PenaltyBreakBeforeFirstCallParameter: 100