aboutsummaryrefslogtreecommitdiffstats
path: root/build/config/tests/cpp_style/config.clang-format
blob: 7e1a57c1097d62cd0b4d7e2932ec7b9b7022a7ac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Language:        Cpp
AccessModifierOffset: -4
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: false
AlignEscapedNewlines: Left
AlignTrailingComments:
    Kind: Always
    OverEmptyLines: 0
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BinPackParameters: true
ColumnLimit:     0
ConstructorInitializerAllOnOneLineOrOnePerLine: false
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: All
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: Never
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
SpacesBeforeTrailingComments: 1
SpacesInSquareBrackets: false
Cpp11BracedListStyle: true
Standard:        c++20
IndentWidth:     4
TabWidth:        4
UseTab:          Never
BreakBeforeBraces: Attach

# NB: BraceWrapping has no effect unless BreakBeforeBraces is set to Custom
BraceWrapping:
 AfterClass: false
 AfterControlStatement: false
 AfterEnum: false
 AfterFunction: false
 AfterNamespace: false
 AfterObjCDeclaration: false
 AfterStruct: false
 AfterUnion: false
 BeforeCatch: false
 BeforeElse: false
 IndentBraces: true

SpacesInParentheses: false
SpacesInAngles:  false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas:  '^ IWYU pragma:'
ForEachMacros: [
    foreach,
    Q_FOREACH,
    BOOST_FOREACH,
    # Is not a foreach, but correct formatting is achieved
    Y_DEFER
]
IfMacros: [
    with_lock  # Is not an if, but correct formatting is achieved
]
SpaceBeforeParens: ControlStatements
DisableFormat:   false
SortIncludes: false
IndentPPDirectives: BeforeHash

SpaceBeforeInheritanceColon: false
NamespaceMacros: [Y_UNIT_TEST_SUITE, Y_UNIT_TEST]
AttributeMacros: [Y_PRINTF_FORMAT, Y_NO_SANITIZE, Y_FORCE_INLINE, Y_NO_INLINE, Y_WARN_UNUSED_RESULT, Y_HIDDEN, Y_PUBLIC, Y_PURE_FUNCTION]
IndentExternBlock: Indent
TypenameMacros: [Y_THREAD, Y_STATIC_THREAD, Y_POD_THREAD, Y_POD_STATIC_THREAD]
SpacesInLineCommentPrefix:
 Minimum: 0
 Maximum: -1