Skip to content

Commit 6087ce5

Browse files
authored
Merge pull request #1096 from ahoppen/ahoppen/format-command-plugin
Add swift-format to the dependencies so the `Format Swift Code` command plugin can be used to format the codebase
2 parents c6953d1 + 7cc467d commit 6087ce5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.vscode/tasks.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@
3737
"$swiftc"
3838
],
3939
"type": "swift"
40+
},
41+
{
42+
"allowWritingToPackageDirectory": true,
43+
"args": [],
44+
"command": "format-source-code",
45+
"label": "Run swift-format",
46+
"type": "swift-plugin",
4047
}
4148
],
4249
"version": "2.0.0"

Package.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ var dependencies: [Package.Dependency] {
358358
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.2"),
359359
.package(url: "https://github.com/apple/swift-syntax.git", branch: relatedDependenciesBranch),
360360
.package(url: "https://github.com/apple/swift-crypto.git", from: "3.0.0"),
361+
// Not a build dependency. Used so the "Format Source Code" command plugin can be used to format sourcekit-lsp
362+
.package(url: "https://github.com/apple/swift-format.git", branch: relatedDependenciesBranch),
361363
]
362364
}
363365
}

0 commit comments

Comments
 (0)