Skip to content

Commit 31b4f4e

Browse files
authored
Merge pull request #178 from ladyada-piclaw/fix-ci-clang-format
Fix clang-format CI errors
2 parents e38bc30 + 0e19071 commit 31b4f4e

File tree

32 files changed

+670
-476
lines changed

32 files changed

+670
-476
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

examples/adafruitio_00_publish/adafruitio_00_publish.ino

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@ void setup() {
3131
Serial.begin(115200);
3232

3333
// wait for serial monitor to open
34-
while(! Serial);
34+
while (!Serial)
35+
;
3536

3637
Serial.print("Connecting to Adafruit IO");
3738

3839
// connect to io.adafruit.com
3940
io.connect();
4041

4142
// wait for a connection
42-
while(io.status() < AIO_CONNECTED) {
43+
while (io.status() < AIO_CONNECTED) {
4344
Serial.print(".");
4445
delay(500);
4546
}
4647

4748
// we are connected
4849
Serial.println();
4950
Serial.println(io.statusText());
50-
5151
}
5252

5353
void loop() {
@@ -70,5 +70,4 @@ void loop() {
7070
// between feed->save events. In this example, we will wait three seconds
7171
// (1000 milliseconds == 1 second) during each loop.
7272
delay(3000);
73-
7473
}

examples/adafruitio_01_subscribe/adafruitio_01_subscribe.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ void setup() {
2828
Serial.begin(115200);
2929

3030
// wait for serial monitor to open
31-
while(! Serial);
31+
while (!Serial)
32+
;
3233

3334
Serial.print("Connecting to Adafruit IO");
3435

@@ -44,7 +45,7 @@ void setup() {
4445
// wait for an MQTT connection
4546
// NOTE: when blending the HTTP and MQTT API, always use the mqttStatus
4647
// method to check on MQTT connection status specifically
47-
while(io.mqttStatus() < AIO_CONNECTED) {
48+
while (io.mqttStatus() < AIO_CONNECTED) {
4849
Serial.print(".");
4950
delay(500);
5051
}
@@ -57,7 +58,6 @@ void setup() {
5758
// we are connected
5859
Serial.println();
5960
Serial.println(io.statusText());
60-
6161
}
6262

6363
void loop() {
@@ -70,7 +70,6 @@ void loop() {
7070

7171
// Because this sketch isn't publishing, we don't need
7272
// a delay() in the main program loop.
73-
7473
}
7574

7675
// this function is called whenever a 'counter' message
@@ -80,5 +79,4 @@ void handleMessage(AdafruitIO_Data *data) {
8079

8180
Serial.print("received <- ");
8281
Serial.println(data->value());
83-
8482
}

examples/adafruitio_02_pubsub/adafruitio_02_pubsub.ino

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ void setup() {
4444
Serial.begin(115200);
4545

4646
// wait for serial monitor to open
47-
while(! Serial);
47+
while (!Serial)
48+
;
4849

4950
Serial.print("Connecting to Adafruit IO");
5051

@@ -58,7 +59,7 @@ void setup() {
5859
counter->onMessage(handleMessage);
5960

6061
// wait for a connection
61-
while(io.status() < AIO_CONNECTED) {
62+
while (io.status() < AIO_CONNECTED) {
6263
Serial.print(".");
6364
delay(500);
6465
}
@@ -67,7 +68,6 @@ void setup() {
6768
Serial.println();
6869
Serial.println(io.statusText());
6970
counter->get();
70-
7171
}
7272

7373
void loop() {
@@ -90,7 +90,6 @@ void loop() {
9090
// after publishing, store the current time
9191
lastUpdate = millis();
9292
}
93-
9493
}
9594

9695
// this function is called whenever a 'counter' message
@@ -100,5 +99,4 @@ void handleMessage(AdafruitIO_Data *data) {
10099

101100
Serial.print("received <- ");
102101
Serial.println(data->value());
103-
104102
}

0 commit comments

Comments
 (0)