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

Is it possible to use it without project configuration (xcodeproj)? #515

Open
josecelano opened this issue Jun 23, 2022 · 1 comment
Open

Comments

@josecelano
Copy link

I'm trying to generate a coverage report for a Swift Package.

I'm currently generating the report with a command like this:

xcodebuild test \
    -scheme BokenEngine \
    -destination "platform=iOS Simulator,name=iPhone 11" \
    -enableCodeCoverage=YES \
    -derivedDataPath=.DeriveData
ld -r \
    -o ./CombinedObject.o .DeriveData/Build/Intermediates.noindex/BokenEngine.build/Debug-iphonesimulator/BokenEngine.build/Objects-normal/arm64/*.o
xcrun llvm-cov report \
    --format=text \
    --instr-profile=".DeriveData/Build/ProfileData/860AB2C1-6615-42E7-93A8-9067DF75E7BA/Coverage.profdata" \
    --object="./CombinedObject.o"

I tried to use Slather but I get this error:

% slather coverage -s --scheme BokenEngine --build-directory ".DerivedData" --binary-file "./CombinedObject.o"
Slathering...
/Users/josecelano/.rvm/gems/ruby-3.0.0/gems/slather-2.7.2/lib/slather/command/coverage_command.rb:110:in `project': Must provide an xcodeproj either via the 'slather [SUBCOMMAND] [PROJECT].xcodeproj' command or through .slather.yml (StandardError)
	from /Users/josecelano/.rvm/gems/ruby-3.0.0/gems/slather-2.7.2/lib/slather/command/coverage_command.rb:67:in `setup_build_directory'
	from /Users/josecelano/.rvm/gems/ruby-3.0.0/gems/slather-2.7.2/lib/slather/command/coverage_command.rb:44:in `execute'
	from /Users/josecelano/.rvm/gems/ruby-3.0.0/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
	from /Users/josecelano/.rvm/gems/ruby-3.0.0/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in `execute'
	from /Users/josecelano/.rvm/gems/ruby-3.0.0/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
	from /Users/josecelano/.rvm/gems/ruby-3.0.0/gems/clamp-1.3.2/lib/clamp/command.rb:140:in `run'
	from /Users/josecelano/.rvm/gems/ruby-3.0.0/gems/slather-2.7.2/bin/slather:17:in `<top (required)>'
	from /Users/josecelano/.rvm/gems/ruby-3.0.0/bin/slather:23:in `load'
	from /Users/josecelano/.rvm/gems/ruby-3.0.0/bin/slather:23:in `<main>'

Would it be possible to use Slather without any project configuration?

By the way, I was looking for a GitHub Action to run Slather but I have not found it.

@colejd
Copy link

colejd commented Sep 27, 2022

I think this is a duplicate of #466. I'd love to see support for this added, myself.

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