1
1
---
2
2
# Copyright © 2023 Alexandre Coderre-Chabot
3
3
#
4
- # This file is licensed under the MIT license. For more information, visit:
5
- # https://mit-license.org
4
+ # https://github.com/acodcha/clang-format-tidy
6
5
#
7
- # Permission is hereby granted, free of charge, to any person obtaining a copy
8
- # of this software and associated documentation files (the "Software"), to deal
9
- # in the Software without restriction, including without limitation the rights
10
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- # copies of the Software, and to permit persons to whom the Software is
12
- # furnished to do so, subject to the following conditions:
13
- # - The above copyright notice and this permission notice shall be included in
14
- # all copies or substantial portions of the Software.
15
- # - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
- # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
- # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
- # DEALINGS IN THE SOFTWARE.
6
+ # This file is licensed under the MIT license (https://mit-license.org). Permission is hereby
7
+ # granted, free of charge, to any person obtaining a copy of this software and associated
8
+ # documentation files (the "Software"), to deal in the Software without restriction, including
9
+ # without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
+ # sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
11
+ # subject to the following conditions:
12
+ # - The above copyright notice and this permission notice shall be included in all copies or
13
+ # substantial portions of the Software.
14
+ # - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
15
+ # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
16
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
17
+ # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
19
#
23
- # This file was originally obtained from:
24
- # https://github.com/acodcha/clang-format
25
- #
26
- # This is a style configuration file for use with LLVM's ClangFormat automatic
27
- # source code formatter. For more information about ClangFormat, visit:
28
- # https://clang.llvm.org/docs/ClangFormat.html
29
- #
30
- # This file is compatible with ClangFormat version 14.0.0 or any later version.
31
- # To format your source code files, copy this file to the root directory of your
32
- # source code repository, name it either '.clang-format' or '_clang-format', and
33
- # run:
20
+ # This is a configuration file for use with LLVM's ClangFormat automatic source code formatter
21
+ # (https://clang.llvm.org/docs/ClangFormat.html). This file is compatible with ClangFormat version
22
+ # 14.0.0 or any later version. To format your source code files, copy this file to the root
23
+ # directory of your source code repository, name it ".clang-format", and run:
34
24
# clang-format --style=file path/to/source/code/files
35
25
#
36
26
AccessModifierOffset : -2
@@ -57,7 +47,7 @@ AlwaysBreakAfterDefinitionReturnType: None
57
47
AlwaysBreakAfterReturnType : None
58
48
AlwaysBreakBeforeMultilineStrings : true
59
49
AlwaysBreakTemplateDeclarations : Yes
60
- AttributeMacros : [' __capability' ]
50
+ AttributeMacros : [" __capability" ]
61
51
BinPackArguments : true
62
52
BinPackParameters : true
63
53
BitFieldColonSpacing : Both
@@ -88,8 +78,8 @@ BreakBeforeTernaryOperators: false
88
78
BreakConstructorInitializers : BeforeColon
89
79
BreakInheritanceList : BeforeColon
90
80
BreakStringLiterals : true
91
- ColumnLimit : 80
92
- CommentPragmas : ' ^ IWYU pragma:'
81
+ ColumnLimit : 100
82
+ CommentPragmas : " ^ IWYU pragma:"
93
83
CompactNamespaces : false
94
84
ConstructorInitializerAllOnOneLineOrOnePerLine : false
95
85
ConstructorInitializerIndentWidth : 2
@@ -102,24 +92,20 @@ EmptyLineAfterAccessModifier: Never
102
92
EmptyLineBeforeAccessModifier : Always
103
93
ExperimentalAutoDetectBinPacking : false
104
94
FixNamespaceComments : true
105
- ForEachMacros : [' BOOST_FOREACH', ' FOREACH', ' foreach', ' Q_FOREACH' ]
106
- IfMacros : ['IF', ' KJ_IF_MAYBE' ]
95
+ ForEachMacros : [" BOOST_FOREACH", " FOREACH", " foreach", " Q_FOREACH" ]
96
+ IfMacros : ["IF", " KJ_IF_MAYBE" ]
107
97
IncludeBlocks : Regroup
108
98
IncludeCategories :
109
- - Regex : ' ^<.*\.h>' # C standard template library headers
110
- Priority : 1
111
- SortPriority : 1
112
- CaseSensitive : false
113
- - Regex : ' ^<.*' # C++ standard template library headers
114
- Priority : 2
115
- SortPriority : 2
116
- CaseSensitive : false
117
- - Regex : ' .*' # All other headers
118
- Priority : 3
119
- SortPriority : 3
120
- CaseSensitive : false
121
- IncludeIsMainRegex : ' ([-_](test|unittest))?$'
122
- IncludeIsMainSourceRegex : ' '
99
+ - Regex : " ^<.*"
100
+ Priority : 1
101
+ SortPriority : 1
102
+ CaseSensitive : false
103
+ - Regex : " .*"
104
+ Priority : 2
105
+ SortPriority : 2
106
+ CaseSensitive : false
107
+ IncludeIsMainRegex : " ([-_](test|unittest))?$"
108
+ IncludeIsMainSourceRegex : " "
123
109
IndentAccessModifiers : false
124
110
IndentCaseBlocks : true
125
111
IndentCaseLabels : true
@@ -135,8 +121,8 @@ JavaScriptQuotes: Leave
135
121
JavaScriptWrapImports : true
136
122
KeepEmptyLinesAtTheStartOfBlocks : false
137
123
LambdaBodyIndentation : Signature
138
- MacroBlockBegin : ' '
139
- MacroBlockEnd : ' '
124
+ MacroBlockBegin : " "
125
+ MacroBlockEnd : " "
140
126
MaxEmptyLinesToKeep : 1
141
127
NamespaceIndentation : None
142
128
NamespaceMacros : []
@@ -149,33 +135,33 @@ PPIndentWidth: 2
149
135
PackConstructorInitializers : BinPack
150
136
PenaltyBreakAssignment : 4
151
137
PenaltyBreakBeforeFirstCallParameter : 4
152
- PenaltyBreakComment : 16
138
+ PenaltyBreakComment : 8
153
139
PenaltyBreakFirstLessLess : 4
154
140
PenaltyBreakOpenParenthesis : 4
155
- PenaltyBreakString : 32
141
+ PenaltyBreakString : 100
156
142
PenaltyBreakTemplateDeclaration : 0
157
- PenaltyExcessCharacter : 1024
143
+ PenaltyExcessCharacter : 10000
158
144
PenaltyIndentedWhitespace : 1
159
- PenaltyReturnTypeOnItsOwnLine : 32
145
+ PenaltyReturnTypeOnItsOwnLine : 50
160
146
PointerAlignment : Left
161
147
QualifierAlignment : Left
162
148
RawStringFormats :
163
149
- Language : Cpp
164
- Delimiters : ['cc', 'CC', ' cpp', ' Cpp', ' CPP', ' c++', ' C++' ]
165
- CanonicalDelimiter : ' '
150
+ Delimiters : ["cc", "CC", " cpp", " Cpp", " CPP", " c++", " C++" ]
151
+ CanonicalDelimiter : " "
166
152
BasedOnStyle : Google
167
153
- Language : TextProto
168
- Delimiters : ['pb', 'PB', ' proto', ' PROTO' ]
154
+ Delimiters : ["pb", "PB", " proto", " PROTO" ]
169
155
EnclosingFunctions :
170
- - ' EqualsProto'
171
- - ' EquivToProto'
172
- - ' PARSE_PARTIAL_TEXT_PROTO'
173
- - ' PARSE_TEST_PROTO'
174
- - ' PARSE_TEXT_PROTO'
175
- - ' ParseTextOrDie'
176
- - ' ParseTextProtoOrDie'
177
- - ' ParseTestProto'
178
- - ' ParsePartialTestProto'
156
+ - " EqualsProto"
157
+ - " EquivToProto"
158
+ - " PARSE_PARTIAL_TEXT_PROTO"
159
+ - " PARSE_TEST_PROTO"
160
+ - " PARSE_TEXT_PROTO"
161
+ - " ParseTextOrDie"
162
+ - " ParseTextProtoOrDie"
163
+ - " ParseTestProto"
164
+ - " ParsePartialTestProto"
179
165
CanonicalDelimiter : pb
180
166
BasedOnStyle : Google
181
167
ReferenceAlignment : Left
@@ -219,15 +205,15 @@ SpacesInLineCommentPrefix:
219
205
SpacesInParentheses : false
220
206
SpacesInSquareBrackets : false
221
207
Standard : Latest
222
- StatementAttributeLikeMacros : [' Q_EMIT' ]
223
- StatementMacros : [' Q_UNUSED', ' QT_REQUIRE_VERSION' ]
208
+ StatementAttributeLikeMacros : [" Q_EMIT" ]
209
+ StatementMacros : [" Q_UNUSED", " QT_REQUIRE_VERSION" ]
224
210
TabWidth : 8
225
- TypenameMacros : [' STACK_OF', ' LIST' ]
211
+ TypenameMacros : [" STACK_OF", " LIST" ]
226
212
UseCRLF : false
227
213
UseTab : Never
228
214
WhitespaceSensitiveMacros :
229
- - ' STRINGIZE'
230
- - ' PP_STRINGIZE'
231
- - ' BOOST_PP_STRINGIZE'
232
- - ' NS_SWIFT_NAME'
233
- - ' CF_SWIFT_NAME'
215
+ - " STRINGIZE"
216
+ - " PP_STRINGIZE"
217
+ - " BOOST_PP_STRINGIZE"
218
+ - " NS_SWIFT_NAME"
219
+ - " CF_SWIFT_NAME"
0 commit comments