File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
Sources/SwiftRefactor/PackageManifest Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ public struct AddPackageDependency: ManifestEditRefactoringProvider {
86
86
87
87
if let existingDependencies = packageCall. findArgument ( labeled: " dependencies " ) {
88
88
// If we have an existing dependencies array, we need to check if
89
+ // it's already added.
89
90
if let expr = existingDependencies. expression. as ( ArrayExprSyntax . self) {
90
91
// Iterate through existing dependencies and look for an argument that matches
91
92
// either the `id` or `url` argument of the new dependency.
Original file line number Diff line number Diff line change @@ -27,10 +27,6 @@ public struct AddPluginUsage: ManifestEditRefactoringProvider {
27
27
}
28
28
}
29
29
30
- /// The set of argument labels that can occur after the "plugins"
31
- /// argument in the Target initializers. (There aren't any right now)
32
- private static let argumentLabelsAfterPluginUsages : Set < String > = [ ]
33
-
34
30
/// Produce the set of source edits needed to add the given package
35
31
/// dependency to the given manifest file.
36
32
public static func manifestRefactor(
@@ -49,7 +45,7 @@ public struct AddPluginUsage: ManifestEditRefactoringProvider {
49
45
50
46
let newTargetCall = try targetCall. appendingToArrayArgument (
51
47
label: " plugins " ,
52
- labelsAfter: Self . argumentLabelsAfterPluginUsages ,
48
+ labelsAfter: [ ] ,
53
49
newElement: pluginUsage. asSyntax ( )
54
50
)
55
51
You can’t perform that action at this time.
0 commit comments