-
Notifications
You must be signed in to change notification settings - Fork 15
/
.clang-format
67 lines (65 loc) · 1.81 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
60
61
62
63
64
65
66
67
# BitVisor .clang-format file
# Intended for clang-format >= 15.
# Based on FreeBSD's .clang-format file.
# Unnecessary parameters are removed.
---
BasedOnStyle: WebKit
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: false
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: TopLevelDefinitions
AlwaysBreakBeforeMultilineStrings: false
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: WebKit
BreakBeforeTernaryOperators: false
BreakStringLiterals: false
DerivePointerAlignment: false
IndentCaseLabels: false
IndentPPDirectives: AfterHash
PointerAlignment: Right
SpaceAfterCStyleCast: false
KeepEmptyLinesAtTheStartOfBlocks: true
# Additional rules for BitVisor
SpaceBeforeParens: Always
AlignAfterOpenBracket: Align
AlignTrailingComments: false
AlignConsecutiveMacros: Consecutive
IndentWidth: 8
ContinuationIndentWidth: 8
UseTab: Always
TabWidth: 8
ColumnLimit: 79
AlignEscapedNewlines: DontAlign
AllowShortEnumsOnASingleLine: false
SortIncludes: false
# Prefer:
# some_long_function(arg1, arg2
# arg3)
# over:
# some_var = some_long_function(arg1,
# arg2,
# arg3);
PenaltyBreakAssignment: 1000
PenaltyBreakBeforeFirstCallParameter: 1200
ForEachMacros:
- LIST_FOREACH
- LIST1_FOREACH
- LIST2_FOREACH_DELETABLE
- LIST2_FOREACH
- LIST2_FOREACH_DELETABLE
- LIST3_FOREACH
- LIST3_FOREACH_DELETABLE
- LIST4_FOREACH
- LIST4_FOREACH_DELETABLE
- ARRAYLIST_FOREACH
- fdt_for_each_subnode
- fdt_for_each_property_offset