xref: /openbmc/docs/style/cpp/.clang-format (revision 36d6f56f229ac07e7aca9c6a6b1871ca5e945efd)
10dcc430aSPatrick Venture---
20dcc430aSPatrick VentureLanguage:        Cpp
30dcc430aSPatrick Venture# BasedOnStyle:  LLVM
40dcc430aSPatrick VentureAccessModifierOffset: -2
50dcc430aSPatrick VentureAlignAfterOpenBracket: Align
60dcc430aSPatrick VentureAlignConsecutiveAssignments: false
70dcc430aSPatrick VentureAlignConsecutiveDeclarations: false
89a71ea19SZane 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
199a71ea19SZane ShelleyAlwaysBreakTemplateDeclarations: Yes
200dcc430aSPatrick VentureBinPackArguments: true
210dcc430aSPatrick VentureBinPackParameters: true
220dcc430aSPatrick VentureBraceWrapping:
23b6de1960SPatrick Williams  AfterCaseLabel:  true
240dcc430aSPatrick Venture  AfterClass:      true
250dcc430aSPatrick Venture  AfterControlStatement: true
260dcc430aSPatrick Venture  AfterEnum:       true
270dcc430aSPatrick Venture  AfterFunction:   true
280dcc430aSPatrick Venture  AfterNamespace:  true
290dcc430aSPatrick Venture  AfterObjCDeclaration: true
300dcc430aSPatrick Venture  AfterStruct:     true
310dcc430aSPatrick Venture  AfterUnion:      true
329a71ea19SZane Shelley  AfterExternBlock: true
330dcc430aSPatrick Venture  BeforeCatch:     true
340dcc430aSPatrick Venture  BeforeElse:      true
350dcc430aSPatrick Venture  IndentBraces:    false
369a71ea19SZane Shelley  SplitEmptyFunction:   false
379a71ea19SZane Shelley  SplitEmptyRecord:     false
389a71ea19SZane Shelley  SplitEmptyNamespace:  false
390dcc430aSPatrick VentureBreakBeforeBinaryOperators: None
400dcc430aSPatrick VentureBreakBeforeBraces: Custom
410dcc430aSPatrick VentureBreakBeforeTernaryOperators: true
420dcc430aSPatrick VentureBreakConstructorInitializers: AfterColon
439a71ea19SZane ShelleyBreakInheritanceList: AfterColon
449a71ea19SZane ShelleyBreakStringLiterals: true
450dcc430aSPatrick VentureColumnLimit:     80
460dcc430aSPatrick VentureCommentPragmas:  '^ IWYU pragma:'
479a71ea19SZane ShelleyCompactNamespaces: false
480dcc430aSPatrick VentureConstructorInitializerAllOnOneLineOrOnePerLine: false
490dcc430aSPatrick VentureConstructorInitializerIndentWidth: 4
500dcc430aSPatrick VentureContinuationIndentWidth: 4
510dcc430aSPatrick VentureCpp11BracedListStyle: true
520dcc430aSPatrick VentureDerivePointerAlignment: false
530dcc430aSPatrick VenturePointerAlignment: Left
540dcc430aSPatrick VentureDisableFormat:   false
550dcc430aSPatrick VentureExperimentalAutoDetectBinPacking: false
560dcc430aSPatrick VentureFixNamespaceComments: true
570dcc430aSPatrick VentureForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
580dcc430aSPatrick VentureIncludeBlocks: Regroup
590dcc430aSPatrick VentureIncludeCategories:
600dcc430aSPatrick Venture  - Regex:           '^[<"](gtest|gmock)'
619a71ea19SZane Shelley    Priority:        7
620dcc430aSPatrick Venture  - Regex:           '^"config.h"'
630dcc430aSPatrick Venture    Priority:        -1
649a71ea19SZane Shelley  - Regex:           '^".*\.h"'
650dcc430aSPatrick Venture    Priority:        1
669a71ea19SZane Shelley  - Regex:           '^".*\.hpp"'
670dcc430aSPatrick Venture    Priority:        2
689a71ea19SZane Shelley  - Regex:           '^<.*\.h>'
690dcc430aSPatrick Venture    Priority:        3
709a71ea19SZane Shelley  - Regex:           '^<.*\.hpp>'
710dcc430aSPatrick Venture    Priority:        4
729a71ea19SZane Shelley  - Regex:           '^<.*'
739a71ea19SZane Shelley    Priority:        5
749a71ea19SZane Shelley  - Regex:           '.*'
759a71ea19SZane Shelley    Priority:        6
760dcc430aSPatrick VentureIndentCaseLabels: true
770dcc430aSPatrick VentureIndentWidth:     4
780dcc430aSPatrick VentureIndentWrappedFunctionNames: true
790dcc430aSPatrick VentureKeepEmptyLinesAtTheStartOfBlocks: true
800dcc430aSPatrick VentureMacroBlockBegin: ''
810dcc430aSPatrick VentureMacroBlockEnd:   ''
820dcc430aSPatrick VentureMaxEmptyLinesToKeep: 1
830dcc430aSPatrick VentureNamespaceIndentation: None
840dcc430aSPatrick VentureObjCBlockIndentWidth: 2
850dcc430aSPatrick VentureObjCSpaceAfterProperty: false
860dcc430aSPatrick VentureObjCSpaceBeforeProtocolList: true
870dcc430aSPatrick VenturePenaltyBreakBeforeFirstCallParameter: 19
880dcc430aSPatrick VenturePenaltyBreakComment: 300
890dcc430aSPatrick VenturePenaltyBreakFirstLessLess: 120
900dcc430aSPatrick VenturePenaltyBreakString: 1000
910dcc430aSPatrick VenturePenaltyExcessCharacter: 1000000
920dcc430aSPatrick VenturePenaltyReturnTypeOnItsOwnLine: 60
930dcc430aSPatrick VentureReflowComments:  true
940dcc430aSPatrick VentureSortIncludes:    true
950dcc430aSPatrick VentureSortUsingDeclarations: true
960dcc430aSPatrick VentureSpaceAfterCStyleCast: false
979a71ea19SZane ShelleySpaceAfterTemplateKeyword: true
980dcc430aSPatrick VentureSpaceBeforeAssignmentOperators: true
999a71ea19SZane ShelleySpaceBeforeCpp11BracedList: false
1009a71ea19SZane ShelleySpaceBeforeCtorInitializerColon: true
1019a71ea19SZane ShelleySpaceBeforeInheritanceColon: true
1020dcc430aSPatrick VentureSpaceBeforeParens: ControlStatements
1039a71ea19SZane ShelleySpaceBeforeRangeBasedForLoopColon: true
1040dcc430aSPatrick VentureSpaceInEmptyParentheses: false
1050dcc430aSPatrick VentureSpacesBeforeTrailingComments: 1
1060dcc430aSPatrick VentureSpacesInAngles:  false
1070dcc430aSPatrick VentureSpacesInContainerLiterals: true
1080dcc430aSPatrick VentureSpacesInCStyleCastParentheses: false
1090dcc430aSPatrick VentureSpacesInParentheses: false
1100dcc430aSPatrick VentureSpacesInSquareBrackets: false
111*36d6f56fSPatrick WilliamsStandard:        Latest
1120dcc430aSPatrick VentureTabWidth:        4
1130dcc430aSPatrick VentureUseTab:          Never
1140dcc430aSPatrick Venture...
1150dcc430aSPatrick Venture
116