Swiftlint: Fatal error running `swiftlint rules` on Xcode 11 and MacOS Catalina

Created on 1 Jul 2019  路  2Comments  路  Source: realm/SwiftLint

New Issue Checklist

Describe the bug

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.

Complete output when running SwiftLint, including the stack trace and command used
$ 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

Environment

  • SwiftLint version? 0.33.0
  • Installation method used? Cocoapods
  • Configuration file:
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

Most helpful comment

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! 馃槃

All 2 comments

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! 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrtj picture mrtj  路  3Comments

ziryanov picture ziryanov  路  3Comments

BalestraPatrick picture BalestraPatrick  路  3Comments

Den-Ree picture Den-Ree  路  3Comments

larslockefeer picture larslockefeer  路  3Comments