xref: /openbmc/phosphor-hwmon/.clang-format (revision b6865fdcc10dbfd5ff023f3b74d9c8b645d319db)
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 AlwaysBreakBeforeMultilineStrings: false
21 BinPackArguments: true
22 BinPackParameters: true
23 BitFieldColonSpacing: None
24 BraceWrapping:
25   AfterCaseLabel:  true
26   AfterClass:      true
27   AfterControlStatement: true
28   AfterEnum:       true
29   AfterExternBlock: true
30   AfterFunction:   true
31   AfterNamespace:  true
32   AfterObjCDeclaration: true
33   AfterStruct:     true
34   AfterUnion:      true
35   BeforeCatch:     true
36   BeforeElse:      true
37   BeforeLambdaBody: false
38   BeforeWhile:     false
39   IndentBraces:    false
40   SplitEmptyFunction:   false
41   SplitEmptyRecord:     false
42   SplitEmptyNamespace:  false
43 BreakAfterAttributes: Never
44 BreakAfterReturnType: Automatic
45 BreakBeforeBinaryOperators: None
46 BreakBeforeBraces: Custom
47 BreakBeforeTernaryOperators: true
48 BreakConstructorInitializers: AfterColon
49 BreakInheritanceList: AfterColon
50 BreakStringLiterals: false
51 BreakTemplateDeclarations: Yes
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: Signature
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: 50
102 PenaltyBreakComment: 300
103 PenaltyBreakFirstLessLess: 120
104 PenaltyBreakString: 1000
105 PenaltyBreakTemplateDeclaration: 10
106 PenaltyExcessCharacter: 1000000
107 PenaltyReturnTypeOnItsOwnLine: 60
108 PenaltyIndentedWhitespace: 1
109 PointerAlignment: Left
110 QualifierAlignment: Left
111 ReferenceAlignment: Left
112 ReflowComments:  true
113 RequiresClausePosition: OwnLine
114 RequiresExpressionIndentation: Keyword
115 SortIncludes: CaseSensitive
116 SortUsingDeclarations: true
117 SpaceAfterCStyleCast: false
118 SpaceAfterTemplateKeyword: true
119 SpaceBeforeAssignmentOperators: true
120 SpaceBeforeCpp11BracedList: false
121 SpaceBeforeCtorInitializerColon: true
122 SpaceBeforeInheritanceColon: true
123 SpaceBeforeParens: ControlStatements
124 SpaceBeforeRangeBasedForLoopColon: true
125 SpaceInEmptyParentheses: false
126 SpacesBeforeTrailingComments: 1
127 SpacesInAngles: Never
128 SpacesInContainerLiterals: true
129 SpacesInCStyleCastParentheses: false
130 SpacesInParentheses: false
131 SpacesInSquareBrackets: false
132 Standard:        Latest
133 TabWidth:        4
134 UseTab:          Never
135 ...
136 
137