Closed wassup- closed 9 months ago
The plugin is not working for me on an SPM project.
I think the issue is that the plugin is trying to find swiftlint instead of swiftformat (see https://github.com/vknabel/vscode-swiftformat/blob/860f358d1237c765c962cc95fa32dd14a95b20b2/src/Current.ts#L79C38-L79C47)
swiftlint
swiftformat
My Package.swift:
Package.swift
import PackageDescription let package = Package( name: "...", platforms: [ ... ], dependencies: [ .package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.50.4"), ... ], targets: [ ... ] )
Extension settings:
{ "swiftformat.onlyEnableOnSwiftPMProjects": true, "swiftformat.onlyEnableWithConfig": true }
I do have a .swiftformat configuration file in the root directory, and the following command works from terminal swift package plugin --allow-writing-to-package-directory swiftformat
.swiftformat
swift package plugin --allow-writing-to-package-directory swiftformat
Good catch! Thanks for the issue. I just released a fix!
The plugin is not working for me on an SPM project.
I think the issue is that the plugin is trying to find
swiftlint
instead ofswiftformat
(see https://github.com/vknabel/vscode-swiftformat/blob/860f358d1237c765c962cc95fa32dd14a95b20b2/src/Current.ts#L79C38-L79C47)My
Package.swift
:Extension settings:
I do have a
.swiftformat
configuration file in the root directory, and the following command works from terminalswift package plugin --allow-writing-to-package-directory swiftformat