-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
38 lines (37 loc) · 1.3 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
# options documented in http://clang.llvm.org/docs/ClangFormatStyleOptions.html
Language: Cpp # used for C as well, not just C++
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AlignConsecutiveAssignments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortLoopsOnASingleLine: true
AllowShortBlocksOnASingleLine: true
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakBeforeMultilineStrings: false
BinPackParameters: false
BreakBeforeBinaryOperators: false
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
ColumnLimit: 80
ContinuationIndentWidth: 4 # to differentiate from normal lines
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: false
IndentWidth: 2 # spaces not tabs
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 1
PointerAlignment: Middle
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInCStyleCastParentheses: false
SpaceAfterCStyleCast: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 40 # kept ridiculously wide so that if tabs are inserted they will be obvious
UseTab: Never