xref: /openbmc/docs/style/cpp/.clang-format (revision 57a48b218f234412662c72141323c1552478e75c)
10dcc430aSPatrick Venture---
20dcc430aSPatrick VentureLanguage:        Cpp
30dcc430aSPatrick Venture# BasedOnStyle:  LLVM
40dcc430aSPatrick VentureAccessModifierOffset: -2
50dcc430aSPatrick VentureAlignAfterOpenBracket: Align
60dcc430aSPatrick VentureAlignConsecutiveAssignments: false
70dcc430aSPatrick VentureAlignConsecutiveDeclarations: false
89a71ea19SZane ShelleyAlignEscapedNewlines: Right
9c742fe86SPatrick WilliamsAlignOperands:  Align
10231ad0cdSPatrick WilliamsAlignTrailingComments:
11231ad0cdSPatrick Williams  Kind: Always
12231ad0cdSPatrick Williams  OverEmptyLines: 1
130dcc430aSPatrick VentureAllowAllParametersOfDeclarationOnNextLine: true
143547af1fSPatrick WilliamsAllowShortBlocksOnASingleLine: Empty
150dcc430aSPatrick VentureAllowShortCaseLabelsOnASingleLine: false
163547af1fSPatrick WilliamsAllowShortFunctionsOnASingleLine: Empty
17e1a27147SPatrick WilliamsAllowShortIfStatementsOnASingleLine: Never
18e1a27147SPatrick WilliamsAllowShortLambdasOnASingleLine: true
190dcc430aSPatrick VentureAllowShortLoopsOnASingleLine: false
200dcc430aSPatrick VentureAlwaysBreakBeforeMultilineStrings: false
210dcc430aSPatrick VentureBinPackArguments: true
220dcc430aSPatrick VentureBinPackParameters: true
23e1a27147SPatrick WilliamsBitFieldColonSpacing: None
240dcc430aSPatrick VentureBraceWrapping:
25b6de1960SPatrick Williams  AfterCaseLabel:  true
260dcc430aSPatrick Venture  AfterClass:      true
270dcc430aSPatrick Venture  AfterControlStatement: true
280dcc430aSPatrick Venture  AfterEnum:       true
29e1a27147SPatrick Williams  AfterExternBlock: true
300dcc430aSPatrick Venture  AfterFunction:   true
310dcc430aSPatrick Venture  AfterNamespace:  true
320dcc430aSPatrick Venture  AfterObjCDeclaration: true
330dcc430aSPatrick Venture  AfterStruct:     true
340dcc430aSPatrick Venture  AfterUnion:      true
350dcc430aSPatrick Venture  BeforeCatch:     true
360dcc430aSPatrick Venture  BeforeElse:      true
37e1a27147SPatrick Williams  BeforeLambdaBody: false
38e1a27147SPatrick Williams  BeforeWhile:     false
390dcc430aSPatrick Venture  IndentBraces:    false
409a71ea19SZane Shelley  SplitEmptyFunction:   false
419a71ea19SZane Shelley  SplitEmptyRecord:     false
429a71ea19SZane Shelley  SplitEmptyNamespace:  false
43231ad0cdSPatrick WilliamsBreakAfterAttributes: Never
4435c2005fSPatrick WilliamsBreakAfterReturnType: Automatic
450dcc430aSPatrick VentureBreakBeforeBinaryOperators: None
460dcc430aSPatrick VentureBreakBeforeBraces: Custom
470dcc430aSPatrick VentureBreakBeforeTernaryOperators: true
480dcc430aSPatrick VentureBreakConstructorInitializers: AfterColon
499a71ea19SZane ShelleyBreakInheritanceList: AfterColon
509e5bbd0cSAndrew JefferyBreakStringLiterals: false
5135c2005fSPatrick WilliamsBreakTemplateDeclarations: Yes
520dcc430aSPatrick VentureColumnLimit:     80
530dcc430aSPatrick VentureCommentPragmas:  '^ IWYU pragma:'
549a71ea19SZane ShelleyCompactNamespaces: false
550dcc430aSPatrick VentureConstructorInitializerIndentWidth: 4
560dcc430aSPatrick VentureContinuationIndentWidth: 4
570dcc430aSPatrick VentureCpp11BracedListStyle: true
580dcc430aSPatrick VentureDerivePointerAlignment: false
590dcc430aSPatrick VentureDisableFormat:   false
600dcc430aSPatrick VentureFixNamespaceComments: true
61e1a27147SPatrick WilliamsForEachMacros:
62e1a27147SPatrick Williams  - foreach
63e1a27147SPatrick Williams  - Q_FOREACH
64e1a27147SPatrick Williams  - BOOST_FOREACH
650dcc430aSPatrick VentureIncludeBlocks: Regroup
660dcc430aSPatrick VentureIncludeCategories:
670dcc430aSPatrick Venture  - Regex:           '^[<"](gtest|gmock)'
689a71ea19SZane Shelley    Priority:        7
690dcc430aSPatrick Venture  - Regex:           '^"config.h"'
700dcc430aSPatrick Venture    Priority:        -1
719a71ea19SZane Shelley  - Regex:           '^".*\.h"'
720dcc430aSPatrick Venture    Priority:        1
739a71ea19SZane Shelley  - Regex:           '^".*\.hpp"'
740dcc430aSPatrick Venture    Priority:        2
759a71ea19SZane Shelley  - Regex:           '^<.*\.h>'
760dcc430aSPatrick Venture    Priority:        3
779a71ea19SZane Shelley  - Regex:           '^<.*\.hpp>'
780dcc430aSPatrick Venture    Priority:        4
799a71ea19SZane Shelley  - Regex:           '^<.*'
809a71ea19SZane Shelley    Priority:        5
819a71ea19SZane Shelley  - Regex:           '.*'
829a71ea19SZane Shelley    Priority:        6
830dcc430aSPatrick VentureIndentCaseLabels: true
84dc24b2ecSPatrick WilliamsIndentExternBlock: NoIndent
8506136285SPatrick WilliamsIndentRequiresClause: true
860dcc430aSPatrick VentureIndentWidth:     4
870dcc430aSPatrick VentureIndentWrappedFunctionNames: true
88231ad0cdSPatrick WilliamsInsertNewlineAtEOF: true
89ac5d5445SBrad BishopKeepEmptyLinesAtTheStartOfBlocks: false
90a69289a9SPatrick WilliamsLambdaBodyIndentation: Signature
91231ad0cdSPatrick WilliamsLineEnding: LF
920dcc430aSPatrick VentureMacroBlockBegin: ''
930dcc430aSPatrick VentureMacroBlockEnd:   ''
940dcc430aSPatrick VentureMaxEmptyLinesToKeep: 1
950dcc430aSPatrick VentureNamespaceIndentation: None
960dcc430aSPatrick VentureObjCBlockIndentWidth: 2
970dcc430aSPatrick VentureObjCSpaceAfterProperty: false
980dcc430aSPatrick VentureObjCSpaceBeforeProtocolList: true
99e1a27147SPatrick WilliamsPackConstructorInitializers: BinPack
100ba68be6aSPatrick WilliamsPenaltyBreakAssignment: 25
101a69289a9SPatrick WilliamsPenaltyBreakBeforeFirstCallParameter: 50
1020dcc430aSPatrick VenturePenaltyBreakComment: 300
1030dcc430aSPatrick VenturePenaltyBreakFirstLessLess: 120
1040dcc430aSPatrick VenturePenaltyBreakString: 1000
105a69289a9SPatrick WilliamsPenaltyBreakTemplateDeclaration: 10
1060dcc430aSPatrick VenturePenaltyExcessCharacter: 1000000
107*57a48b21SPatrick WilliamsPenaltyReturnTypeOnItsOwnLine: 150
108a69289a9SPatrick WilliamsPenaltyIndentedWhitespace: 1
109e1a27147SPatrick WilliamsPointerAlignment: Left
110c742fe86SPatrick WilliamsQualifierAlignment: Left
111c742fe86SPatrick WilliamsReferenceAlignment: Left
1120dcc430aSPatrick VentureReflowComments:  true
11306136285SPatrick WilliamsRequiresClausePosition: OwnLine
114231ad0cdSPatrick WilliamsRequiresExpressionIndentation: Keyword
115e1a27147SPatrick WilliamsSortIncludes: CaseSensitive
1160dcc430aSPatrick VentureSortUsingDeclarations: true
1170dcc430aSPatrick VentureSpaceAfterCStyleCast: false
1189a71ea19SZane ShelleySpaceAfterTemplateKeyword: true
1190dcc430aSPatrick VentureSpaceBeforeAssignmentOperators: true
1209a71ea19SZane ShelleySpaceBeforeCpp11BracedList: false
1219a71ea19SZane ShelleySpaceBeforeCtorInitializerColon: true
1229a71ea19SZane ShelleySpaceBeforeInheritanceColon: true
1230dcc430aSPatrick VentureSpaceBeforeParens: ControlStatements
1249a71ea19SZane ShelleySpaceBeforeRangeBasedForLoopColon: true
1250dcc430aSPatrick VentureSpaceInEmptyParentheses: false
1260dcc430aSPatrick VentureSpacesBeforeTrailingComments: 1
127e1a27147SPatrick WilliamsSpacesInAngles: Never
1280dcc430aSPatrick VentureSpacesInContainerLiterals: true
1290dcc430aSPatrick VentureSpacesInCStyleCastParentheses: false
1300dcc430aSPatrick VentureSpacesInParentheses: false
1310dcc430aSPatrick VentureSpacesInSquareBrackets: false
13236d6f56fSPatrick WilliamsStandard:        Latest
1330dcc430aSPatrick VentureTabWidth:        4
1340dcc430aSPatrick VentureUseTab:          Never
1350dcc430aSPatrick Venture...
1360dcc430aSPatrick Venture
137