diff --git a/Sources/XcodeGraph/Models/Metadata/TargetMetadata.swift b/Sources/XcodeGraph/Models/Metadata/TargetMetadata.swift index 2f1d51eb..188cb920 100644 --- a/Sources/XcodeGraph/Models/Metadata/TargetMetadata.swift +++ b/Sources/XcodeGraph/Models/Metadata/TargetMetadata.swift @@ -4,29 +4,39 @@ public struct TargetMetadata: Codable, Equatable, Sendable { /// Some Tuist features can leverage that information for doing things like filtering. public var tags: Set + /// Whether the target redundant dependencies should be ignored during `tuist inspect redundant-import` + public var ignoreRedundantDependencies: Bool + @available(*, deprecated, renamed: "metadata(tags:)", message: "Use the static 'metadata' initializer instead") public init( tags: Set ) { - self.tags = tags + self.init(tags: tags, isLocal: false, ignoreRedundantDependencies: false) } - init(tags: Set, isLocal _: Bool) { + init(tags: Set, isLocal _: Bool, ignoreRedundantDependencies: Bool) { self.tags = tags + self.ignoreRedundantDependencies = ignoreRedundantDependencies } - public static func metadata(tags: Set = Set(), isLocal: Bool = true) -> TargetMetadata { - self.init(tags: tags, isLocal: isLocal) + public static func metadata( + tags: Set = Set(), + isLocal: Bool = true, + ignoreRedundantDependencies: Bool = false + ) -> TargetMetadata { + self.init(tags: tags, isLocal: isLocal, ignoreRedundantDependencies: ignoreRedundantDependencies) } } #if DEBUG extension TargetMetadata { public static func test( - tags: Set = [] + tags: Set = [], + ignoreRedundantDependencies: Bool = false ) -> TargetMetadata { TargetMetadata.metadata( - tags: tags + tags: tags, + ignoreRedundantDependencies: ignoreRedundantDependencies ) } }