Installing SwiftLint (and actually getting it working)

So you are humming along on a Swift project, and making excellent progress. However, somewhere in the back of your mind, you know that you should be doing things better, mainly due to your lack of experience in writing Swift code. In this case, you should be installing SwiftLint to help you with your code base.

The installation seems harmless enough:

brew install swiftlint

Once that finishes, however, you try to run a swiftlint command in the Terminal and are faced with this:

Fatal error: Loading sourcekitd.framework/Versions/A/sourcekitd failed: file SourceKittenFramework/library_wrapper.swift, line 39
Illegal instruction: 4

Fear not brave adventurer, you just have to get your Xcode select path correctly configured. With Xcode installed in the standard place, this command in the Terminal should get you all fixed up:

xcode-select -s /Applications/Xcode.app/Contents/Developer/

BTW, Happy Inventors’ Day to all my readers in Argentina.

Leave a Reply