-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy path.clang-format
59 lines (52 loc) · 1.58 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
# A simple clang-format file for the DKM project to keep whitespace formatting consistent
# General settings
Language: Cpp
Standard: Cpp11
IndentWidth: 4
TabWidth: 4
UseTab: Always
Cpp11BracedListStyle: true
ColumnLimit: 120
# Alignment settings
PointerAlignment: Left
AlignAfterOpenBracket: false
AlignConsecutiveAssignments: false
AlignEscapedNewlinesLeft: true
AlignOperands: false
AlignTrailingComments: false
# Line break settings
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Attach
BreakBeforeBinaryOperators: NonAssignment
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
PenaltyReturnTypeOnItsOwnLine: 1000
BreakConstructorInitializersBeforeComma: true
ConstructorInitializerAllOnOneLineOrOnePerLine: true
PenaltyBreakBeforeFirstCallParameter: 1000
# Indentation settings
NamespaceIndentation: None
IndentCaseLabels: false
IndentWrappedFunctionNames: true
ContinuationIndentWidth: 4
AccessModifierOffset: 0
# Line spacing settings
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
# Space character settings
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceAfterCStyleCast: false