Skip to content

Commit 06288c6

Browse files
Apply standard Swift package configuration (#21)
* Apply standard Swift package configuration * Resolve Swift package dependencies * Update Swift workflow
1 parent 1c06299 commit 06288c6

3 files changed

Lines changed: 9 additions & 80 deletions

File tree

.github/workflows/swift.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
steps:
2121
- name: Checkout source
2222
uses: actions/checkout@v6
23-
- name: Download swiftlint binary
23+
- name: Resolve package dependencies
2424
run: swift package resolve
2525
- name: Lint
2626
run: >
27-
"$(find ".build/artifacts/swiftlint" -path "*macos*" -type f -name swiftlint -perm +111 -print -quit)"
27+
swift package plugin --allow-writing-to-package-directory swiftlint --
2828
lint --strict --reporter github-actions-logging
2929
- name: Resolve package dependencies
3030
run: xcodebuild -resolvePackageDependencies

Package.resolved

Lines changed: 4 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let package = Package(
2121
],
2222
dependencies: [
2323
.package(
24-
url: "https://github.com/realm/SwiftLint.git",
24+
url: "https://github.com/SimplyDanny/SwiftLintPlugins.git",
2525
exact: "0.59.1"),
2626
.package(
2727
url: "https://github.com/Quick/Nimble.git",
@@ -45,6 +45,7 @@ package.targets.forEach { target in
4545
.regular,
4646
.test,
4747
.executable,
48+
.macro,
4849
]
4950

5051
guard types.contains(target.type)
@@ -61,7 +62,7 @@ package.targets.forEach { target in
6162

6263
if enableSwiftLintBuildToolPlugin {
6364
target.plugins = (target.plugins ?? []) + [
64-
.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLint"),
65+
.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins"),
6566
]
6667
}
6768
}

0 commit comments

Comments
 (0)