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

tuist test with swiftlint script occured No lintable files found at paths: '' error #6280

Open
devssun opened this issue May 14, 2024 · 4 comments
Labels
type:bug Something isn't working

Comments

@devssun
Copy link

devssun commented May 14, 2024

What happened?

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

if which swiftlint > /dev/null; then
    swiftlint --config $SRCROOT/../../scripts/.swiftlint.yml --quiet
else
    echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi

I wrote the following script to introduce SwiftLint into my Tuist project, and there are no issues with the build. I also receive warnings from SwiftLint in Xcode. However, when I run the tuist test command, I encounter an error saying No lintable files found at paths: ''. Is there anything wrong with my script?

How do we reproduce it?

  1. add swiftlint script
  2. run tuist test

Error log

❌ Error: No lintable files found at paths: ''

macOS version

14.1

Tuist version

3.15.0

Xcode version

15.2

@devssun devssun added the type:bug Something isn't working label May 14, 2024
@fortmarek
Copy link
Member

I don't see anything wrong with the script. Would you able to provide a reproducible sample by reproducing your issue in a fresh project created by tuist init?

@devssun
Copy link
Author

devssun commented May 16, 2024

I made fresh project and run test tuist but still got error. (❌ Error: No lintable files found at paths: '')

Tuist_Example % tuist generate
Resolved cache profile 'Development' from Tuist's defaults
Generating workspace TuistExample.xcworkspace
Generating project TuistExample
Project generated.
Total time taken: 1.569s

Tuist_Example % tuist test
Generating project for testing
Generating workspace TuistExample.xcworkspace
Generating project TuistExample
Testing scheme TuistExample-Workspace
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:BECE0DD2-12A8-47F3-ABDE-BA991618C804, OS:17.2, name:iPad Pro (12.9-inch) (6th generation) }
{ platform:iOS Simulator, id:BECE0DD2-12A8-47F3-ABDE-BA991618C804, OS:17.2, name:iPad Pro (12.9-inch) (6th generation) }
Testing failed:
	Command PhaseScriptExecution failed with a nonzero exit code
	Testing cancelled because the build failed.

** TEST FAILED **


The following build commands failed:
	PhaseScriptExecution SwiftLint\ Script /Users/ook/Library/Developer/Xcode/DerivedData/TuistExample-gfalgpgxvbyskybozgskrxklabpj/Build/Intermediates.noindex/TuistExample.build/Debug-iphonesimulator/TuistExample.build/Script-9D9A70B30D6A75A6A82BD309.sh (in target 'TuistExample' from project 'TuistExample')
(1 failure)
[TuistExampleUI] Processing TuistExampleUI-Info.plist
[TuistExampleKit] Processing TuistExampleKit-Info.plist
[TuistExampleUITests] Processing TuistExampleUITests-Info.plist
[TuistExampleKitTests] Processing TuistExampleKitTests-Info.plist
[TuistExample] Running script SwiftLint Script
❌ Error: No lintable files found at paths: ''
The 'xcodebuild' command exited with error code 65
Consider creating an issue using the following link: https://github.com/tuist/tuist/issues/new/choose

@pepicrft
Copy link
Contributor

I made fresh project and run test tuist but still got error. (❌ Error: No lintable files found at paths: '')

Would you mind including that project that you created so that we can debug it there?

@devssun
Copy link
Author

devssun commented May 17, 2024

sure, please check this.
Tuist_Example.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants