Skip to content

Commit 867697b

Browse files
authored
[Infra] Upgrade to clang-format16 (#10973)
1 parent 5bb05e0 commit 867697b

File tree

14 files changed

+22
-20
lines changed

14 files changed

+22
-20
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ To develop Firebase software, **install**:
132132
To install [clang-format] and [mint] using [Homebrew]:
133133

134134
```console
135-
brew install clang-format@15
135+
brew install clang-format@16
136136
brew install mint
137137
```
138138

Crashlytics/Crashlytics/Helpers/FIRCLSDefines.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
// These macros generate a function to force a symbol for the containing .o, to work around an issue
2424
// where strip will not strip debug information without a symbol to strip.
2525
#define DUMMY_FUNCTION_NAME(x) CONCAT(fircls_strip_this_, x)
26-
#define INJECT_STRIP_SYMBOL(x) \
27-
void DUMMY_FUNCTION_NAME(x)(void) {}
26+
#define INJECT_STRIP_SYMBOL(x) \
27+
void DUMMY_FUNCTION_NAME(x)(void) { \
28+
}
2829

2930
// These make some target os types available to previous versions of xcode that do not yet have them
3031
// in their SDKs

Crashlytics/Shared/FIRCLSMachO/FIRCLSCodeMapping.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ @interface FIRCLSCodeMapping () {
2222

2323
@implementation FIRCLSCodeMapping
2424

25-
+ (instancetype)mappingWithURL:(NSURL*)URL {
25+
+ (instancetype)mappingWithURL:(NSURL *)URL {
2626
return [[self alloc] initWithURL:URL];
2727
}
2828

29-
- (instancetype)initWithURL:(NSURL*)URL {
29+
- (instancetype)initWithURL:(NSURL *)URL {
3030
self = [super init];
3131
if (!self) {
3232
return nil;

Crashlytics/UnitTests/FIRCLSDwarfExpressionTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ - (void)testDwarfExpressionMachineInit {
131131
uint8_t fakeData;
132132
FIRCLSThreadContext registers;
133133

134-
XCTAssert(FIRCLSDwarfExpressionMachineInit(&machine, (void*)&fakeData, &registers, 42));
134+
XCTAssert(FIRCLSDwarfExpressionMachineInit(&machine, (void *)&fakeData, &registers, 42));
135135
XCTAssert(FIRCLSDwarfExpressionStackIsValid(&machine.stack));
136136

137137
XCTAssertEqual(FIRCLSDwarfExpressionStackPeek(&machine.stack), 42);

FirebaseDatabase/Tests/Helpers/SenTest+FWaiter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
@interface XCTest (FWaiter)
2020

2121
- (NSTimeInterval)waitUntil:(BOOL (^)(void))predicate;
22-
- (NSTimeInterval)waitUntil:(BOOL (^)(void))predicate description:(NSString*)desc;
22+
- (NSTimeInterval)waitUntil:(BOOL (^)(void))predicate description:(NSString *)desc;
2323
- (NSTimeInterval)waitUntil:(BOOL (^)(void))predicate timeout:(NSTimeInterval)seconds;
2424
- (NSTimeInterval)waitUntil:(BOOL (^)(void))predicate
2525
timeout:(NSTimeInterval)seconds
26-
description:(NSString*)desc;
26+
description:(NSString *)desc;
2727

2828
@end

FirebaseDatabase/Tests/Integration/FData.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ - (void)testWriteLeafNodeOverwriteAtParentMultipleTimesVerifyExpectedEvents {
328328
"already finished." /
329329
Users / runner / runners / 2.262.1 / work / firebase -
330330
ios - sdk / firebase - ios -
331-
sdk / Example / Database / Tests / Helpers / FEventTester.m : 123
331+
sdk / Example / Database / Tests / Helpers / FEventTester.m:
332+
123
332333
``` FTupleEventTypeString *recvd = [self.actualPathsAndEvents objectAtIndex:i];
333334
XCTAssertTrue([target isEqualTo:recvd], @"Expected %@ to match %@", target, recvd);
334335

FirebaseInstallations/Source/Tests/Integration/FIRInstallationsIntegrationTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
// Uncomment or set the flag in GCC_PREPROCESSOR_DEFINITIONS to enable integration tests.
18-
//#define FIR_INSTALLATIONS_INTEGRATION_TESTS_REQUIRED 1
18+
// #define FIR_INSTALLATIONS_INTEGRATION_TESTS_REQUIRED 1
1919

2020
// macOS requests a user password when accessing the Keychain for the first time,
2121
// so the tests may fail. Disable integration tests on macOS so far.

FirebaseRemoteConfig/Tests/Sample/RemoteConfigSampleApp/FRCLog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919

2020
+ (instancetype)sharedInstance;
2121

22-
- (void)setLogView:(UITextView*)view;
23-
- (void)logToConsole:(NSString*)text;
22+
- (void)setLogView:(UITextView *)view;
23+
- (void)logToConsole:(NSString *)text;
2424
@end

FirebaseRemoteConfig/Tests/Unit/RCNConfigAnalyticsTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#import <OCMock/OCMock.h>
1818
#import <XCTest/XCTest.h>
1919

20-
//#import "RCNConfigAnalytics.h"
20+
// #import "RCNConfigAnalytics.h"
2121

2222
@interface RCNConfigAnalyticsTest : XCTestCase {
2323
id _mockAnalytics;

FirebaseRemoteConfig/Tests/Unit/RCNRemoteConfig+FIRAppTest.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
#import <OCMock/OCMock.h>
1818
#import <XCTest/XCTest.h>
1919

20-
//#import "FIRRemoteConfig+FIRApp.h"
20+
// #import "FIRRemoteConfig+FIRApp.h"
2121
#import "FirebaseCore/Extension/FirebaseCoreInternal.h"
2222
#import "FirebaseRemoteConfig/Sources/Private/FIRRemoteConfig_Private.h"
23-
//#import "third_party/firebase/ios/Releases/FirebaseCore/Tests/FIRTestCase.h"
23+
// #import "third_party/firebase/ios/Releases/FirebaseCore/Tests/FIRTestCase.h"
2424

2525
@interface RCNRemoteConfig_FIRAppTest : FIRTestCase
2626

Firestore/Source/API/FSTUserDataWriter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ namespace api = firebase::firestore::api;
3535
- (instancetype)initWithFirestore:(std::shared_ptr<api::Firestore>)firestore
3636
serverTimestampBehavior:(FIRServerTimestampBehavior)serverTimestampBehavior;
3737

38-
- (id)convertedValue:(const firebase::firestore::google_firestore_v1_Value&)value;
38+
- (id)convertedValue:(const firebase::firestore::google_firestore_v1_Value &)value;
3939

4040
@end

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ GitHub Actions will verify that any code changes are done in a style compliant
140140
way. Install `clang-format` and `mint`:
141141

142142
```console
143-
brew install clang-format@15
143+
brew install clang-format@16
144144
brew install mint
145145
```
146146

scripts/setup_check.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fi
3535

3636
# install clang-format
3737
brew update
38-
brew install clang-format@15
38+
brew install clang-format@16
3939

4040
# mint installs tools from Mintfile on demand.
4141
brew install mint

scripts/style.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ version="${version/ (*)/}"
4242
version="${version/.*/}"
4343

4444
case "$version" in
45-
15)
45+
16)
4646
;;
4747
google3-trunk)
4848
echo "Please use a publicly released clang-format; a recent LLVM release"
@@ -51,7 +51,7 @@ case "$version" in
5151
exit 1
5252
;;
5353
*)
54-
echo "Please upgrade to clang-format version 15."
54+
echo "Please upgrade to clang-format version 16."
5555
echo "If it's installed via homebrew you can run:"
5656
echo "brew upgrade clang-format"
5757
exit 1

0 commit comments

Comments
 (0)