Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build issue: Integration of SwiftLint into Xcode project not working on Apple Silicon Macs #532

Open
KarinBerg opened this issue Jul 31, 2023 · 1 comment

Comments

@KarinBerg
Copy link
Contributor

Problem:
The integration of SwiftLint into the Swinject Xcode project not working on Apple Silicon Macs if you installed SwiftLint via Homebrew.

This is from the README.md of "https://github.com/realm/SwiftLint":
If you installed SwiftLint via Homebrew on Apple Silicon, you might experience this warning:

warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint

That is because Homebrew on Apple Silicon installs the binaries into the /opt/homebrew/bin folder by default. To instruct Xcode where to find SwiftLint, you can either add /opt/homebrew/bin to the PATH environment variable in your build phase

if [[ "$(uname -m)" == arm64 ]]; then
    export PATH="/opt/homebrew/bin:$PATH"
fi

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

BProg commented Jan 16, 2024

Thanks, it works 👍🏽
Can this be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants