"Swiftlint" Error Message in the Terminal

Dev's, after installing "Swiftlint" via "Homebrew" in the Terminal, I received the fallowing Error Message on my new MacBook Pro 2021 M1. I am a member of HWS+ and I fallowed the instruction in the learning video. Any Idea or recommendations to fix or install "SwiftLint correctly? Thanks

"....UltimatePortfolio % swiftlint SourceKittenFramework/library_wrapper.swift:31: Fatal error: Loading sourcekitd.framework/Versions/A/sourcekitd failed zsh: trace trap swiftlint!"

Change you SwiftLint script in your project to:

alias swiftlint="/opt/homebrew/bin/swiftlint"

if swiftlint >/dev/null; then     swiftlint else     echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint" fi

What worked for me: open your project in xcode, go to preferences, tab 'locations'. change in 'command line tools' (reselect your current if only one available). it will prompt you then for your pwd. once done your swiftlint will work fine.

"Swiftlint" Error Message in the Terminal
 
 
Q