twostraws / ControlRoom

A macOS app to control the Xcode Simulator.
MIT License
5.8k stars 305 forks source link

Locally install swiftlint #42

Closed jsorge closed 4 years ago

jsorge commented 4 years ago

When I first cloned the repo I got a build failure because I didn't have swiftlint installed using Homebrew. Instead of having that be the preferred behavior, this PR adds a script to locally download swiftlint to the repo and runs the script using that version.

To change the version of swiftlint the project uses, update the .swiftlint-version file at the source root.

Pros: • No more build failures because of a tool needing to be installed outside of the repo • Everyone will be using the same version of swiftlint

Cons: • A couple of additional seconds on the first build before swiftlint is downloaded.

twostraws commented 4 years ago

It's odd that you got a build error – I was under the impression that the build script only runs SwiftLint if it finds it.

veb commented 4 years ago

I don't have it installed, just checked homebrew too:

image

And it builds perfectly fine for me.

jsorge commented 4 years ago

Oh weird, it actually turns out that my brew'd swiftlint installation was hosed and would fail every time. When I removed it the project builds just fine without it.

So, we can close this out without merging or merge it if we want folks to consistently lint the project.

davedelong commented 4 years ago

I'm not sure how I feel about this. I generally don't approve of installing software on peoples' machines without their direct consent. The redeeming thing here is that it's installed locally to the git clone.

On the other hand, this does not account for SwiftLint already existing on their machine.