forked from zrythm/zrythm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
146 lines (146 loc) · 4.32 KB
/
.clang-format
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# SPDX-FileCopyrightText: © 2022 Alexandros Theodotou
# SPDX-License-Identifier: FSFAP
---
BasedOnStyle: GNU
---
Language: Cpp
AccessModifierOffset: -2
# FIXME set to BlockIndent on clang-format 14
AlignAfterOpenBracket: AlwaysBreak
AlignArrayOfStructures: Left
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: DontAlign
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: All
AlwaysBreakAfterReturnType: TopLevel
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros: ['COLD', 'NONNULL_ARGS', 'NONNULL', 'HOT', 'WARN_UNUSED_RESULT', 'PURE']
BinPackArguments: true
BinPackParameters: false
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
# This is often beneficial to be on a single line
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: true
IndentBraces: true
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeConceptDeclarations: true
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakStringLiterals: false
ContinuationIndentWidth: 2
ColumnLimit: 62
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
FixNamespaceComments: false
ForEachMacros:
- LILV_FOREACH
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"(zrythm-|zrythm-test-)config\.h"$'
Priority: -10
CaseSensitive: true
- Regex: '^<(windows|shlobj).h>$'
Priority: -6
CaseSensitive: false
- Regex: '^<(assert|errno|inttypes|signal|string|std.+|sys/.+|math)\.h>$'
Priority: -2
CaseSensitive: true
- Regex: '^"((audio|actions|dsp|plugins|settings|utils|gui)/.*|zrythm\.h|zrythm_app\.h|project\.h)'
Priority: 3
CaseSensitive: true
- Regex: '^<(((glib|gtk)/.*)|adwaita|glib|libpanel)\.h>$'
Priority: 4
- Regex: '^"(tests|helpers)/.*"$'
Priority: 5
- Regex: '.*'
Priority: 6
# don't use main includes
IncludeIsMainRegex: '^$'
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentGotoLabels: false
IndentPPDirectives: AfterHash
IndentWidth: 2
IndentWrappedFunctionNames: false
MaxEmptyLinesToKeep: 1
PenaltyBreakAssignment: 30
PenaltyBreakBeforeFirstCallParameter: 20
PenaltyBreakComment: 300
#enable after clang 14
#PenaltyBreakOpenParenthesis: 40
PenaltyBreakString: 1000
PenaltyExcessCharacter: 120
PenaltyIndentedWhitespace: 100
PenaltyReturnTypeOnItsOwnLine: 1
PointerAlignment: Middle
ReferenceAlignment: Right
ReflowComments: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAroundPointerQualifiers: Both
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeParens: Always
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: c++11
StatementMacros: []
TabWidth: 2
TypenameMacros: []
UseTab: Never
WhitespaceSensitiveMacros:
- G_DEFINE_QUARK
...