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

SwiftLint as Xcode Plugin doesn't work on Xcode Cloud #4484

Closed
2 tasks done
JagCesar opened this issue Oct 28, 2022 · 0 comments · Fixed by #4485
Closed
2 tasks done

SwiftLint as Xcode Plugin doesn't work on Xcode Cloud #4484

JagCesar opened this issue Oct 28, 2022 · 0 comments · Fixed by #4485

Comments

@JagCesar
Copy link
Contributor

New Issue Checklist

Describe the bug

When setting up SwiftLint as an Xcode Plugin it always fails in Xcode Cloud builds. This happens because Xcode Cloud doesn't have write access to pluginWorkDirectory or .cachesDirectory.

Complete output when running SwiftLint, including the stack trace and command used
…
2022-10-27T11:29:16.891006545Z	Done linting! Found 13 violations, 0 serious in 612 files.
2022-10-27T11:29:16.891087138Z	Error: You don’t have permission to save the file “30cde6e7dbce7eecb2a554e9f928c329b93
2022-10-27T11:29:16.891194169Z	5109f468fa23b621c67e13581183e.plist” in the folder “B0249
2022-10-27T11:29:16.891286022Z	CAF-F
2022-10-27T11:29:16.891350071Z	879-3BE8-8269-FC397BB
2022-10-27T11:29:16.891423633Z	A4E12\342\200
2022-10-27T11:29:16.891483188Z	\235.
2022-10-27T11:29:16.891612278Z	Command PhaseScriptExecution failed with a nonzero exit code
…

Environment

  • SwiftLint version:
    0.50.0-rc.2

  • Installation method used:
    SPM, installed as Xcode Plugin

  • Paste your configuration file:
    Not relevant

  • Are you using nested configurations?
    No

  • Which Xcode version are you using (check xcodebuild -version)?
    Version 14.1 (14B47)

  • Do you have a sample that shows the issue? Run echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
    to quickly test if your example is really demonstrating the issue. If your example is more
    complex, you can use swiftlint lint --path [file here] --no-cache --enable-all-rules.

    No, only reproducible on Xcode Cloud

JagCesar added a commit to JagCesar/SwiftLint that referenced this issue Oct 28, 2022
westerlund pushed a commit to JagCesar/SwiftLint that referenced this issue Oct 31, 2022
jpsim pushed a commit to JagCesar/SwiftLint that referenced this issue Nov 1, 2022
Fixes realm#4484 by checking the process environment for all the expected
environment variables set by Xcode Cloud.
jpsim pushed a commit that referenced this issue Nov 1, 2022
Fixes #4484 by checking the process environment for all the expected
environment variables set by Xcode Cloud.
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

Successfully merging a pull request may close this issue.

1 participant