Skip to content

Commit 0336856

Browse files
authored
[Infra] Bump clang-format to v14 (#9527)
* Bump clang-format * Review
1 parent b4dd98d commit 0336856

File tree

9 files changed

+16
-28
lines changed

9 files changed

+16
-28
lines changed

FirebaseInstallations/Source/Library/Public/FirebaseInstallations/FIRInstallations.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ NS_SWIFT_NAME(Installations)
7676
* @returns An instance of `Installations` corresponding to the passed application.
7777
* @throw Throws an exception if required `FirebaseApp` options are missing.
7878
*/
79-
+ (FIRInstallations *)installationsWithApp:(FIRApp *)application
80-
NS_SWIFT_NAME(installations(app:));
79+
+ (FIRInstallations *)installationsWithApp:(FIRApp *)application NS_SWIFT_NAME(installations(app:));
8180

8281
/**
8382
* The method creates or retrieves an installation ID. The installation ID is a stable identifier

FirebasePerformance/Sources/Public/FirebasePerformance/FIRHTTPMetric.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ NS_EXTENSION_UNAVAILABLE("Firebase Performance is not supported for extensions."
5454
* @param httpMethod HTTP method used by the request.
5555
*/
5656
- (nullable instancetype)initWithURL:(nonnull NSURL *)URL
57-
HTTPMethod:(FIRHTTPMethod)httpMethod
58-
NS_SWIFT_NAME(init(url:httpMethod:));
57+
HTTPMethod:(FIRHTTPMethod)httpMethod NS_SWIFT_NAME(init(url:httpMethod:));
5958

6059
/**
6160
* Use `initWithURL:HTTPMethod:` for Objective-C and `init(url:httpMethod:)` for Swift.

FirebasePerformance/Sources/Public/FirebasePerformance/FIRPerformance.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ NS_SWIFT_NAME(Performance)
6262
* @param name The name of the Trace.
6363
* @return The FIRTrace object.
6464
*/
65-
+ (nullable FIRTrace *)startTraceWithName:(nonnull NSString *)name
66-
NS_SWIFT_NAME(startTrace(name:));
65+
+ (nullable FIRTrace *)startTraceWithName:(nonnull NSString *)name NS_SWIFT_NAME(startTrace(name:));
6766

6867
/**
6968
* Creates an instance of FIRTrace. This API does not start the trace. To start the trace, use the

Firestore/Source/API/FIRFilter+Internal.h

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,10 @@ NS_SWIFT_NAME(Filter)
4444
isGreaterThan:(nonnull id)value NS_SWIFT_NAME(whereField(_:isGreaterThan:));
4545

4646
+ (FIRFilter *)filterWhereFieldPath:(nonnull FIRFieldPath *)field
47-
isGreaterThan:(nonnull id)value
48-
NS_SWIFT_NAME(whereField(_:isGreaterThan:));
47+
isGreaterThan:(nonnull id)value NS_SWIFT_NAME(whereField(_:isGreaterThan:));
4948

5049
+ (FIRFilter *)filterWhereField:(nonnull NSString *)field
51-
isGreaterThanOrEqualTo:(nonnull id)value
52-
NS_SWIFT_NAME(whereField(_:isGreaterOrEqualTo:));
50+
isGreaterThanOrEqualTo:(nonnull id)value NS_SWIFT_NAME(whereField(_:isGreaterOrEqualTo:));
5351

5452
+ (FIRFilter *)filterWhereFieldPath:(nonnull FIRFieldPath *)field
5553
isGreaterThanOrEqualTo:(nonnull id)value
@@ -62,8 +60,7 @@ NS_SWIFT_NAME(Filter)
6260
isLessThan:(nonnull id)value NS_SWIFT_NAME(whereField(_:isLessThan:));
6361

6462
+ (FIRFilter *)filterWhereField:(nonnull NSString *)field
65-
isLessThanOrEqualTo:(nonnull id)value
66-
NS_SWIFT_NAME(whereField(_:isLessThanOrEqualTo:));
63+
isLessThanOrEqualTo:(nonnull id)value NS_SWIFT_NAME(whereField(_:isLessThanOrEqualTo:));
6764

6865
+ (FIRFilter *)filterWhereFieldPath:(nonnull FIRFieldPath *)field
6966
isLessThanOrEqualTo:(nonnull id)value
@@ -73,8 +70,7 @@ NS_SWIFT_NAME(Filter)
7370
arrayContains:(nonnull id)value NS_SWIFT_NAME(whereField(_:arrayContains:));
7471

7572
+ (FIRFilter *)filterWhereFieldPath:(nonnull FIRFieldPath *)field
76-
arrayContains:(nonnull id)value
77-
NS_SWIFT_NAME(whereField(_:arrayContains:));
73+
arrayContains:(nonnull id)value NS_SWIFT_NAME(whereField(_:arrayContains:));
7874

7975
+ (FIRFilter *)filterWhereField:(nonnull NSString *)field
8076
arrayContainsAny:(nonnull NSArray<id> *)values
@@ -88,12 +84,10 @@ NS_SWIFT_NAME(Filter)
8884
in:(nonnull NSArray<id> *)values NS_SWIFT_NAME(whereField(_:in:));
8985

9086
+ (FIRFilter *)filterWhereFieldPath:(nonnull FIRFieldPath *)field
91-
in:(nonnull NSArray<id> *)values
92-
NS_SWIFT_NAME(whereField(_:in:));
87+
in:(nonnull NSArray<id> *)values NS_SWIFT_NAME(whereField(_:in:));
9388

9489
+ (FIRFilter *)filterWhereField:(nonnull NSString *)field
95-
notIn:(nonnull NSArray<id> *)values
96-
NS_SWIFT_NAME(whereField(_:notIn:));
90+
notIn:(nonnull NSArray<id> *)values NS_SWIFT_NAME(whereField(_:notIn:));
9791

9892
+ (FIRFilter *)filterWhereFieldPath:(nonnull FIRFieldPath *)field
9993
notIn:(nonnull NSArray<id> *)values

Firestore/Source/Public/FirebaseFirestore/FIRFirestore.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,7 @@ NS_SWIFT_NAME(Firestore)
292292
* @return A `FIRLoadBundleTask` (`LoadBundleTask` in Swift) which allows registered observers
293293
* to receive progress updates and completion or error events.
294294
*/
295-
- (FIRLoadBundleTask *)loadBundleStream:(NSInputStream *)bundleStream
296-
NS_SWIFT_NAME(loadBundle(_:));
295+
- (FIRLoadBundleTask *)loadBundleStream:(NSInputStream *)bundleStream NS_SWIFT_NAME(loadBundle(_:));
297296

298297
/**
299298
* Loads a Firestore bundle into the local cache.

Firestore/Source/Public/FirebaseFirestore/FIRQuery.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,7 @@ NS_SWIFT_NAME(Query)
283283
* @return The created `FIRQuery`.
284284
*/
285285
- (FIRQuery *)queryWhereField:(NSString *)field
286-
arrayContainsAny:(NSArray<id> *)values
287-
NS_SWIFT_NAME(whereField(_:arrayContainsAny:));
286+
arrayContainsAny:(NSArray<id> *)values NS_SWIFT_NAME(whereField(_:arrayContainsAny:));
288287

289288
/**
290289
* Creates and returns a new `FIRQuery` with the additional filter that documents must contain
@@ -526,8 +525,7 @@ NS_SWIFT_NAME(Query)
526525
*
527526
* @return The created `FIRQuery`.
528527
*/
529-
- (FIRQuery *)queryEndingAtDocument:(FIRDocumentSnapshot *)document
530-
NS_SWIFT_NAME(end(atDocument:));
528+
- (FIRQuery *)queryEndingAtDocument:(FIRDocumentSnapshot *)document NS_SWIFT_NAME(end(atDocument:));
531529

532530
/**
533531
* Creates and returns a new `FIRQuery` that ends at the provided fields relative to the order of

README.md

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

167167
```console
168-
brew install clang-format@13
168+
brew install clang-format@14
169169
brew install mint
170170
```
171171

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@13
38+
brew install clang-format@14
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-
13)
45+
14)
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 12."
54+
echo "Please upgrade to clang-format version 14."
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)