swift icon indicating copy to clipboard operation
swift copied to clipboard

swiftlint: command not found - how can I fix this?

Open skydivedan opened this issue 1 year ago • 2 comments

My environment is CircleCI, just so you know. and this is running as a Mac executor.

My Dangerfile.swift file looks like this:

import Danger
let danger = Danger()

let editedFiles = danger.git.modifiedFiles + danger.git.createdFiles
message("These files have changed: \(editedFiles.joined(separator: ", "))")

SwiftLint.lint()

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?

skydivedan avatar Jan 19 '24 14:01 skydivedan