xref: /openbmc/phosphor-fan-presence/.clang-format (revision b99ce0ed9fbb06a765eeb801e61fdba6abcdf9dc)
1 ---
2 Language:        Cpp
3 # BasedOnStyle:  LLVM
4 AccessModifierOffset: -2
5 AlignAfterOpenBracket: Align
6 AlignConsecutiveAssignments: false
7 AlignConsecutiveDeclarations: false
8 AlignEscapedNewlines: Right
9 AlignOperands:  Align
10 AlignTrailingComments:
11   Kind: Always
12   OverEmptyLines: 1
13 AllowAllParametersOfDeclarationOnNextLine: true
14 AllowShortBlocksOnASingleLine: Empty
15 AllowShortCaseLabelsOnASingleLine: false
16 AllowShortFunctionsOnASingleLine: Empty
17 AllowShortIfStatementsOnASingleLine: Never
18 AllowShortLambdasOnASingleLine: true
19 AllowShortLoopsOnASingleLine: false
20 AlwaysBreakAfterReturnType: None
21 AlwaysBreakBeforeMultilineStrings: false
22 AlwaysBreakTemplateDeclarations: Yes
23 BinPackArguments: true
24 BinPackParameters: true
25 BitFieldColonSpacing: None
26 BraceWrapping:
27   AfterCaseLabel:  true
28   AfterClass:      true
29   AfterControlStatement: true
30   AfterEnum:       true
31   AfterExternBlock: true
32   AfterFunction:   true
33   AfterNamespace:  true
34   AfterObjCDeclaration: true
35   AfterStruct:     true
36   AfterUnion:      true
37   BeforeCatch:     true
38   BeforeElse:      true
39   BeforeLambdaBody: false
40   BeforeWhile:     false
41   IndentBraces:    false
42   SplitEmptyFunction:   false
43   SplitEmptyRecord:     false
44   SplitEmptyNamespace:  false
45 BreakAfterAttributes: Never
46 BreakBeforeBinaryOperators: None
47 BreakBeforeBraces: Custom
48 BreakBeforeTernaryOperators: true
49 BreakConstructorInitializers: AfterColon
50 BreakInheritanceList: AfterColon
51 BreakStringLiterals: false
52 ColumnLimit:     80
53 CommentPragmas:  '^ IWYU pragma:'
54 CompactNamespaces: false
55 ConstructorInitializerIndentWidth: 4
56 ContinuationIndentWidth: 4
57 Cpp11BracedListStyle: true
58 DerivePointerAlignment: false
59 DisableFormat:   false
60 FixNamespaceComments: true
61 ForEachMacros:
62   - foreach
63   - Q_FOREACH
64   - BOOST_FOREACH
65 IncludeBlocks: Regroup
66 IncludeCategories:
67   - Regex:           '^[<"](gtest|gmock)'
68     Priority:        7
69   - Regex:           '^"config.h"'
70     Priority:        -1
71   - Regex:           '^".*\.h"'
72     Priority:        1
73   - Regex:           '^".*\.hpp"'
74     Priority:        2
75   - Regex:           '^<.*\.h>'
76     Priority:        3
77   - Regex:           '^<.*\.hpp>'
78     Priority:        4
79   - Regex:           '^<.*'
80     Priority:        5
81   - Regex:           '.*'
82     Priority:        6
83 IndentCaseLabels: true
84 IndentExternBlock: NoIndent
85 IndentRequiresClause: true
86 IndentWidth:     4
87 IndentWrappedFunctionNames: true
88 InsertNewlineAtEOF: true
89 KeepEmptyLinesAtTheStartOfBlocks: false
90 LambdaBodyIndentation: OuterScope
91 LineEnding: LF
92 MacroBlockBegin: ''
93 MacroBlockEnd:   ''
94 MaxEmptyLinesToKeep: 1
95 NamespaceIndentation: None
96 ObjCBlockIndentWidth: 2
97 ObjCSpaceAfterProperty: false
98 ObjCSpaceBeforeProtocolList: true
99 PackConstructorInitializers: BinPack
100 PenaltyBreakAssignment: 25
101 PenaltyBreakBeforeFirstCallParameter: 19
102 PenaltyBreakComment: 300
103 PenaltyBreakFirstLessLess: 120
104 PenaltyBreakString: 1000
105 PenaltyExcessCharacter: 1000000
106 PenaltyReturnTypeOnItsOwnLine: 60
107 PenaltyIndentedWhitespace: 0
108 PointerAlignment: Left
109 QualifierAlignment: Left
110 ReferenceAlignment: Left
111 ReflowComments:  true
112 RequiresClausePosition: OwnLine
113 RequiresExpressionIndentation: Keyword
114 SortIncludes: CaseSensitive
115 SortUsingDeclarations: true
116 SpaceAfterCStyleCast: false
117 SpaceAfterTemplateKeyword: true
118 SpaceBeforeAssignmentOperators: true
119 SpaceBeforeCpp11BracedList: false
120 SpaceBeforeCtorInitializerColon: true
121 SpaceBeforeInheritanceColon: true
122 SpaceBeforeParens: ControlStatements
123 SpaceBeforeRangeBasedForLoopColon: true
124 SpaceInEmptyParentheses: false
125 SpacesBeforeTrailingComments: 1
126 SpacesInAngles: Never
127 SpacesInContainerLiterals: true
128 SpacesInCStyleCastParentheses: false
129 SpacesInParentheses: false
130 SpacesInSquareBrackets: false
131 Standard:        Latest
132 TabWidth:        4
133 UseTab:          Never
134 ...
135 
136