Skip to content

Commit bfa5417

Browse files
ladyada-piclawclawpiladyada
authored
Run clang-format (#505)
* Run clang-format Co-authored-by: ladyada <limor@ladyada.net> * Fix destructor spacing for CI clang-format Co-authored-by: ladyada <limor@ladyada.net> * Revert .ino formatting — keep examples as-is Co-authored-by: ladyada <limor@ladyada.net> --------- Co-authored-by: clawpi <clawpi@adafruit.com> Co-authored-by: ladyada <limor@ladyada.net>
1 parent e4df4cc commit bfa5417

File tree

1 file changed

+239
-0
lines changed

1 file changed

+239
-0
lines changed

.clang-format

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
Language: Cpp
2+
# BasedOnStyle: LLVM
3+
AccessModifierOffset: -2
4+
AlignAfterOpenBracket: Align
5+
AlignArrayOfStructures: None
6+
AlignConsecutiveAssignments:
7+
Enabled: false
8+
AcrossEmptyLines: false
9+
AcrossComments: false
10+
AlignCompound: false
11+
PadOperators: true
12+
AlignConsecutiveBitFields:
13+
Enabled: false
14+
AcrossEmptyLines: false
15+
AcrossComments: false
16+
AlignCompound: false
17+
PadOperators: false
18+
AlignConsecutiveDeclarations:
19+
Enabled: false
20+
AcrossEmptyLines: false
21+
AcrossComments: false
22+
AlignCompound: false
23+
PadOperators: false
24+
AlignConsecutiveMacros:
25+
Enabled: false
26+
AcrossEmptyLines: false
27+
AcrossComments: false
28+
AlignCompound: false
29+
PadOperators: false
30+
AlignConsecutiveShortCaseStatements:
31+
Enabled: false
32+
AcrossEmptyLines: false
33+
AcrossComments: false
34+
AlignCaseColons: false
35+
AlignEscapedNewlines: Right
36+
AlignOperands: Align
37+
AlignTrailingComments:
38+
Kind: Always
39+
OverEmptyLines: 0
40+
AllowAllArgumentsOnNextLine: true
41+
AllowAllParametersOfDeclarationOnNextLine: true
42+
AllowBreakBeforeNoexceptSpecifier: Never
43+
AllowShortBlocksOnASingleLine: Never
44+
AllowShortCaseLabelsOnASingleLine: false
45+
AllowShortCompoundRequirementOnASingleLine: true
46+
AllowShortEnumsOnASingleLine: true
47+
AllowShortFunctionsOnASingleLine: All
48+
AllowShortIfStatementsOnASingleLine: Never
49+
AllowShortLambdasOnASingleLine: All
50+
AllowShortLoopsOnASingleLine: false
51+
AlwaysBreakAfterDefinitionReturnType: None
52+
AlwaysBreakAfterReturnType: None
53+
AlwaysBreakBeforeMultilineStrings: false
54+
AlwaysBreakTemplateDeclarations: MultiLine
55+
AttributeMacros:
56+
- __capability
57+
BinPackArguments: true
58+
BinPackParameters: true
59+
BitFieldColonSpacing: Both
60+
BraceWrapping:
61+
AfterCaseLabel: false
62+
AfterClass: false
63+
AfterControlStatement: Never
64+
AfterEnum: false
65+
AfterExternBlock: false
66+
AfterFunction: false
67+
AfterNamespace: false
68+
AfterObjCDeclaration: false
69+
AfterStruct: false
70+
AfterUnion: false
71+
BeforeCatch: false
72+
BeforeElse: false
73+
BeforeLambdaBody: false
74+
BeforeWhile: false
75+
IndentBraces: false
76+
SplitEmptyFunction: true
77+
SplitEmptyRecord: true
78+
SplitEmptyNamespace: true
79+
BreakAdjacentStringLiterals: true
80+
BreakAfterAttributes: Leave
81+
BreakAfterJavaFieldAnnotations: false
82+
BreakArrays: true
83+
BreakBeforeBinaryOperators: None
84+
BreakBeforeConceptDeclarations: Always
85+
BreakBeforeBraces: Attach
86+
BreakBeforeInlineASMColon: OnlyMultiline
87+
BreakBeforeTernaryOperators: true
88+
BreakConstructorInitializers: BeforeColon
89+
BreakInheritanceList: BeforeColon
90+
BreakStringLiterals: true
91+
ColumnLimit: 80
92+
CommentPragmas: '^ IWYU pragma:'
93+
CompactNamespaces: false
94+
ConstructorInitializerIndentWidth: 4
95+
ContinuationIndentWidth: 4
96+
Cpp11BracedListStyle: true
97+
DerivePointerAlignment: false
98+
DisableFormat: false
99+
EmptyLineAfterAccessModifier: Never
100+
EmptyLineBeforeAccessModifier: LogicalBlock
101+
ExperimentalAutoDetectBinPacking: false
102+
FixNamespaceComments: true
103+
ForEachMacros:
104+
- foreach
105+
- Q_FOREACH
106+
- BOOST_FOREACH
107+
IfMacros:
108+
- KJ_IF_MAYBE
109+
IncludeBlocks: Preserve
110+
IncludeCategories:
111+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
112+
Priority: 2
113+
SortPriority: 0
114+
CaseSensitive: false
115+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
116+
Priority: 3
117+
SortPriority: 0
118+
CaseSensitive: false
119+
- Regex: '.*'
120+
Priority: 1
121+
SortPriority: 0
122+
CaseSensitive: false
123+
IncludeIsMainRegex: '(Test)?$'
124+
IncludeIsMainSourceRegex: ''
125+
IndentAccessModifiers: false
126+
IndentCaseBlocks: false
127+
IndentCaseLabels: false
128+
IndentExternBlock: AfterExternBlock
129+
IndentGotoLabels: true
130+
IndentPPDirectives: None
131+
IndentRequiresClause: true
132+
IndentWidth: 2
133+
IndentWrappedFunctionNames: false
134+
InsertBraces: false
135+
InsertNewlineAtEOF: false
136+
InsertTrailingCommas: None
137+
IntegerLiteralSeparator:
138+
Binary: 0
139+
BinaryMinDigits: 0
140+
Decimal: 0
141+
DecimalMinDigits: 0
142+
Hex: 0
143+
HexMinDigits: 0
144+
JavaScriptQuotes: Leave
145+
JavaScriptWrapImports: true
146+
KeepEmptyLinesAtTheStartOfBlocks: true
147+
KeepEmptyLinesAtEOF: false
148+
LambdaBodyIndentation: Signature
149+
LineEnding: DeriveLF
150+
MacroBlockBegin: ''
151+
MacroBlockEnd: ''
152+
MaxEmptyLinesToKeep: 1
153+
NamespaceIndentation: None
154+
ObjCBinPackProtocolList: Auto
155+
ObjCBlockIndentWidth: 2
156+
ObjCBreakBeforeNestedBlockParam: true
157+
ObjCSpaceAfterProperty: false
158+
ObjCSpaceBeforeProtocolList: true
159+
PackConstructorInitializers: BinPack
160+
PenaltyBreakAssignment: 2
161+
PenaltyBreakBeforeFirstCallParameter: 19
162+
PenaltyBreakComment: 300
163+
PenaltyBreakFirstLessLess: 120
164+
PenaltyBreakOpenParenthesis: 0
165+
PenaltyBreakScopeResolution: 500
166+
PenaltyBreakString: 1000
167+
PenaltyBreakTemplateDeclaration: 10
168+
PenaltyExcessCharacter: 1000000
169+
PenaltyIndentedWhitespace: 0
170+
PenaltyReturnTypeOnItsOwnLine: 60
171+
PointerAlignment: Right
172+
PPIndentWidth: -1
173+
QualifierAlignment: Leave
174+
ReferenceAlignment: Pointer
175+
ReflowComments: true
176+
RemoveBracesLLVM: false
177+
RemoveParentheses: Leave
178+
RemoveSemicolon: false
179+
RequiresClausePosition: OwnLine
180+
RequiresExpressionIndentation: OuterScope
181+
SeparateDefinitionBlocks: Leave
182+
ShortNamespaceLines: 1
183+
SkipMacroDefinitionBody: false
184+
SortIncludes: CaseSensitive
185+
SortJavaStaticImport: Before
186+
SortUsingDeclarations: LexicographicNumeric
187+
SpaceAfterCStyleCast: false
188+
SpaceAfterLogicalNot: false
189+
SpaceAfterTemplateKeyword: true
190+
SpaceAroundPointerQualifiers: Default
191+
SpaceBeforeAssignmentOperators: true
192+
SpaceBeforeCaseColon: false
193+
SpaceBeforeCpp11BracedList: false
194+
SpaceBeforeCtorInitializerColon: true
195+
SpaceBeforeInheritanceColon: true
196+
SpaceBeforeJsonColon: false
197+
SpaceBeforeParens: ControlStatements
198+
SpaceBeforeParensOptions:
199+
AfterControlStatements: true
200+
AfterForeachMacros: true
201+
AfterFunctionDefinitionName: false
202+
AfterFunctionDeclarationName: false
203+
AfterIfMacros: true
204+
AfterOverloadedOperator: false
205+
AfterPlacementOperator: true
206+
AfterRequiresInClause: false
207+
AfterRequiresInExpression: false
208+
BeforeNonEmptyParentheses: false
209+
SpaceBeforeRangeBasedForLoopColon: true
210+
SpaceBeforeSquareBrackets: false
211+
SpaceInEmptyBlock: false
212+
SpacesBeforeTrailingComments: 1
213+
SpacesInAngles: Never
214+
SpacesInContainerLiterals: true
215+
SpacesInLineCommentPrefix:
216+
Minimum: 1
217+
Maximum: -1
218+
SpacesInParens: Never
219+
SpacesInParensOptions:
220+
InCStyleCasts: false
221+
InConditionalStatements: false
222+
InEmptyParentheses: false
223+
Other: false
224+
SpacesInSquareBrackets: false
225+
Standard: Latest
226+
StatementAttributeLikeMacros:
227+
- Q_EMIT
228+
StatementMacros:
229+
- Q_UNUSED
230+
- QT_REQUIRE_VERSION
231+
TabWidth: 8
232+
UseTab: Never
233+
VerilogBreakBetweenInstancePorts: true
234+
WhitespaceSensitiveMacros:
235+
- BOOST_PP_STRINGIZE
236+
- CF_SWIFT_NAME
237+
- NS_SWIFT_NAME
238+
- PP_STRINGIZE
239+
- STRINGIZE

0 commit comments

Comments
 (0)