-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-format
More file actions
40 lines (31 loc) · 1004 Bytes
/
.clang-format
File metadata and controls
40 lines (31 loc) · 1004 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
BasedOnStyle: LLVM
# Indentation - tabs, width 8 (Linux kernel style)
IndentWidth: 8
TabWidth: 8
UseTab: Always
ContinuationIndentWidth: 8
# Brace placement
# Linux style: Allman for function definitions, K&R for control structures
BreakBeforeBraces: Linux
# Column limit - not enforced; the codebase has long lines
ColumnLimit: 0
# Pointer alignment - * goes with the variable, not the type
# char *p, not char* p
PointerAlignment: Right
# Do not reorder #include blocks; they are manually grouped
SortIncludes: Never
# Spacing
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesInParentheses: false
SpaceAfterCStyleCast: false
# Short constructs - allow empty functions on one line; nothing else
AllowShortFunctionsOnASingleLine: Empty
AllowShortBlocksOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
# Alignment
AlignConsecutiveMacros: Consecutive
AlignEscapedNewlines: Left
# Comments
SpacesBeforeTrailingComments: 1