Skip to content

Commit 57123ae

Browse files
Update clang-format to 11 (#6905)
* Update clang-format to 11 * Upgrade clang format * Install clang-format@11 * Update readme * brew update
1 parent ea26dd4 commit 57123ae

File tree

7 files changed

+12
-9
lines changed

7 files changed

+12
-9
lines changed

Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
#ifdef FIREBASE_BUILD_ZIP_FILE
3939
static BOOL kUsingZipFile = YES;
40-
#else // FIREBASE_BUILD_ZIP_FILE
40+
#else // FIREBASE_BUILD_ZIP_FILE
4141
static BOOL kUsingZipFile = NO;
4242
#endif // FIREBASE_BUILD_ZIP_FILE
4343

FirebaseDynamicLinks/Sources/Logging/FDLLogging.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
#if __LP64__ // 64-bit
3131
NSString *const FDLMessageCodeIntegerFormat = @"%06ld";
32-
#else // 32-bit
32+
#else // 32-bit
3333
NSString *const FDLMessageCodeIntegerFormat = @"%06d";
3434
#endif // #if __LP64__
3535

Firestore/core/test/unit/util/ordered_code_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ TEST(OrderedCodeInvalidEncodingsTest, NonCanonical) {
350350

351351
#if defined(NDEBUG)
352352
EXPECT_ANY_THROW(TestRead<uint64_t>(INCREASING, non_minimal));
353-
#else // defined(NDEBUG)
353+
#else // defined(NDEBUG)
354354
absl::string_view s(non_minimal);
355355
EXPECT_ANY_THROW(OrderedCode::ReadNumIncreasing(&s, NULL));
356356
#endif // defined(NDEBUG)
@@ -372,7 +372,7 @@ TEST(OrderedCodeInvalidEncodingsTest, NonCanonical) {
372372

373373
#if defined(NDEBUG)
374374
EXPECT_ANY_THROW(TestRead<int64_t>(INCREASING, non_minimal));
375-
#else // defined(NDEBUG)
375+
#else // defined(NDEBUG)
376376
absl::string_view s(non_minimal);
377377
EXPECT_ANY_THROW(OrderedCode::ReadSignedNumIncreasing(&s, NULL));
378378
s = non_minimal;

GoogleDataTransport/GDTCORLibrary/GDTCORPlatform.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ GDTCORNetworkMobileSubtype GDTCORNetworkMobileSubTypeMessage() {
149149
} else {
150150
return GDTCORNetworkMobileSubtypeUNKNOWN;
151151
}
152-
#else // TARGET_OS_IOS
152+
#else // TARGET_OS_IOS
153153
return GDTCORNetworkMobileSubtypeUNKNOWN;
154154
#endif // TARGET_OS_IOS
155155
}

README.md

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

146146
```
147-
brew install clang-format
147+
brew install clang-format@11
148148
brew install mint
149149
```
150150

scripts/setup_check.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ if ! git rev-parse origin/master >& /dev/null; then
3333
git fetch origin
3434
fi
3535

36+
# install clang-format
37+
brew update
38+
brew install clang-format@11
39+
3640
# mint installs tools from Mintfile on demand.
37-
brew install clang-format
3841
brew install mint
3942

4043
# Explicitly mint bootstrap to show its version in the "Setup check" GHA phase

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-
10)
45+
11)
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 10."
54+
echo "Please upgrade to clang-format version 11."
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)