@@ -17,39 +17,25 @@ public struct UseGraphPeripheryAnalyzeCommand: AsyncParsableCommand {
1717 version: " 0.0.1 "
1818 )
1919
20- @Argument ( help: " Path to project (.xcodeproj) " )
20+ @Option ( help: " Path to project (.xcodeproj) " )
2121 var projectPath : String ? = nil
2222
23- @Argument ( help: " Paths to folder with sources - \" path1,path2,path3 \" " )
24- var folderPaths : String ? = nil
23+ @Option ( help: " Paths to folder with sources - \" path1,path2,path3 \" " )
24+ var folderPaths : String
2525
26- @Argument ( help: " Schemes to analyze " )
26+ @Option ( help: " Schemes to analyze " )
2727 var schemes : String
2828
29- @Argument ( help: " Targets to analyze " )
30- var targets : String
31-
32- @Option ( help: " Use if you want to exclude any entity names " )
33- var excludedNames : String ? = nil
34-
35- @Option ( help: " Use if you want to exclude any targets " )
36- var excludedTargets : String ? = nil
37-
3829 public func run( ) async throws {
3930 var projectURL : URL ?
40- var folderURLs : [ String ] = [ ]
31+ let folderURLs : [ String ] = try folderPaths. split ( separator: " , " ) . map {
32+ guard let folderURL = URL ( string: String ( $0) ) else { throw PathError . pathIsNotCorrect }
33+ return folderURL. path ( )
34+ }
4135
4236 if let projectPath {
4337 projectURL = URL ( string: projectPath)
4438 }
45- if let folderPaths {
46- folderURLs = try folderPaths. split ( separator: " , " ) . map {
47- guard let folderURL = URL ( string: String ( $0) ) else { throw PathError . pathIsNotCorrect }
48- return folderURL. path ( )
49- }
50- } else {
51- throw PathError . pathIsNotCorrect
52- }
5339
5440 guard let projectURL else { throw PathError . pathIsNotCorrect }
5541 let configuration = Configuration ( )
0 commit comments