Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/genesis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
- name: Generate Xcode project
working-directory: ${{ steps.mktemp.outputs.directory }}
run: xcodegen
- name: Download swiftlint binary
- name: Resolve package dependencies
working-directory: ${{ steps.mktemp.outputs.directory }}
run: swift package resolve
- name: Lint
working-directory: ${{ steps.mktemp.outputs.directory }}
run: >
"$(find ".build/artifacts/swiftlint" -path "*macos*" -type f -name swiftlint -perm +111 -print -quit)"
swift package plugin --allow-writing-to-package-directory swiftlint --
lint --strict --reporter github-actions-logging
- name: Resolve package dependencies
working-directory: ${{ steps.mktemp.outputs.directory }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v6
- name: Download swiftlint binary
- name: Resolve package dependencies
run: swift package resolve
- name: Lint
run: >
"$(find ".build/artifacts/swiftlint" -path "*macos*" -type f -name swiftlint -perm +111 -print -quit)"
swift package plugin --allow-writing-to-package-directory swiftlint --
lint --strict --reporter github-actions-logging
57 changes: 6 additions & 51 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ let package = Package(
url: "https://github.com/uber/needle.git",
exact: "0.25.1"),
.package(
url: "https://github.com/realm/SwiftLint.git",
url: "https://github.com/SimplyDanny/SwiftLintPlugins.git",
exact: "0.59.1"),
.package(
url: "https://github.com/Quick/Nimble.git",
Expand Down Expand Up @@ -127,6 +127,7 @@ package.targets.forEach { target in
.regular,
.test,
.executable,
.macro,
]

guard types.contains(target.type)
Expand All @@ -143,7 +144,7 @@ package.targets.forEach { target in

if enableSwiftLintBuildToolPlugin {
target.plugins = (target.plugins ?? []) + [
.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLint"),
.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins"),
]
}
}
4 changes: 2 additions & 2 deletions genesis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ files:
exact: "{{ nodes }}"),
{% endif %}
.package(
url: "https://github.com/realm/SwiftLint.git",
url: "https://github.com/SimplyDanny/SwiftLintPlugins.git",
exact: "0.59.1"),
]
)
Expand Down Expand Up @@ -1135,7 +1135,7 @@ files:
# https://github.com/realm/SwiftLint/blob/0.52.4/Source/swiftlint/Commands/SwiftLint.swift#L8
unset BUILD_WORKSPACE_DIRECTORY

"$(find ".build/artifacts/swiftlint" -path "*macos*" -type f -name swiftlint -perm +111 -print -quit)"
swift package plugin --allow-writing-to-package-directory swiftlint
else
echo "SwiftLint is skipped in CI."
fi
Expand Down