-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackage.swift
More file actions
40 lines (38 loc) · 1.45 KB
/
Package.swift
File metadata and controls
40 lines (38 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// swift-tools-version: 5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "SwiftLintPlugin",
products: [
.plugin(name: "SwiftLintBuildPlugin", targets: ["SwiftLintBuildPlugin"]),
.plugin(name: "SwiftLintPlugin", targets: ["SwiftLintPlugin"]),
.plugin(name: "SwiftLintFixPlugin", targets: ["SwiftLintFixPlugin"])
],
targets: [
.plugin(
name: "SwiftLintBuildPlugin",
capability: .buildTool(),
dependencies: ["SwiftLintBinary"]
),
.plugin(
name: "SwiftLintPlugin",
capability: .command(
intent: .custom(verb: "swiftlint", description: "Shows errors and warnings from SwiftLint")
),
dependencies: ["SwiftLintBinary"]
),
.plugin(
name: "SwiftLintFixPlugin",
capability: .command(
intent: .sourceCodeFormatting(),
permissions: [.writeToPackageDirectory(reason: "This command fixes lint issues")]
),
dependencies: ["SwiftLintBinary"]
),
.binaryTarget(
name: "SwiftLintBinary",
url: "https://github.com/realm/SwiftLint/releases/download/0.59.1/SwiftLintBinary.artifactbundle.zip",
checksum: "b9f915a58a818afcc66846740d272d5e73f37baf874e7809ff6f246ea98ad8a2"
)
]
)