diff --git a/examples/integration/iMessageApp/MessagesViewController.swift b/examples/integration/iMessageApp/MessagesViewController.swift index 94abd008d1..d960ff9472 100644 --- a/examples/integration/iMessageApp/MessagesViewController.swift +++ b/examples/integration/iMessageApp/MessagesViewController.swift @@ -2,9 +2,6 @@ import Messages import UIKit class MessagesViewController: MSMessagesAppViewController { - override func viewDidLoad() { - super.viewDidLoad() - } override func willBecomeActive(with _: MSConversation) {} diff --git a/tools/generators/files_and_groups/src/ElementCreator/CreateVersionGroup.swift b/tools/generators/files_and_groups/src/ElementCreator/CreateVersionGroup.swift index 4c5b288564..1c060d4cee 100644 --- a/tools/generators/files_and_groups/src/ElementCreator/CreateVersionGroup.swift +++ b/tools/generators/files_and_groups/src/ElementCreator/CreateVersionGroup.swift @@ -90,7 +90,7 @@ extension ElementCreator.CreateVersionGroup { let selectedModelVersion = selectedModelVersions[bazelPath] var children: [GroupChild.ElementAndChildren] = [] - var selectedChildIdentifier: String? = nil + var selectedChildIdentifier: String? for node in nodeChildren { let childName = node.nameForSpecialGroupChild let childBazelPath = BazelPath(parent: bazelPath, path: childName) diff --git a/tools/generators/files_and_groups/src/ElementCreator/ReadSelectedModelVersionsFile.swift b/tools/generators/files_and_groups/src/ElementCreator/ReadSelectedModelVersionsFile.swift index ab120f3de7..eef54e9c8d 100644 --- a/tools/generators/files_and_groups/src/ElementCreator/ReadSelectedModelVersionsFile.swift +++ b/tools/generators/files_and_groups/src/ElementCreator/ReadSelectedModelVersionsFile.swift @@ -33,7 +33,6 @@ extension ElementCreator.ReadSelectedModelVersionsFile { let decoder = JSONDecoder() decoder.keyDecodingStrategy = .convertFromSnakeCase - do { return try decoder .decode([BazelPath: String].self, from: Data(contentsOf: url)) diff --git a/tools/generators/files_and_groups/src/Generator/CalculatePathTree.swift b/tools/generators/files_and_groups/src/Generator/CalculatePathTree.swift index 9a11597914..f2c3a04f49 100644 --- a/tools/generators/files_and_groups/src/Generator/CalculatePathTree.swift +++ b/tools/generators/files_and_groups/src/Generator/CalculatePathTree.swift @@ -212,7 +212,7 @@ extension PathTreeNode { return name case .group(let name, _): return name - case .generatedFiles(_): + case .generatedFiles: // This is only called from `CreateVerisonGroup` and // `CreateLocalizedFiles` where this case can't be hit fatalError() diff --git a/tools/generators/files_and_groups/src/Generator/ReadGeneratedFilePathsFile.swift b/tools/generators/files_and_groups/src/Generator/ReadGeneratedFilePathsFile.swift index b430a7a408..2dee27c624 100644 --- a/tools/generators/files_and_groups/src/Generator/ReadGeneratedFilePathsFile.swift +++ b/tools/generators/files_and_groups/src/Generator/ReadGeneratedFilePathsFile.swift @@ -65,7 +65,6 @@ extension Generator.ReadGeneratedFilePathsFile { )) } - // The file can have at most 1 duplicate for each entry because of // preprocessed resource files being represented as file paths, while // they can also be an input to another action (e.g. codegen). Because diff --git a/tools/generators/legacy/src/Generator/CreateXCUserData.swift b/tools/generators/legacy/src/Generator/CreateXCUserData.swift index b88906447c..29ea23c9e3 100644 --- a/tools/generators/legacy/src/Generator/CreateXCUserData.swift +++ b/tools/generators/legacy/src/Generator/CreateXCUserData.swift @@ -16,7 +16,7 @@ extension Generator { else { return lhs.productTypeSortOrder < rhs.productTypeSortOrder } - + return lhs.scheme.name < rhs.scheme.name } .map(\.scheme) @@ -31,7 +31,7 @@ extension Generator { isShown: true ) } - + return XCUserData( userName: userName, schemes: [], diff --git a/tools/generators/lib/PBXProj/src/ReadTargetSwiftDebugSettingsFile.swift b/tools/generators/lib/PBXProj/src/ReadTargetSwiftDebugSettingsFile.swift index 485e2d437a..5fdc906f55 100644 --- a/tools/generators/lib/PBXProj/src/ReadTargetSwiftDebugSettingsFile.swift +++ b/tools/generators/lib/PBXProj/src/ReadTargetSwiftDebugSettingsFile.swift @@ -30,4 +30,3 @@ extension ReadTargetSwiftDebugSettingsFile { return try await .decode(from: url) } } - diff --git a/tools/generators/lib/PBXProj/src/String+Extensions.swift b/tools/generators/lib/PBXProj/src/String+Extensions.swift index 9a28200c2e..5e82b5bf62 100644 --- a/tools/generators/lib/PBXProj/src/String+Extensions.swift +++ b/tools/generators/lib/PBXProj/src/String+Extensions.swift @@ -45,7 +45,6 @@ extension String { } } - private let invalidCharacters: CharacterSet = { var invalidSet = CharacterSet(charactersIn: "_$") invalidSet.insert(UnicodeScalar("/")) diff --git a/tools/generators/lib/PBXProj/src/WriteTargetSwiftDebugSettings.swift b/tools/generators/lib/PBXProj/src/WriteTargetSwiftDebugSettings.swift index 3a15eb0682..283839a828 100644 --- a/tools/generators/lib/PBXProj/src/WriteTargetSwiftDebugSettings.swift +++ b/tools/generators/lib/PBXProj/src/WriteTargetSwiftDebugSettings.swift @@ -68,4 +68,3 @@ private extension Data { } } } - diff --git a/tools/generators/pbxnativetargets/src/Generator/CreateBuildConfigurationListObject.swift b/tools/generators/pbxnativetargets/src/Generator/CreateBuildConfigurationListObject.swift index 6e658ce575..4cf0f3ef60 100644 --- a/tools/generators/pbxnativetargets/src/Generator/CreateBuildConfigurationListObject.swift +++ b/tools/generators/pbxnativetargets/src/Generator/CreateBuildConfigurationListObject.swift @@ -58,7 +58,7 @@ extension Generator.CreateBuildConfigurationListObject { ); } """# - + return Object( identifier: Identifiers.Targets.buildConfigurationList( subIdentifier: subIdentifier, diff --git a/tools/generators/pbxnativetargets/src/Generator/CreateBuildConfigurationObject.swift b/tools/generators/pbxnativetargets/src/Generator/CreateBuildConfigurationObject.swift index 7294d602b0..d4e691de08 100644 --- a/tools/generators/pbxnativetargets/src/Generator/CreateBuildConfigurationObject.swift +++ b/tools/generators/pbxnativetargets/src/Generator/CreateBuildConfigurationObject.swift @@ -52,7 +52,7 @@ extension Generator.CreateBuildConfigurationObject { name = \#(name.pbxProjEscaped); } """# - + return Object( identifier: Identifiers.Targets.buildConfiguration( name, diff --git a/tools/generators/pbxnativetargets/src/Generator/CreateXcodeConfigurations.swift b/tools/generators/pbxnativetargets/src/Generator/CreateXcodeConfigurations.swift index 00b8d8c82b..e45ba226e9 100644 --- a/tools/generators/pbxnativetargets/src/Generator/CreateXcodeConfigurations.swift +++ b/tools/generators/pbxnativetargets/src/Generator/CreateXcodeConfigurations.swift @@ -305,4 +305,3 @@ private func consolidatePaths(_ paths: [[BazelPath]]) -> [BazelPath] { return consolidatedPaths.elements } - diff --git a/tools/generators/pbxtargetdependencies/src/Generator/CalculateConsolidationMaps.swift b/tools/generators/pbxtargetdependencies/src/Generator/CalculateConsolidationMaps.swift index 58bf0d4f51..45c38f1136 100644 --- a/tools/generators/pbxtargetdependencies/src/Generator/CalculateConsolidationMaps.swift +++ b/tools/generators/pbxtargetdependencies/src/Generator/CalculateConsolidationMaps.swift @@ -45,7 +45,7 @@ extension Generator.CalculateConsolidationMaps { let watchKitExtensionProductIdentifier = try target.watchKitExtension.flatMap { id in let watchKitExtension = try identifiedTargetsMap - .value(for: id ,context: "WatchKit extension") + .value(for: id, context: "WatchKit extension") return Identifiers.BuildFiles.productIdentifier( targetSubIdentifier: diff --git a/tools/generators/pbxtargetdependencies/src/Generator/DisambiguateTargets.swift b/tools/generators/pbxtargetdependencies/src/Generator/DisambiguateTargets.swift index f190ff47e2..a4b116d653 100644 --- a/tools/generators/pbxtargetdependencies/src/Generator/DisambiguateTargets.swift +++ b/tools/generators/pbxtargetdependencies/src/Generator/DisambiguateTargets.swift @@ -31,7 +31,7 @@ extension Generator { func callAsFunction( _ consolidatedTargets: [ConsolidatedTarget], targetNameMode: TargetNameMode - )-> [DisambiguatedTarget] { + ) -> [DisambiguatedTarget] { return callable( /*consolidatedTargets:*/ consolidatedTargets, /*targetNameMode:*/ targetNameMode diff --git a/tools/generators/pbxtargetdependencies/src/Generator/InnerIdentifyTargets.swift b/tools/generators/pbxtargetdependencies/src/Generator/InnerIdentifyTargets.swift index 15ea3209a2..d90fb5f112 100644 --- a/tools/generators/pbxtargetdependencies/src/Generator/InnerIdentifyTargets.swift +++ b/tools/generators/pbxtargetdependencies/src/Generator/InnerIdentifyTargets.swift @@ -22,7 +22,7 @@ extension Generator { /// Identifies a set of disambiguated targets. func callAsFunction( _ disambiguatedTargets: [DisambiguatedTarget], - targetIdToConsolidationMapOutputPath: [TargetID : (UInt8, URL)] + targetIdToConsolidationMapOutputPath: [TargetID: (UInt8, URL)] ) -> [IdentifiedTarget] { return callable( /*disambiguatedTargets:*/ disambiguatedTargets, @@ -39,13 +39,13 @@ extension Generator { extension Generator.InnerIdentifyTargets { public typealias Callable = ( _ disambiguatedTargets: [DisambiguatedTarget], - _ targetIdToConsolidationMapOutputPath: [TargetID : (UInt8, URL)], + _ targetIdToConsolidationMapOutputPath: [TargetID: (UInt8, URL)], _ createTargetSubIdentifier: Generator.CreateTargetSubIdentifier ) -> [IdentifiedTarget] static func defaultCallable( _ disambiguatedTargets: [DisambiguatedTarget], - targetIdToConsolidationMapOutputPath: [TargetID : (UInt8, URL)], + targetIdToConsolidationMapOutputPath: [TargetID: (UInt8, URL)], createTargetSubIdentifier: Generator.CreateTargetSubIdentifier ) -> [IdentifiedTarget] { let idsToNames: [TargetID: String] = Dictionary( diff --git a/tools/generators/pbxtargetdependencies/src/Generator/WriteConsolidationMaps.swift b/tools/generators/pbxtargetdependencies/src/Generator/WriteConsolidationMaps.swift index 9ba7f1f75a..75102abbc5 100644 --- a/tools/generators/pbxtargetdependencies/src/Generator/WriteConsolidationMaps.swift +++ b/tools/generators/pbxtargetdependencies/src/Generator/WriteConsolidationMaps.swift @@ -21,7 +21,7 @@ extension Generator { /// Writes consolidation maps to disk. func callAsFunction( - _ consolidationMaps: [URL : [ConsolidationMapEntry]] + _ consolidationMaps: [URL: [ConsolidationMapEntry]] ) async throws { try await callable( /*consolidationMaps:*/ consolidationMaps, @@ -35,12 +35,12 @@ extension Generator { extension Generator.WriteConsolidationMaps { typealias Callable = ( - _ consolidationMaps: [URL : [ConsolidationMapEntry]], + _ consolidationMaps: [URL: [ConsolidationMapEntry]], _ writeConsolidationMap: Generator.WriteConsolidationMap ) async throws -> Void static func defaultCallable( - _ consolidationMaps: [URL : [ConsolidationMapEntry]], + _ consolidationMaps: [URL: [ConsolidationMapEntry]], writeConsolidationMap: Generator.WriteConsolidationMap ) async throws { try await withThrowingTaskGroup(of: Void.self) { group in diff --git a/tools/generators/target_build_settings/src/Generator/ProcessCcArgs.swift b/tools/generators/target_build_settings/src/Generator/ProcessCcArgs.swift index 689c5483d6..f58c79231d 100644 --- a/tools/generators/target_build_settings/src/Generator/ProcessCcArgs.swift +++ b/tools/generators/target_build_settings/src/Generator/ProcessCcArgs.swift @@ -38,7 +38,7 @@ extension Generator.ProcessCcArgs { typealias Callable = ( _ argsStream: AsyncThrowingStream, _ processCcArg: Generator.ProcessCcArg - ) async throws -> ( + ) async throws -> ( args: [String], hasDebugInfo: Bool, fortifySourceLevel: Int @@ -52,7 +52,7 @@ extension Generator.ProcessCcArgs { hasDebugInfo: Bool, fortifySourceLevel: Int ) { - var previousArg: String? = nil + var previousArg: String? var skipNext = 0 var args: [String] = [ diff --git a/tools/generators/target_build_settings/src/Generator/ProcessSwiftArgs.swift b/tools/generators/target_build_settings/src/Generator/ProcessSwiftArgs.swift index 47a0bd4e10..9c40792a10 100644 --- a/tools/generators/target_build_settings/src/Generator/ProcessSwiftArgs.swift +++ b/tools/generators/target_build_settings/src/Generator/ProcessSwiftArgs.swift @@ -158,9 +158,9 @@ extension Generator.ProcessSwiftArgs { swiftIncludes: OrderedSet, includeTransitiveSwiftDebugSettings: Bool ) { - var previousArg: String? = nil - var previousClangArg: String? = nil - var previousFrontendArg: String? = nil + var previousArg: String? + var previousClangArg: String? + var previousFrontendArg: String? var skipNext = 0 // First two arguments are `swift_worker` and `clang` diff --git a/tools/generators/xcschemes/src/Generator/CreateScheme.swift b/tools/generators/xcschemes/src/Generator/CreateScheme.swift index e60a83aac9..0725e0c238 100644 --- a/tools/generators/xcschemes/src/Generator/CreateScheme.swift +++ b/tools/generators/xcschemes/src/Generator/CreateScheme.swift @@ -85,7 +85,7 @@ extension Generator.CreateScheme { createBuildAction: CreateBuildAction, createLaunchAction: CreateLaunchAction, createProfileAction: CreateProfileAction, - createSchemeXML: XCScheme.CreateScheme, + createSchemeXML: XCScheme.CreateScheme, createTestAction: CreateTestAction ) throws -> (name: String, scheme: String) { var buildActionEntries: diff --git a/tools/generators/xcschemes/src/Generator/Generator.swift b/tools/generators/xcschemes/src/Generator/Generator.swift index 25fc2ed0d3..b7ffd0c674 100644 --- a/tools/generators/xcschemes/src/Generator/Generator.swift +++ b/tools/generators/xcschemes/src/Generator/Generator.swift @@ -57,7 +57,7 @@ struct Generator { targets: targets, targetsByID: targetsByID, targetsByKey: targetsByKey, - testOptions: .init(appLanguage: autogenerationConfigArguments.appLanguage, + testOptions: .init(appLanguage: autogenerationConfigArguments.appLanguage, appRegion: autogenerationConfigArguments.appRegion) ) diff --git a/tools/generators/xcschemes/src/Generator/ReadTargetsFromConsolidationMaps.swift b/tools/generators/xcschemes/src/Generator/ReadTargetsFromConsolidationMaps.swift index 93ef50169e..60eecfad67 100644 --- a/tools/generators/xcschemes/src/Generator/ReadTargetsFromConsolidationMaps.swift +++ b/tools/generators/xcschemes/src/Generator/ReadTargetsFromConsolidationMaps.swift @@ -38,7 +38,7 @@ extension Generator.ReadTargetsFromConsolidationMaps { static func defaultCallable( _ urls: [URL], referencedContainer: String - ) async throws -> [Target] { + ) async throws -> [Target] { return try await withThrowingTaskGroup( of: [Target].self ) { group in diff --git a/tools/import_indexstores/Remaps.swift b/tools/import_indexstores/Remaps.swift index 55bb4b61d1..db8440e7a7 100644 --- a/tools/import_indexstores/Remaps.swift +++ b/tools/import_indexstores/Remaps.swift @@ -64,6 +64,6 @@ func remapArgs( // `DEVELOPER_DIR` has an optional `./` prefix, because index-import // adds `./` to all relative paths. "-remap", - #"^(?:.*?/[^/]+/Contents/Developer|(?:./)?DEVELOPER_DIR|/PLACEHOLDER_DEVELOPER_DIR|/Library/Developer/CommandLineTools).*?/SDKs/([^\d.]+)=\#(developerDir)/Platforms/$1.platform/Developer/SDKs/$1"# + #"^(?:.*?/[^/]+/Contents/Developer|(?:./)?DEVELOPER_DIR|/PLACEHOLDER_DEVELOPER_DIR|/Library/Developer/CommandLineTools).*?/SDKs/([^\d.]+)=\#(developerDir)/Platforms/$1.platform/Developer/SDKs/$1"#, ] }