diff --git a/Sources/UseGraphPeriphery/UseGraphDynamic.swift b/Sources/UseGraphPeriphery/UseGraphDynamic.swift index cbdf4e1..558b5f0 100644 --- a/Sources/UseGraphPeriphery/UseGraphDynamic.swift +++ b/Sources/UseGraphPeriphery/UseGraphDynamic.swift @@ -55,12 +55,9 @@ public struct UseGraphPeripheryBuildCommand: AsyncParsableCommand { @Option(help: "Path to project (.xcodeproj)") var projectPath: String? = nil - @Argument(help: "Schemes to analyze") + @Option(help: "Schemes to analyze") var schemes: String - @Argument(help: "Targets to analyze") - var targets: String - public func run() async throws { let configuration = Configuration() if let projectPath { diff --git a/Sources/UseGraphPeriphery/UseGraphPeripheryCommand.swift b/Sources/UseGraphPeriphery/UseGraphPeripheryCommand.swift index b7db329..fcc1d0e 100644 --- a/Sources/UseGraphPeriphery/UseGraphPeripheryCommand.swift +++ b/Sources/UseGraphPeriphery/UseGraphPeripheryCommand.swift @@ -17,39 +17,25 @@ public struct UseGraphPeripheryAnalyzeCommand: AsyncParsableCommand { version: "0.0.1" ) - @Argument(help: "Path to project (.xcodeproj)") + @Option(help: "Path to project (.xcodeproj)") var projectPath: String? = nil - @Argument(help: "Paths to folder with sources - \"path1,path2,path3\"") - var folderPaths: String? = nil + @Option(help: "Paths to folder with sources - \"path1,path2,path3\"") + var folderPaths: String - @Argument(help: "Schemes to analyze") + @Option(help: "Schemes to analyze") var schemes: String - @Argument(help: "Targets to analyze") - var targets: String - - @Option(help: "Use if you want to exclude any entity names") - var excludedNames: String? = nil - - @Option(help: "Use if you want to exclude any targets") - var excludedTargets: String? = nil - public func run() async throws { var projectURL: URL? - var folderURLs: [String] = [] + let folderURLs: [String] = try folderPaths.split(separator: ",").map { + guard let folderURL = URL(string: String($0)) else { throw PathError.pathIsNotCorrect } + return folderURL.path() + } if let projectPath { projectURL = URL(string: projectPath) } - if let folderPaths { - folderURLs = try folderPaths.split(separator: ",").map { - guard let folderURL = URL(string: String($0)) else { throw PathError.pathIsNotCorrect } - return folderURL.path() - } - } else { - throw PathError.pathIsNotCorrect - } guard let projectURL else { throw PathError.pathIsNotCorrect } let configuration = Configuration()