Skip to content

Commit 37fb603

Browse files
committed
bullet format file errors
1 parent 8a3dd4d commit 37fb603

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Plugins/PluginsShared/PluginError.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ enum PluginError: Swift.Error, CustomStringConvertible, LocalizedError {
3737
let targetNames = targetNames.joined(separator: ", ", lastSeparator: " and ")
3838
return "Found no targets with names \(targetNames)."
3939
case .fileErrors(let fileErrors):
40-
return "Issues with required files: \(fileErrors.map(\.description).joined(separator: ", and"))."
40+
return "Issues with required files:\n\(fileErrors.map { $0 .description.prepended("- ") }.joined(separator: "\n"))."
4141
}
4242
}
4343

Plugins/PluginsShared/PluginUtils.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,9 @@ extension Array where Element == String {
9797
return "\(self.dropLast().joined(separator: separator))\(lastSeparator)\(self.last!)"
9898
}
9999
}
100+
101+
extension String {
102+
func prepended(_ prefix: String) -> String {
103+
return prefix + self
104+
}
105+
}

0 commit comments

Comments
 (0)