[style] use #if defined()
[sfm.git] / .clang-format
blob86df5f0c2de5331d8c63525c1ee902d6f7eb3282
1 ---
2 BasedOnStyle: WebKit
3 ---
4 AccessModifierOffset: 8
5 AlignConsecutiveAssignments: false
6 AlignConsecutiveDeclarations: false
7 AlignConsecutiveMacros: false
8 AlignEscapedNewlines: Left
9 AlignOperands: false
10 AlignTrailingComments: false
11 AllowAllParametersOfDeclarationOnNextLine: false
12 AllowShortBlocksOnASingleLine: false
13 AllowShortCaseLabelsOnASingleLine: false
14 AllowShortFunctionsOnASingleLine: InlineOnly
15 AllowShortIfStatementsOnASingleLine: false
16 AllowShortLoopsOnASingleLine: false
17 AlwaysBreakAfterReturnType: TopLevelDefinitions
18 AlwaysBreakBeforeMultilineStrings: false
19 AlwaysBreakTemplateDeclarations: MultiLine
20 BinPackArguments: true
21 BinPackParameters: true
22 BreakBeforeBinaryOperators: None
23 BreakBeforeBraces: WebKit
24 BreakBeforeTernaryOperators: false
25 BreakStringLiterals: false
26 ColumnLimit: 80
27 CompactNamespaces: true
28 UseTab: Always
29 ConstructorInitializerIndentWidth: 8
30 ContinuationIndentWidth: 8
31 DerivePointerAlignment: false
32 DisableFormat: false
33 IncludeBlocks: Regroup
34 IndentCaseLabels: false
35 IndentPPDirectives: None
36 IndentWidth: 8
37 KeepEmptyLinesAtTheStartOfBlocks: true
38 Language: Cpp
39 MaxEmptyLinesToKeep: 1
40 NamespaceIndentation: None
41 PenaltyBreakBeforeFirstCallParameter: 1000
42 PenaltyBreakComment: 10
43 PointerAlignment: Right
44 ReflowComments: false
45 SortIncludes: true
46 SpaceAfterCStyleCast: false
47 TabWidth: 8
49 IncludeCategories:
50   - Regex: '^\"opt_.*\.h\"'
51     Priority: 1
52     SortPriority: 10
53   - Regex: '^<sys/cdefs\.h>'
54     Priority: 2
55     SortPriority: 20
56   - Regex: '^<sys/types\.h>'
57     Priority: 2
58     SortPriority: 21
59   - Regex: '^<sys/param\.h>'
60     Priority: 2
61     SortPriority: 22
62   - Regex: '^<sys.*/'
63     Priority: 2
64     SortPriority: 23
65   - Regex: '^<vm/vm\.h>'
66     Priority: 3
67     SortPriority: 30
68   - Regex: '^<vm/'
69     Priority: 3
70     SortPriority: 31
71   - Regex: '^<machine/'
72     Priority: 4
73     SortPriority: 40
74   - Regex: '^<(x86|amd64|i386|xen)/'
75     Priority: 5
76     SortPriority: 50
77   - Regex: '^<dev/'
78     Priority: 6
79     SortPriority: 60
80   - Regex: '^<net.*/'
81     Priority: 7
82     SortPriority: 70
83   - Regex: '^<protocols/'
84     Priority: 7
85     SortPriority: 71
86   - Regex: '^<(fs|nfs(|client|server)|ufs)/'
87     Priority: 8
88     SortPriority: 80
89   - Regex: '^<[^/].*\.h'
90     Priority: 9
91     SortPriority: 90
92   - Regex: '^\".*\.h\"'
93     Priority: 10
94     SortPriority: 100
95 ...