Ver código fonte

Updates for bumping swiftformat to 0.44.17 (#6120)

Paul Beusterien 5 anos atrás
pai
commit
83ff0671ff

+ 3 - 2
FirebaseABTesting/Tests/Integration/ABTQA/AppDelegate.swift

@@ -20,8 +20,9 @@ import Firebase
 @UIApplicationMain
 class AppDelegate: UIResponder, UIApplicationDelegate {
   func application(_ application: UIApplication,
-                   didFinishLaunchingWithOptions
-                   launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
+                   didFinishLaunchingWithOptions launchOptions: [
+                     UIApplication.LaunchOptionsKey: Any
+                   ]?) -> Bool {
     // Override point for customization after application launch.
     FirebaseApp.configure()
     return true

+ 1 - 1
FirebaseCore/Tests/SwiftUnit/FirebaseAppTests.swift

@@ -345,6 +345,6 @@ class FirebaseAppTests: XCTestCase {
                     XCTFail("Failed to unwrap notification user info")
                   }
                   return false
-    })
+                })
   }
 }

+ 1 - 1
FirebaseMessaging/Apps/Sample/Sample/SceneDelegate.swift

@@ -67,8 +67,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate, MessagingDelegate {
             return
           }
           self.identity.instanceID = fid
-          })
         })
+      })
       .store(in: &cancellables)
   }
 

+ 1 - 1
FirebaseMessaging/Apps/Sample/iOS/NotificationsController.swift

@@ -54,7 +54,7 @@ class NotificationsController: NSObject {
                               completionHandler: { granted, error in
                                 NotificationCenter.default
                                   .post(name: UserNotificationsChangedNotification, object: nil)
-        })
+                              })
     } else if #available(iOS 8.0, *) {
       let userNotificationSettings = UIUserNotificationSettings(types: [.alert, .badge, .sound],
                                                                 categories: [])

+ 1 - 1
FirebaseRemoteConfig/Tests/FakeConsole/FakeConsoleTests.swift

@@ -104,6 +104,6 @@ class FakeConsoleTests: APITestBase {
                           if let error = error {
                             print(error)
                           }
-    })
+                        })
   }
 }

+ 1 - 1
FirebaseRemoteConfig/Tests/SwiftAPI/APITests.swift

@@ -319,6 +319,6 @@ class APITests: APITestBase {
                           if let error = error {
                             print(error)
                           }
-    })
+                        })
   }
 }

+ 3 - 3
FirebaseRemoteConfig/Tests/SwiftAPI/RemoteConfigConsole.swift

@@ -153,10 +153,10 @@ class RemoteConfigConsole {
 
     func secureRequest(url: URL, with token: String, _ timeout: TimeInterval = 10) -> URLRequest {
       var request = URLRequest(url: url, timeoutInterval: timeout)
-      request.httpMethod = self.httpMethod
-      request.allHTTPHeaderFields = self.httpHeaderFields
+      request.httpMethod = httpMethod
+      request.allHTTPHeaderFields = httpHeaderFields
       request.addValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
-      request.httpBody = self.httpBody
+      request.httpBody = httpBody
       return request
     }
   }

+ 1 - 1
FirebaseStorage/Tests/SwiftIntegration/StorageIntegration.swift

@@ -768,6 +768,6 @@ class StorageIntegration: XCTestCase {
                           if let error = error {
                             print(error)
                           }
-    })
+                        })
   }
 }

+ 1 - 1
FirebaseStorageSwift/Tests/Integration/StorageIntegration.swift

@@ -607,7 +607,7 @@ class StorageIntegration: XCTestCase {
                           if let error = error {
                             print(error)
                           }
-    })
+                        })
   }
 
   private func assertResultSuccess<T>(_ result: Result<T, Error>,

+ 2 - 2
scripts/style.sh

@@ -63,12 +63,12 @@ if [[ "$system" == "Darwin" ]]; then
     echo "Found: $version"
   fi
   version="${version/*version /}"
-  # Ensure the swiftformat version is at least 0.44.14 since (as of 2020-06-26)
+  # Ensure the swiftformat version is at least 0.44.17 since (as of 2020-06-26)
   # We may need to be more strict about version checks in
   # the future if we run into different versions making incompatible format
   # changes.
   if [[ ! "$version" =~ ^0.[4-9] ]]; then
-    echo "Version $version installed. Please upgrade to at least swiftformat 0.44.14"
+    echo "Version $version installed. Please upgrade to at least swiftformat 0.44.17"
     echo "If it's installed via homebrew you can run: brew upgrade swiftformat"
     exit 1
   fi