Skip to content

Commit f073b0b

Browse files
mattrobmattrobbrentleyjones
authored andcommitted
Lint
Run Swiftlint and apply the fixups. Signed-off-by: Matt Robinson <mattrob@hey.com>
1 parent 38a7db8 commit f073b0b

22 files changed

+23
-32
lines changed

examples/integration/iMessageApp/MessagesViewController.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ import Messages
22
import UIKit
33

44
class MessagesViewController: MSMessagesAppViewController {
5-
override func viewDidLoad() {
6-
super.viewDidLoad()
7-
}
85

96
override func willBecomeActive(with _: MSConversation) {}
107

tools/generators/files_and_groups/src/ElementCreator/CreateVersionGroup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ extension ElementCreator.CreateVersionGroup {
9090
let selectedModelVersion = selectedModelVersions[bazelPath]
9191

9292
var children: [GroupChild.ElementAndChildren] = []
93-
var selectedChildIdentifier: String? = nil
93+
var selectedChildIdentifier: String?
9494
for node in nodeChildren {
9595
let childName = node.nameForSpecialGroupChild
9696
let childBazelPath = BazelPath(parent: bazelPath, path: childName)

tools/generators/files_and_groups/src/ElementCreator/ReadSelectedModelVersionsFile.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ extension ElementCreator.ReadSelectedModelVersionsFile {
3333
let decoder = JSONDecoder()
3434
decoder.keyDecodingStrategy = .convertFromSnakeCase
3535

36-
3736
do {
3837
return try decoder
3938
.decode([BazelPath: String].self, from: Data(contentsOf: url))

tools/generators/files_and_groups/src/Generator/CalculatePathTree.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ extension PathTreeNode {
212212
return name
213213
case .group(let name, _):
214214
return name
215-
case .generatedFiles(_):
215+
case .generatedFiles:
216216
// This is only called from `CreateVerisonGroup` and
217217
// `CreateLocalizedFiles` where this case can't be hit
218218
fatalError()

tools/generators/files_and_groups/src/Generator/ReadGeneratedFilePathsFile.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ extension Generator.ReadGeneratedFilePathsFile {
6565
))
6666
}
6767

68-
6968
// The file can have at most 1 duplicate for each entry because of
7069
// preprocessed resource files being represented as file paths, while
7170
// they can also be an input to another action (e.g. codegen). Because

tools/generators/legacy/src/Generator/CreateXCUserData.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extension Generator {
1616
else {
1717
return lhs.productTypeSortOrder < rhs.productTypeSortOrder
1818
}
19-
19+
2020
return lhs.scheme.name < rhs.scheme.name
2121
}
2222
.map(\.scheme)
@@ -31,7 +31,7 @@ extension Generator {
3131
isShown: true
3232
)
3333
}
34-
34+
3535
return XCUserData(
3636
userName: userName,
3737
schemes: [],

tools/generators/lib/PBXProj/src/ReadTargetSwiftDebugSettingsFile.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@ extension ReadTargetSwiftDebugSettingsFile {
3030
return try await .decode(from: url)
3131
}
3232
}
33-

tools/generators/lib/PBXProj/src/String+Extensions.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ extension String {
4545
}
4646
}
4747

48-
4948
private let invalidCharacters: CharacterSet = {
5049
var invalidSet = CharacterSet(charactersIn: "_$")
5150
invalidSet.insert(UnicodeScalar("/"))

tools/generators/lib/PBXProj/src/WriteTargetSwiftDebugSettings.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,3 @@ private extension Data {
6868
}
6969
}
7070
}
71-

tools/generators/pbxnativetargets/src/Generator/CreateBuildConfigurationListObject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ extension Generator.CreateBuildConfigurationListObject {
5858
);
5959
}
6060
"""#
61-
61+
6262
return Object(
6363
identifier: Identifiers.Targets.buildConfigurationList(
6464
subIdentifier: subIdentifier,

tools/generators/pbxnativetargets/src/Generator/CreateBuildConfigurationObject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extension Generator.CreateBuildConfigurationObject {
5252
name = \#(name.pbxProjEscaped);
5353
}
5454
"""#
55-
55+
5656
return Object(
5757
identifier: Identifiers.Targets.buildConfiguration(
5858
name,

tools/generators/pbxnativetargets/src/Generator/CreateXcodeConfigurations.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,4 +305,3 @@ private func consolidatePaths(_ paths: [[BazelPath]]) -> [BazelPath] {
305305

306306
return consolidatedPaths.elements
307307
}
308-

tools/generators/pbxtargetdependencies/src/Generator/CalculateConsolidationMaps.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ extension Generator.CalculateConsolidationMaps {
4545
let watchKitExtensionProductIdentifier =
4646
try target.watchKitExtension.flatMap { id in
4747
let watchKitExtension = try identifiedTargetsMap
48-
.value(for: id ,context: "WatchKit extension")
48+
.value(for: id, context: "WatchKit extension")
4949

5050
return Identifiers.BuildFiles.productIdentifier(
5151
targetSubIdentifier:

tools/generators/pbxtargetdependencies/src/Generator/DisambiguateTargets.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extension Generator {
3131
func callAsFunction(
3232
_ consolidatedTargets: [ConsolidatedTarget],
3333
targetNameMode: TargetNameMode
34-
)-> [DisambiguatedTarget] {
34+
) -> [DisambiguatedTarget] {
3535
return callable(
3636
/*consolidatedTargets:*/ consolidatedTargets,
3737
/*targetNameMode:*/ targetNameMode

tools/generators/pbxtargetdependencies/src/Generator/InnerIdentifyTargets.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extension Generator {
2222
/// Identifies a set of disambiguated targets.
2323
func callAsFunction(
2424
_ disambiguatedTargets: [DisambiguatedTarget],
25-
targetIdToConsolidationMapOutputPath: [TargetID : (UInt8, URL)]
25+
targetIdToConsolidationMapOutputPath: [TargetID: (UInt8, URL)]
2626
) -> [IdentifiedTarget] {
2727
return callable(
2828
/*disambiguatedTargets:*/ disambiguatedTargets,
@@ -39,13 +39,13 @@ extension Generator {
3939
extension Generator.InnerIdentifyTargets {
4040
public typealias Callable = (
4141
_ disambiguatedTargets: [DisambiguatedTarget],
42-
_ targetIdToConsolidationMapOutputPath: [TargetID : (UInt8, URL)],
42+
_ targetIdToConsolidationMapOutputPath: [TargetID: (UInt8, URL)],
4343
_ createTargetSubIdentifier: Generator.CreateTargetSubIdentifier
4444
) -> [IdentifiedTarget]
4545

4646
static func defaultCallable(
4747
_ disambiguatedTargets: [DisambiguatedTarget],
48-
targetIdToConsolidationMapOutputPath: [TargetID : (UInt8, URL)],
48+
targetIdToConsolidationMapOutputPath: [TargetID: (UInt8, URL)],
4949
createTargetSubIdentifier: Generator.CreateTargetSubIdentifier
5050
) -> [IdentifiedTarget] {
5151
let idsToNames: [TargetID: String] = Dictionary(

tools/generators/pbxtargetdependencies/src/Generator/WriteConsolidationMaps.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extension Generator {
2121

2222
/// Writes consolidation maps to disk.
2323
func callAsFunction(
24-
_ consolidationMaps: [URL : [ConsolidationMapEntry]]
24+
_ consolidationMaps: [URL: [ConsolidationMapEntry]]
2525
) async throws {
2626
try await callable(
2727
/*consolidationMaps:*/ consolidationMaps,
@@ -35,12 +35,12 @@ extension Generator {
3535

3636
extension Generator.WriteConsolidationMaps {
3737
typealias Callable = (
38-
_ consolidationMaps: [URL : [ConsolidationMapEntry]],
38+
_ consolidationMaps: [URL: [ConsolidationMapEntry]],
3939
_ writeConsolidationMap: Generator.WriteConsolidationMap
4040
) async throws -> Void
4141

4242
static func defaultCallable(
43-
_ consolidationMaps: [URL : [ConsolidationMapEntry]],
43+
_ consolidationMaps: [URL: [ConsolidationMapEntry]],
4444
writeConsolidationMap: Generator.WriteConsolidationMap
4545
) async throws {
4646
try await withThrowingTaskGroup(of: Void.self) { group in

tools/generators/target_build_settings/src/Generator/ProcessCcArgs.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extension Generator.ProcessCcArgs {
3838
typealias Callable = (
3939
_ argsStream: AsyncThrowingStream<String, Error>,
4040
_ processCcArg: Generator.ProcessCcArg
41-
) async throws -> (
41+
) async throws -> (
4242
args: [String],
4343
hasDebugInfo: Bool,
4444
fortifySourceLevel: Int
@@ -52,7 +52,7 @@ extension Generator.ProcessCcArgs {
5252
hasDebugInfo: Bool,
5353
fortifySourceLevel: Int
5454
) {
55-
var previousArg: String? = nil
55+
var previousArg: String?
5656
var skipNext = 0
5757

5858
var args: [String] = [

tools/generators/target_build_settings/src/Generator/ProcessSwiftArgs.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ extension Generator.ProcessSwiftArgs {
158158
swiftIncludes: OrderedSet<String>,
159159
includeTransitiveSwiftDebugSettings: Bool
160160
) {
161-
var previousArg: String? = nil
162-
var previousClangArg: String? = nil
163-
var previousFrontendArg: String? = nil
161+
var previousArg: String?
162+
var previousClangArg: String?
163+
var previousFrontendArg: String?
164164
var skipNext = 0
165165

166166
// First two arguments are `swift_worker` and `clang`

tools/generators/xcschemes/src/Generator/CreateScheme.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ extension Generator.CreateScheme {
8585
createBuildAction: CreateBuildAction,
8686
createLaunchAction: CreateLaunchAction,
8787
createProfileAction: CreateProfileAction,
88-
createSchemeXML: XCScheme.CreateScheme,
88+
createSchemeXML: XCScheme.CreateScheme,
8989
createTestAction: CreateTestAction
9090
) throws -> (name: String, scheme: String) {
9191
var buildActionEntries:

tools/generators/xcschemes/src/Generator/Generator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct Generator {
5757
targets: targets,
5858
targetsByID: targetsByID,
5959
targetsByKey: targetsByKey,
60-
testOptions: .init(appLanguage: autogenerationConfigArguments.appLanguage,
60+
testOptions: .init(appLanguage: autogenerationConfigArguments.appLanguage,
6161
appRegion: autogenerationConfigArguments.appRegion)
6262
)
6363

tools/generators/xcschemes/src/Generator/ReadTargetsFromConsolidationMaps.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ extension Generator.ReadTargetsFromConsolidationMaps {
3838
static func defaultCallable(
3939
_ urls: [URL],
4040
referencedContainer: String
41-
) async throws -> [Target] {
41+
) async throws -> [Target] {
4242
return try await withThrowingTaskGroup(
4343
of: [Target].self
4444
) { group in

tools/import_indexstores/Remaps.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ func remapArgs(
6464
// `DEVELOPER_DIR` has an optional `./` prefix, because index-import
6565
// adds `./` to all relative paths.
6666
"-remap",
67-
#"^(?:.*?/[^/]+/Contents/Developer|(?:./)?DEVELOPER_DIR|/PLACEHOLDER_DEVELOPER_DIR|/Library/Developer/CommandLineTools).*?/SDKs/([^\d.]+)=\#(developerDir)/Platforms/$1.platform/Developer/SDKs/$1"#
67+
#"^(?:.*?/[^/]+/Contents/Developer|(?:./)?DEVELOPER_DIR|/PLACEHOLDER_DEVELOPER_DIR|/Library/Developer/CommandLineTools).*?/SDKs/([^\d.]+)=\#(developerDir)/Platforms/$1.platform/Developer/SDKs/$1"#,
6868
]
6969
}

0 commit comments

Comments
 (0)