Skip to content

Lint #3154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2025
Merged

Lint #3154

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import Messages
import UIKit

class MessagesViewController: MSMessagesAppViewController {
override func viewDidLoad() {
super.viewDidLoad()
}

override func willBecomeActive(with _: MSConversation) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extension Generator {
else {
return lhs.productTypeSortOrder < rhs.productTypeSortOrder
}

return lhs.scheme.name < rhs.scheme.name
}
.map(\.scheme)
Expand All @@ -31,7 +31,7 @@ extension Generator {
isShown: true
)
}

return XCUserData(
userName: userName,
schemes: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ extension ReadTargetSwiftDebugSettingsFile {
return try await .decode(from: url)
}
}

1 change: 0 additions & 1 deletion tools/generators/lib/PBXProj/src/String+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ extension String {
}
}


private let invalidCharacters: CharacterSet = {
var invalidSet = CharacterSet(charactersIn: "_$")
invalidSet.insert(UnicodeScalar("/"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,3 @@ private extension Data {
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extension Generator.CreateBuildConfigurationListObject {
);
}
"""#

return Object(
identifier: Identifiers.Targets.buildConfigurationList(
subIdentifier: subIdentifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extension Generator.CreateBuildConfigurationObject {
name = \#(name.pbxProjEscaped);
}
"""#

return Object(
identifier: Identifiers.Targets.buildConfiguration(
name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,3 @@ private func consolidatePaths(_ paths: [[BazelPath]]) -> [BazelPath] {

return consolidatedPaths.elements
}

Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extension Generator {
func callAsFunction(
_ consolidatedTargets: [ConsolidatedTarget],
targetNameMode: TargetNameMode
)-> [DisambiguatedTarget] {
) -> [DisambiguatedTarget] {
return callable(
/*consolidatedTargets:*/ consolidatedTargets,
/*targetNameMode:*/ targetNameMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extension Generator.ProcessCcArgs {
typealias Callable = (
_ argsStream: AsyncThrowingStream<String, Error>,
_ processCcArg: Generator.ProcessCcArg
) async throws -> (
) async throws -> (
args: [String],
hasDebugInfo: Bool,
fortifySourceLevel: Int
Expand All @@ -52,7 +52,7 @@ extension Generator.ProcessCcArgs {
hasDebugInfo: Bool,
fortifySourceLevel: Int
) {
var previousArg: String? = nil
var previousArg: String?
var skipNext = 0

var args: [String] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ extension Generator.ProcessSwiftArgs {
swiftIncludes: OrderedSet<String>,
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`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tools/generators/xcschemes/src/Generator/Generator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/import_indexstores/Remaps.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"#,
]
}
Loading