-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.clang-format
More file actions
45 lines (37 loc) · 969 Bytes
/
.clang-format
File metadata and controls
45 lines (37 loc) · 969 Bytes
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
# .clang-format for C project with Allman style braces
BasedOnStyle: LLVM
# Indentation
IndentWidth: 4
UseTab: Never
TabWidth: 4
# Line length
ColumnLimit: 85
BinPackParameters: true
BinPackArguments: true
# Braces style
BreakBeforeBraces: Allman # Allman style: brace on next line
BraceWrapping:
AfterFunction: true
AfterControlStatement: true
AfterStruct: true
AfterClass: true
AfterNamespace: false
IndentBraces: false
# Pointers
PointerAlignment: Right
# Spaces
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpacesInParentheses: false
SpacesInContainerLiterals: false
SpaceBeforeParens: ControlStatements
# Allow single-line short statements if simple
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline
AllowAllParametersOfDeclarationOnNextLine: true
# Other
ReflowComments: true
IndentCaseLabels: true
AlignOperands: true
InsertNewlineAtEOF: true