Swiftpack.co - taji-taji/DangerSwiftPeriphery as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by taji-taji.
taji-taji/DangerSwiftPeriphery 1.0.0
Danger Swift plugin to run Periphery on CI.
⭐️ 0
🕓 4 weeks ago
.package(url: "https://github.com/taji-taji/DangerSwiftPeriphery.git", from: "1.0.0")

DangerSwiftPeriphery

Danger Swift plugin to run Periphery on CI.

Test MIT License

Features

This plugin will comment unreferenced code detected by periphery via Danger Swift.

Image

Usage

Preparation

Package.swift

let package = Package(
    // ...
    dependencies: [
        // Danger
        .package(name: "danger-swift", url: "https://github.com/danger/swift.git", from: "3.0.0"), // dev
        // Danger Plugins
        // Add the line below.
        .package(name: "DangerSwiftPeriphery", url: "https://github.com/taji-taji/DangerSwiftPeriphery.git", from: "1.0.0"), // dev
    ],
    targets: [
        // ...
        // Add DangerSwiftPeriphery to dependencies in DangerDependencies.
        .target(name: "DangerDependencies",
                dependencies: [
                    .product(name: "Danger", package: "danger-swift"),
                    "DangerSwiftPeriphery",
                ]),
        // ...
    ]
)

Dangerfile.swift

If you have a .periphery.yml file, simply include the following in Dangerfile.swift

import Danger
import DangerSwiftPeriphery

DangerPeriphery.scan()

Alternatively, periphery options can be passed as arguments.

import Danger
import DangerSwiftPeriphery

DangerPeriphery.scan(arguments: [
    "--workspace MaApp.xcworkspace",
    "--schemes MyApp",
    "--index-store-path /path/to/index/store",
    "--skip-build"
])

You may also specify the location of periphery binaries.

import DangerSwiftPeriphery

DangerPeriphery.scan(peripheryPath: "/path/to/periphery")

GitHub

link
Stars: 0
Last commit: 4 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Dependencies

Release Notes

4 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics