Skip to content

Commit 965917e

Browse files
committed
779 add ruff and clang-format configs, fix container
1 parent 141311b commit 965917e

File tree

9 files changed

+517
-45
lines changed

9 files changed

+517
-45
lines changed

.clang-format

Lines changed: 323 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,323 @@
1+
---
2+
# Based on Google
3+
Language: Cpp
4+
AccessModifierOffset: -1
5+
AlignAfterOpenBracket: Align
6+
AlignArrayOfStructures: None
7+
AlignConsecutiveAssignments:
8+
Enabled: false
9+
AcrossEmptyLines: false
10+
AcrossComments: false
11+
AlignCompound: false
12+
AlignFunctionDeclarations: false
13+
AlignFunctionPointers: false
14+
PadOperators: true
15+
AlignConsecutiveBitFields:
16+
Enabled: false
17+
AcrossEmptyLines: false
18+
AcrossComments: false
19+
AlignCompound: false
20+
AlignFunctionDeclarations: false
21+
AlignFunctionPointers: false
22+
PadOperators: false
23+
AlignConsecutiveDeclarations:
24+
Enabled: false
25+
AcrossEmptyLines: false
26+
AcrossComments: false
27+
AlignCompound: false
28+
AlignFunctionDeclarations: true
29+
AlignFunctionPointers: false
30+
PadOperators: false
31+
AlignConsecutiveMacros:
32+
Enabled: false
33+
AcrossEmptyLines: false
34+
AcrossComments: false
35+
AlignCompound: false
36+
AlignFunctionDeclarations: false
37+
AlignFunctionPointers: false
38+
PadOperators: false
39+
AlignConsecutiveShortCaseStatements:
40+
Enabled: false
41+
AcrossEmptyLines: false
42+
AcrossComments: false
43+
AlignCaseArrows: false
44+
AlignCaseColons: false
45+
AlignConsecutiveTableGenBreakingDAGArgColons:
46+
Enabled: false
47+
AcrossEmptyLines: false
48+
AcrossComments: false
49+
AlignCompound: false
50+
AlignFunctionDeclarations: false
51+
AlignFunctionPointers: false
52+
PadOperators: false
53+
AlignConsecutiveTableGenCondOperatorColons:
54+
Enabled: false
55+
AcrossEmptyLines: false
56+
AcrossComments: false
57+
AlignCompound: false
58+
AlignFunctionDeclarations: false
59+
AlignFunctionPointers: false
60+
PadOperators: false
61+
AlignConsecutiveTableGenDefinitionColons:
62+
Enabled: false
63+
AcrossEmptyLines: false
64+
AcrossComments: false
65+
AlignCompound: false
66+
AlignFunctionDeclarations: false
67+
AlignFunctionPointers: false
68+
PadOperators: false
69+
AlignEscapedNewlines: Left
70+
AlignOperands: Align
71+
AlignTrailingComments:
72+
Kind: Always
73+
OverEmptyLines: 0
74+
AllowAllArgumentsOnNextLine: true
75+
AllowAllParametersOfDeclarationOnNextLine: true
76+
AllowBreakBeforeNoexceptSpecifier: Never
77+
AllowShortBlocksOnASingleLine: Never
78+
AllowShortCaseExpressionOnASingleLine: true
79+
AllowShortCaseLabelsOnASingleLine: false
80+
AllowShortCompoundRequirementOnASingleLine: true
81+
AllowShortEnumsOnASingleLine: true
82+
AllowShortFunctionsOnASingleLine: All
83+
AllowShortIfStatementsOnASingleLine: WithoutElse
84+
AllowShortLambdasOnASingleLine: All
85+
AllowShortLoopsOnASingleLine: true
86+
AllowShortNamespacesOnASingleLine: false
87+
AlwaysBreakAfterDefinitionReturnType: None
88+
AlwaysBreakBeforeMultilineStrings: true
89+
AttributeMacros:
90+
- __capability
91+
BinPackArguments: true
92+
BinPackParameters: BinPack
93+
BitFieldColonSpacing: Both
94+
BraceWrapping:
95+
AfterCaseLabel: false
96+
AfterClass: false
97+
AfterControlStatement: Never
98+
AfterEnum: false
99+
AfterExternBlock: false
100+
AfterFunction: false
101+
AfterNamespace: false
102+
AfterObjCDeclaration: false
103+
AfterStruct: false
104+
AfterUnion: false
105+
BeforeCatch: false
106+
BeforeElse: false
107+
BeforeLambdaBody: false
108+
BeforeWhile: false
109+
IndentBraces: false
110+
SplitEmptyFunction: true
111+
SplitEmptyRecord: true
112+
SplitEmptyNamespace: true
113+
BreakAdjacentStringLiterals: true
114+
BreakAfterAttributes: Leave
115+
BreakAfterJavaFieldAnnotations: false
116+
BreakAfterReturnType: None
117+
BreakArrays: true
118+
BreakBeforeBinaryOperators: None
119+
BreakBeforeConceptDeclarations: Always
120+
BreakBeforeBraces: Attach
121+
BreakBeforeInlineASMColon: OnlyMultiline
122+
BreakBeforeTernaryOperators: true
123+
BreakBinaryOperations: Never
124+
BreakConstructorInitializers: BeforeColon
125+
BreakFunctionDefinitionParameters: false
126+
BreakInheritanceList: BeforeColon
127+
BreakStringLiterals: true
128+
BreakTemplateDeclarations: Yes
129+
ColumnLimit: 80
130+
CommentPragmas: '^ IWYU pragma:'
131+
CompactNamespaces: false
132+
ConstructorInitializerIndentWidth: 4
133+
ContinuationIndentWidth: 4
134+
Cpp11BracedListStyle: true
135+
DerivePointerAlignment: true
136+
DisableFormat: false
137+
EmptyLineAfterAccessModifier: Never
138+
EmptyLineBeforeAccessModifier: LogicalBlock
139+
ExperimentalAutoDetectBinPacking: false
140+
FixNamespaceComments: true
141+
ForEachMacros:
142+
- foreach
143+
- Q_FOREACH
144+
- BOOST_FOREACH
145+
IfMacros:
146+
- KJ_IF_MAYBE
147+
IncludeBlocks: Regroup
148+
IncludeCategories:
149+
- Regex: '^<ext/.*\.h>'
150+
Priority: 2
151+
SortPriority: 0
152+
CaseSensitive: false
153+
- Regex: '^<.*\.h>'
154+
Priority: 1
155+
SortPriority: 0
156+
CaseSensitive: false
157+
- Regex: '^<.*'
158+
Priority: 2
159+
SortPriority: 0
160+
CaseSensitive: false
161+
- Regex: '.*'
162+
Priority: 3
163+
SortPriority: 0
164+
CaseSensitive: false
165+
IncludeIsMainRegex: '([-_](test|unittest))?$'
166+
IncludeIsMainSourceRegex: ''
167+
IndentAccessModifiers: false
168+
IndentCaseBlocks: false
169+
IndentCaseLabels: true
170+
IndentExportBlock: true
171+
IndentExternBlock: AfterExternBlock
172+
IndentGotoLabels: true
173+
IndentPPDirectives: None
174+
IndentRequiresClause: true
175+
IndentWidth: 2
176+
IndentWrappedFunctionNames: false
177+
InsertBraces: false
178+
InsertNewlineAtEOF: false
179+
InsertTrailingCommas: None
180+
IntegerLiteralSeparator:
181+
Binary: 0
182+
BinaryMinDigits: 0
183+
Decimal: 0
184+
DecimalMinDigits: 0
185+
Hex: 0
186+
HexMinDigits: 0
187+
JavaScriptQuotes: Leave
188+
JavaScriptWrapImports: true
189+
KeepEmptyLines:
190+
AtEndOfFile: false
191+
AtStartOfBlock: false
192+
AtStartOfFile: true
193+
KeepFormFeed: false
194+
LambdaBodyIndentation: Signature
195+
LineEnding: DeriveLF
196+
MacroBlockBegin: ''
197+
MacroBlockEnd: ''
198+
MainIncludeChar: Quote
199+
MaxEmptyLinesToKeep: 1
200+
NamespaceIndentation: None
201+
ObjCBinPackProtocolList: Never
202+
ObjCBlockIndentWidth: 2
203+
ObjCBreakBeforeNestedBlockParam: true
204+
ObjCSpaceAfterProperty: false
205+
ObjCSpaceBeforeProtocolList: true
206+
PackConstructorInitializers: NextLine
207+
PenaltyBreakAssignment: 2
208+
PenaltyBreakBeforeFirstCallParameter: 1
209+
PenaltyBreakBeforeMemberAccess: 150
210+
PenaltyBreakComment: 300
211+
PenaltyBreakFirstLessLess: 120
212+
PenaltyBreakOpenParenthesis: 0
213+
PenaltyBreakScopeResolution: 500
214+
PenaltyBreakString: 1000
215+
PenaltyBreakTemplateDeclaration: 10
216+
PenaltyExcessCharacter: 1000000
217+
PenaltyIndentedWhitespace: 0
218+
PenaltyReturnTypeOnItsOwnLine: 200
219+
PointerAlignment: Left
220+
PPIndentWidth: -1
221+
QualifierAlignment: Leave
222+
RawStringFormats:
223+
- Language: Cpp
224+
Delimiters:
225+
- cc
226+
- CC
227+
- cpp
228+
- Cpp
229+
- CPP
230+
- 'c++'
231+
- 'C++'
232+
CanonicalDelimiter: ''
233+
BasedOnStyle: google
234+
- Language: TextProto
235+
Delimiters:
236+
- pb
237+
- PB
238+
- proto
239+
- PROTO
240+
EnclosingFunctions:
241+
- EqualsProto
242+
- EquivToProto
243+
- PARSE_PARTIAL_TEXT_PROTO
244+
- PARSE_TEST_PROTO
245+
- PARSE_TEXT_PROTO
246+
- ParseTextOrDie
247+
- ParseTextProtoOrDie
248+
- ParseTestProto
249+
- ParsePartialTestProto
250+
CanonicalDelimiter: pb
251+
BasedOnStyle: google
252+
ReferenceAlignment: Pointer
253+
ReflowComments: Always
254+
RemoveBracesLLVM: false
255+
RemoveEmptyLinesInUnwrappedLines: false
256+
RemoveParentheses: Leave
257+
RemoveSemicolon: false
258+
RequiresClausePosition: OwnLine
259+
RequiresExpressionIndentation: OuterScope
260+
SeparateDefinitionBlocks: Leave
261+
ShortNamespaceLines: 1
262+
SkipMacroDefinitionBody: false
263+
SortIncludes: CaseSensitive
264+
SortJavaStaticImport: Before
265+
SortUsingDeclarations: LexicographicNumeric
266+
SpaceAfterCStyleCast: false
267+
SpaceAfterLogicalNot: false
268+
SpaceAfterTemplateKeyword: true
269+
SpaceAroundPointerQualifiers: Default
270+
SpaceBeforeAssignmentOperators: true
271+
SpaceBeforeCaseColon: false
272+
SpaceBeforeCpp11BracedList: false
273+
SpaceBeforeCtorInitializerColon: true
274+
SpaceBeforeInheritanceColon: true
275+
SpaceBeforeJsonColon: false
276+
SpaceBeforeParens: ControlStatements
277+
SpaceBeforeParensOptions:
278+
AfterControlStatements: true
279+
AfterForeachMacros: true
280+
AfterFunctionDefinitionName: false
281+
AfterFunctionDeclarationName: false
282+
AfterIfMacros: true
283+
AfterOverloadedOperator: false
284+
AfterPlacementOperator: true
285+
AfterRequiresInClause: false
286+
AfterRequiresInExpression: false
287+
BeforeNonEmptyParentheses: false
288+
SpaceBeforeRangeBasedForLoopColon: true
289+
SpaceBeforeSquareBrackets: false
290+
SpaceInEmptyBlock: false
291+
SpacesBeforeTrailingComments: 2
292+
SpacesInAngles: Never
293+
SpacesInContainerLiterals: true
294+
SpacesInLineCommentPrefix:
295+
Minimum: 1
296+
Maximum: -1
297+
SpacesInParens: Never
298+
SpacesInParensOptions:
299+
ExceptDoubleParentheses: false
300+
InCStyleCasts: false
301+
InConditionalStatements: false
302+
InEmptyParentheses: false
303+
Other: false
304+
SpacesInSquareBrackets: false
305+
Standard: Auto
306+
StatementAttributeLikeMacros:
307+
- Q_EMIT
308+
StatementMacros:
309+
- Q_UNUSED
310+
- QT_REQUIRE_VERSION
311+
TableGenBreakInsideDAGArg: DontBreak
312+
TabWidth: 4
313+
UseTab: Never
314+
VerilogBreakBetweenInstancePorts: true
315+
WhitespaceSensitiveMacros:
316+
- BOOST_PP_STRINGIZE
317+
- CF_SWIFT_NAME
318+
- NS_SWIFT_NAME
319+
- PP_STRINGIZE
320+
- STRINGIZE
321+
WrapNamespaceBodyWithEmptyLines: Leave
322+
...
323+

0 commit comments

Comments
 (0)