xref: /openbmc/docs/style/cpp/.clang-format (revision 9a71ea19d19a88640f8c8ab364adfff91a19e8b9)
10dcc430aSPatrick Venture---
20dcc430aSPatrick VentureLanguage:        Cpp
30dcc430aSPatrick Venture# BasedOnStyle:  LLVM
40dcc430aSPatrick VentureAccessModifierOffset: -2
50dcc430aSPatrick VentureAlignAfterOpenBracket: Align
60dcc430aSPatrick VentureAlignConsecutiveAssignments: false
70dcc430aSPatrick VentureAlignConsecutiveDeclarations: false
8*9a71ea19SZane ShelleyAlignEscapedNewlines: Right
90dcc430aSPatrick VentureAlignOperands:   true
100dcc430aSPatrick VentureAlignTrailingComments: true
110dcc430aSPatrick VentureAllowAllParametersOfDeclarationOnNextLine: true
120dcc430aSPatrick VentureAllowShortBlocksOnASingleLine: false
130dcc430aSPatrick VentureAllowShortCaseLabelsOnASingleLine: false
140dcc430aSPatrick VentureAllowShortFunctionsOnASingleLine: None
150dcc430aSPatrick VentureAllowShortIfStatementsOnASingleLine: false
160dcc430aSPatrick VentureAllowShortLoopsOnASingleLine: false
170dcc430aSPatrick VentureAlwaysBreakAfterReturnType: None
180dcc430aSPatrick VentureAlwaysBreakBeforeMultilineStrings: false
19*9a71ea19SZane ShelleyAlwaysBreakTemplateDeclarations: Yes
200dcc430aSPatrick VentureBinPackArguments: true
210dcc430aSPatrick VentureBinPackParameters: true
220dcc430aSPatrick VentureBraceWrapping:
230dcc430aSPatrick Venture  AfterClass:      true
240dcc430aSPatrick Venture  AfterControlStatement: true
250dcc430aSPatrick Venture  AfterEnum:       true
260dcc430aSPatrick Venture  AfterFunction:   true
270dcc430aSPatrick Venture  AfterNamespace:  true
280dcc430aSPatrick Venture  AfterObjCDeclaration: true
290dcc430aSPatrick Venture  AfterStruct:     true
300dcc430aSPatrick Venture  AfterUnion:      true
31*9a71ea19SZane Shelley  AfterExternBlock: true
320dcc430aSPatrick Venture  BeforeCatch:     true
330dcc430aSPatrick Venture  BeforeElse:      true
340dcc430aSPatrick Venture  IndentBraces:    false
35*9a71ea19SZane Shelley  SplitEmptyFunction:   false
36*9a71ea19SZane Shelley  SplitEmptyRecord:     false
37*9a71ea19SZane Shelley  SplitEmptyNamespace:  false
380dcc430aSPatrick VentureBreakBeforeBinaryOperators: None
390dcc430aSPatrick VentureBreakBeforeBraces: Custom
400dcc430aSPatrick VentureBreakBeforeTernaryOperators: true
410dcc430aSPatrick VentureBreakConstructorInitializers: AfterColon
42*9a71ea19SZane ShelleyBreakInheritanceList: AfterColon
43*9a71ea19SZane ShelleyBreakStringLiterals: true
440dcc430aSPatrick VentureColumnLimit:     80
450dcc430aSPatrick VentureCommentPragmas:  '^ IWYU pragma:'
46*9a71ea19SZane ShelleyCompactNamespaces: false
470dcc430aSPatrick VentureConstructorInitializerAllOnOneLineOrOnePerLine: false
480dcc430aSPatrick VentureConstructorInitializerIndentWidth: 4
490dcc430aSPatrick VentureContinuationIndentWidth: 4
500dcc430aSPatrick VentureCpp11BracedListStyle: true
510dcc430aSPatrick VentureDerivePointerAlignment: false
520dcc430aSPatrick VenturePointerAlignment: Left
530dcc430aSPatrick VentureDisableFormat:   false
540dcc430aSPatrick VentureExperimentalAutoDetectBinPacking: false
550dcc430aSPatrick VentureFixNamespaceComments: true
560dcc430aSPatrick VentureForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
570dcc430aSPatrick VentureIncludeBlocks: Regroup
580dcc430aSPatrick VentureIncludeCategories:
590dcc430aSPatrick Venture  - Regex:           '^[<"](gtest|gmock)'
60*9a71ea19SZane Shelley    Priority:        7
610dcc430aSPatrick Venture  - Regex:           '^"config.h"'
620dcc430aSPatrick Venture    Priority:        -1
63*9a71ea19SZane Shelley  - Regex:           '^".*\.h"'
640dcc430aSPatrick Venture    Priority:        1
65*9a71ea19SZane Shelley  - Regex:           '^".*\.hpp"'
660dcc430aSPatrick Venture    Priority:        2
67*9a71ea19SZane Shelley  - Regex:           '^<.*\.h>'
680dcc430aSPatrick Venture    Priority:        3
69*9a71ea19SZane Shelley  - Regex:           '^<.*\.hpp>'
700dcc430aSPatrick Venture    Priority:        4
71*9a71ea19SZane Shelley  - Regex:           '^<.*'
72*9a71ea19SZane Shelley    Priority:        5
73*9a71ea19SZane Shelley  - Regex:           '.*'
74*9a71ea19SZane Shelley    Priority:        6
750dcc430aSPatrick VentureIndentCaseLabels: true
760dcc430aSPatrick VentureIndentWidth:     4
770dcc430aSPatrick VentureIndentWrappedFunctionNames: true
780dcc430aSPatrick VentureKeepEmptyLinesAtTheStartOfBlocks: true
790dcc430aSPatrick VentureMacroBlockBegin: ''
800dcc430aSPatrick VentureMacroBlockEnd:   ''
810dcc430aSPatrick VentureMaxEmptyLinesToKeep: 1
820dcc430aSPatrick VentureNamespaceIndentation: None
830dcc430aSPatrick VentureObjCBlockIndentWidth: 2
840dcc430aSPatrick VentureObjCSpaceAfterProperty: false
850dcc430aSPatrick VentureObjCSpaceBeforeProtocolList: true
860dcc430aSPatrick VenturePenaltyBreakBeforeFirstCallParameter: 19
870dcc430aSPatrick VenturePenaltyBreakComment: 300
880dcc430aSPatrick VenturePenaltyBreakFirstLessLess: 120
890dcc430aSPatrick VenturePenaltyBreakString: 1000
900dcc430aSPatrick VenturePenaltyExcessCharacter: 1000000
910dcc430aSPatrick VenturePenaltyReturnTypeOnItsOwnLine: 60
920dcc430aSPatrick VentureReflowComments:  true
930dcc430aSPatrick VentureSortIncludes:    true
940dcc430aSPatrick VentureSortUsingDeclarations: true
950dcc430aSPatrick VentureSpaceAfterCStyleCast: false
96*9a71ea19SZane ShelleySpaceAfterTemplateKeyword: true
970dcc430aSPatrick VentureSpaceBeforeAssignmentOperators: true
98*9a71ea19SZane ShelleySpaceBeforeCpp11BracedList: false
99*9a71ea19SZane ShelleySpaceBeforeCtorInitializerColon: true
100*9a71ea19SZane ShelleySpaceBeforeInheritanceColon: true
1010dcc430aSPatrick VentureSpaceBeforeParens: ControlStatements
102*9a71ea19SZane ShelleySpaceBeforeRangeBasedForLoopColon: true
1030dcc430aSPatrick VentureSpaceInEmptyParentheses: false
1040dcc430aSPatrick VentureSpacesBeforeTrailingComments: 1
1050dcc430aSPatrick VentureSpacesInAngles:  false
1060dcc430aSPatrick VentureSpacesInContainerLiterals: true
1070dcc430aSPatrick VentureSpacesInCStyleCastParentheses: false
1080dcc430aSPatrick VentureSpacesInParentheses: false
1090dcc430aSPatrick VentureSpacesInSquareBrackets: false
1100dcc430aSPatrick VentureStandard:        Cpp11
1110dcc430aSPatrick VentureTabWidth:        4
1120dcc430aSPatrick VentureUseTab:          Never
1130dcc430aSPatrick Venture...
1140dcc430aSPatrick Venture
115