This repository demonstrates the implementation of Command and Build Plugins for Apple's swift-format. It serves as a practical guide for integrating these plugins into your own Swift projects, showcasing easy-to-follow examples.
$ make lint
🛠️ lint
Building for debugging...
Build complete! (1.14s)
Sources/Model/ExampleModel.swift:12:1: warning: [Indentation] unindent by 2 spaces
error: swift-format invocation failed: NSTaskTerminationReason(rawValue: 1):1
make: *** [lint] Error 1
- Xcode 15.0.1 or later
Clone the repository:
$ git clone https://github.com/yourusername/AppleSwiftFormatPluginExample.git
Navigate to the project directory:
$ cd AppleSwiftFormatPluginExample
Set up the environment and open the Xcode project:
$ make app
There is already one violation of swift-format, so building in Xcode will confirm that an Xcode Warning is displayed.
The Command Plugin can be executed with $ make lint
, $ make format
.
- Introduction to SPM artifact bundles
- Collecting SwiftPM plugin ideas for the server (but not only) ecosystem
- cybozu/LicenseList / issues/Artifact Bundleをリリースに含めてほしい #4