Skip to content

Commit 4e6a429

Browse files
Apply standard Swift package configuration (#391)
* Apply standard Swift package configuration * Update package dependencies * Update lint rules * Fix
1 parent eb8ac90 commit 4e6a429

3 files changed

Lines changed: 11 additions & 73 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: 6 additions & 69 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
@@ -24,7 +24,7 @@ let package = Package(
2424
],
2525
dependencies: [
2626
.package(
27-
url: "https://github.com/realm/SwiftLint.git",
27+
url: "https://github.com/SimplyDanny/SwiftLintPlugins.git",
2828
exact: "0.59.1"),
2929
.package(
3030
url: "https://github.com/Quick/Nimble.git",
@@ -62,6 +62,7 @@ package.targets.forEach { target in
6262
.regular,
6363
.test,
6464
.executable,
65+
.macro,
6566
]
6667

6768
guard types.contains(target.type)
@@ -78,7 +79,7 @@ package.targets.forEach { target in
7879

7980
if enableSwiftLintBuildToolPlugin {
8081
target.plugins = (target.plugins ?? []) + [
81-
.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLint"),
82+
.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins"),
8283
]
8384
}
8485
}

0 commit comments

Comments
 (0)