Running swiftlint rules is throwing a fatal error. I'm using Xcode 11.0 and I believe the issue might be related to this version of Xcode or MacOS Catalina.
$ swiftlint rules
Fatal error: Loading sourcekitd.framework/Versions/A/sourcekitd failed: file /Users/marcelofabri/SwiftLint/.build/checkouts/SourceKitten/Source/SourceKittenFramework/library_wrapper.swift, line 66
zsh: illegal hardware instruction Pods/SwiftLint/swiftlint rules
excluded:
- Pods
# Rule identifiers to exclude from running
disabled_rules:
- trailing_whitespace
# Minimum line length
line_length: 240
# Minimum identifier length
identifier_name:
min_length: 2
Do you also get a similar failure when running swiftlint help? Printing the result of xcodebuild -version would be useful too. Finally, could you please share the results of running these steps?
$ git clone https://github.com/realm/SwiftLint.git
$ cd SwiftLint
$ swift run swiftlint rules
Thanks for your help. I rely on this information to diagnose the issue because I don't have a machine running Catalina available to me and haven't been able to reproduce this issue with Mojave and Xcode 11 beta 2.
When running xcodebuild -version I noticed the following error:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
I referred to this thread on Stack Overflow and solved the issue. Afterwards, I was able to run swiftlint rules. I'm therefore closing the issue as it was an environment error.
Thanks for the help! 馃槃
Most helpful comment
When running
xcodebuild -versionI noticed the following error:I referred to this thread on Stack Overflow and solved the issue. Afterwards, I was able to run
swiftlint rules. I'm therefore closing the issue as it was an environment error.Thanks for the help! 馃槃