Open skydivedan opened 5 months ago
additionally, the docs say that when building my Package.swift
file, I should add the the target like this:
.target(name: "eigen", dependencies: ["Danger"], path: "Artsy", sources: ["Stringify.swift"]),
Which I was unable to do exactly.... mine looks like this:
.target(name: "eigen", dependencies: [.product(name: "Danger", package: "swift")], path: "Artsy", sources: ["Stringify.swift"]),
When I do this, Package.resolved
does not include Swiftlint. The result of Package.resolved
behaves as if isDevelop
is false
-- which is weird considering that I can see that it's set to true
right in the Package.swift file itself. So, I don't know why I'm seeing this behavior.
A quick fix would be to run something like:
brew install swiftlint
on your CI.
And in case you don't want to waste time on installing swiftlint you can always provide it as an executable.
You can do that by setting the swiftlintPath
property to .bin(<Path>)
.
Why would that be? The "danger-swift" Package contains SwiftLint as a dependency, so wouldn't it be able to run SwiftLint?
No I don't think that this is true. Are you using the --cwd
on the command? May you please share it with us?
My environment is CircleCI, just so you know. and this is running as a Mac executor.
My
Dangerfile.swift
file looks like this:Now, while Danger does write in my PR about modified and created files,
SwiftLint.lint()
run, and gives this error:/bin/sh: swiftlint: command not found
Why would that be? The "danger-swift" Package contains SwiftLint as a dependency, so wouldn't it be able to run SwiftLint? Do I need to actually install SwiftLint? If so, then what does the SwiftLint dependency do?