File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ extension FormatPlugin: CommandPlugin {
38
38
39
39
var argExtractor = ArgumentExtractor ( arguments)
40
40
let targetNames = argExtractor. extractOption ( named: " target " )
41
- let targetsToFormat = try context. package . targets ( named: targetNames)
41
+ let targetsToFormat = targetNames . isEmpty ? context . package . targets : try context. package . targets ( named: targetNames)
42
42
43
43
let configurationFilePath = argExtractor. extractOption ( named: " configuration " ) . first
44
44
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ extension LintPlugin: CommandPlugin {
39
39
// Extract the arguments that specify what targets to format.
40
40
var argExtractor = ArgumentExtractor ( arguments)
41
41
let targetNames = argExtractor. extractOption ( named: " target " )
42
- let targetsToFormat = try context. package . targets ( named: targetNames)
43
42
43
+ let targetsToFormat = targetNames. isEmpty ? context. package . targets : try context. package . targets ( named: targetNames)
44
44
let configurationFilePath = argExtractor. extractOption ( named: " configuration " ) . first
45
45
46
46
let sourceCodeTargets = targetsToFormat. compactMap { $0 as? SourceModuleTarget }
You can’t perform that action at this time.
0 commit comments