-
Notifications
You must be signed in to change notification settings - Fork 350
Expand file tree
/
Copy pathPackage.swift
More file actions
60 lines (55 loc) · 1.65 KB
/
Copy pathPackage.swift
File metadata and controls
60 lines (55 loc) · 1.65 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// swift-tools-version: 5.6
import PackageDescription
let package = Package(
name: "AirbnbSwift",
platforms: [.macOS(.v10_13)],
products: [
.plugin(name: "FormatSwift", targets: ["FormatSwift"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.3")
],
targets: [
.plugin(
name: "FormatSwift",
capability: .command(
intent: .custom(
verb: "format",
description: "Formats Swift source files according to the Airbnb Swift Style Guide"
),
permissions: [
.writeToPackageDirectory(reason: "Format Swift source files")
]
),
dependencies: [
"AirbnbSwiftFormatTool",
"swiftformat",
"SwiftLintBinary",
]
),
.executableTarget(
name: "AirbnbSwiftFormatTool",
dependencies: [
.product(name: "ArgumentParser", package: "swift-argument-parser")
],
resources: [
.process("airbnb.swiftformat"),
.process("swiftlint.yml"),
]
),
.testTarget(
name: "AirbnbSwiftFormatToolTests",
dependencies: ["AirbnbSwiftFormatTool"]
),
.binaryTarget(
name: "swiftformat",
url: "https://github.com/calda/SwiftFormat-nightly/releases/download/2026-07-07/SwiftFormat.artifactbundle.zip",
checksum: "aa108373407da339355f896c77254519e667e5905db9d239b767ac315e275b4c"
),
.binaryTarget(
name: "SwiftLintBinary",
url: "https://github.com/realm/SwiftLint/releases/download/0.62.2/SwiftLintBinary.artifactbundle.zip",
checksum: "3047357eee0838a0bafc7a6e65cd1aad61734b30d7233e28f3434149fe02f522"
),
]
)