Skip to content

Commit 7b70650

Browse files
committed
fix: fix ci/cd add lint
1 parent 57e4d60 commit 7b70650

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,5 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16-
- name: Install SwiftLint (official installer)
17-
run: |
18-
curl -L https://github.com/realm/SwiftLint/releases/latest/download/portable_swiftlint.zip -o swiftlint.zip
19-
unzip swiftlint.zip -d swiftlint_bin
20-
sudo mv swiftlint_bin/swiftlint /usr/local/bin/swiftlint
21-
sudo chmod +x /usr/local/bin/swiftlint
22-
2316
- name: Run SwiftLint
24-
run: /usr/local/bin/swiftlint --strict
17+
run: swiftlint --strict

Package.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,13 @@ let package = Package(
4040
)
4141
]
4242
)
43+
44+
#if os(macOS)
45+
// Add the documentation compiler plugin if possible
46+
package.dependencies.append(
47+
.package(url: "https://github.com/lukepistrol/SwiftLintPlugin", from: "0.52.4")
48+
)
49+
package.targets.first?.plugins?.append(
50+
.plugin(name: "SwiftLint", package: "SwiftLintPlugin")
51+
)
52+
#endif

0 commit comments

Comments
 (0)