The Plugin works when I select the target and select "Format Source Code".
However this doesn't work as a build action.
Apply build tool plug-in “Format Source Code” to target “MyFramework” in package “myframework-ios”
internalError("invalid plugin capability command(intent: PackageModel.PluginCommandIntent.sourceCodeFormatting, permissions: [PackageModel.PluginPermission.writeToPackageDirectory(reason: \"This command formats the Swift source files\")])")
Plug-in invocation failed: internalError("invalid plugin capability command(intent: PackageModel.PluginCommandIntent.sourceCodeFormatting, permissions: [PackageModel.PluginPermission.writeToPackageDirectory(reason: \"This command formats the Swift source files\")])")
My guess is that the --allow-writing-to-package-directory is missing by the internal invocation.
Am I missing something or isn't it intended to run those tools as a build action?
swift-tools-version is 5.9
Embedded in Package.swift of my library as
The error message doesn't seem too great, but what it is trying to convey is that you cannot use a command plugin during the build. Only build-tool plugins can be used during the build.
I came across this searching for a way to integrate swift-format's formatting and linting with the Xcode build process - is there anyway as of now to do this or are we stuck with the command line when using apple's swift-format?