Add SwiftLint to your Xcode Project or Swift Package as a Plugin

5am-swift-lint

Add SwiftLint to your Xcode Project or Swift Package as a Plugin.

Info

Requirements

  • macOS version 10.15 Catalina
  • Swift 5.7

Add to Xcode Project

  1. Add this repo https://github.com/5amdotis/5am-swift-lint as Swift Package to your project
  2. Add SwiftLintPlugin to Run Build Tool Plug-ins in Build Phases
  3. Build project
  4. Trust and Enable Build Plug-ins
  5. For CI/CD: add option -skipPackagePluginValidation to xcodebuild command

Add to Swift Package

  1. Add dependency

dependencies: [
    // ...
    .package(url: "https://github.com/5amdotis/5am-swift-lint", from: "1.0.0"),
]
  1. Add to target

targets: [
    .target(
        name: "YOUR_TARGET",
        dependencies: [],
        plugins: [
            .plugin(name: "SwiftLintPlugin", package: "5am-swift-lint")
        ]
    ),
]
  1. Build package
  2. Trust and Enable Build Plug-ins

License

5am-swift-lint is licenced under BSD 3-Clause License.

GitHub

View Github