Comments (11)
Thanks @valeriomazzeo !
So danger-xcov
wasn't doing any options validation and it does now. I think it's safer to keep it on but then you would need to change that minimum_coverage_percentage
from 70
to 70.0
😢.
I know it's going to break backwards compatibility but default_value
will work from now on, in addition users will get some light when an incorrect parameters is set.
Again thank you very much for your help. You have been my eyes getting this fixed 🙌.
from xcov.
Thanks for the logs @valeriomazzeo, this is very helpful 👍.
In the meantime I recommend you folks to add the following to your Gemfile:
gem 'xcov', '1.2.0'
from xcov.
Hi @AvdLee 👋
Thanks for reporting. It's weird as when output_directory
is not defined it should fallback to the default value. I'll keep you updated 👍
from xcov.
@AvdLee could you post the exception raised by xcov please?
from xcov.
@nakiostudio I was about to open the very same issue
/Users/valerio/.rvm/gems/ruby-2.4.1/gems/xcov-1.3.0/lib/xcov-core.rb:16:in `join': (Danger::DSLError)
[!] Invalid `Dangerfile` file: no implicit conversion of nil into String
# from Dangerfile:29
# -------------------------------------------
# # code coverage
> xcov.report(
# scheme: "MyProject",
# -------------------------------------------
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/xcov-1.3.0/lib/xcov-core.rb:16:in `parse'
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/xcov-1.3.0/lib/xcov/manager.rb:48:in `parse_xccoverage'
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/danger-xcov-0.3.1/lib/danger_plugin.rb:53:in `report'
from Dangerfile:29:in `block in parse'
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/danger-5.3.3/lib/danger/danger_core/dangerfile.rb:199:in `eval'
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/danger-5.3.3/lib/danger/danger_core/dangerfile.rb:199:in `block in parse'
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/danger-5.3.3/lib/danger/danger_core/dangerfile.rb:195:in `instance_eval'
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/danger-5.3.3/lib/danger/danger_core/dangerfile.rb:195:in `parse'
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/danger-5.3.3/lib/danger/danger_core/dangerfile.rb:272:in `run'
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/danger-5.3.3/lib/danger/commands/local.rb:56:in `block in run'
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/danger-5.3.3/lib/danger/commands/local_helpers/local_setup.rb:38:in `setup'
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/danger-5.3.3/lib/danger/commands/local.rb:55:in `run'
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
from /Users/valerio/.rvm/gems/ruby-2.4.1/gems/danger-5.3.3/bin/danger:5:in `<top (required)>'
from /Users/valerio/.rvm/gems/ruby-2.4.1/bin/danger:23:in `load'
from /Users/valerio/.rvm/gems/ruby-2.4.1/bin/danger:23:in `<main>'
from /Users/valerio/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
from /Users/valerio/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'
It seems to me the default value is now missing.
By the way, this issue only seems to appear when running xcov
through danger-xcov
.
Also, using through danger, the env XCOV_OUTPUT_DIRECTORY
is completely ignored.
from xcov.
@nakiostudio danger-xcov 0.3.2
[!] The exception involves the following plugins:
- danger-xcov
bundler: failed to load command: danger (/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/bin/danger)
Danger::DSLError:
[!] Invalid `Dangerfile` file: undefined method `__hash__' for #<Hash:0x007fb68baf7e10>
# from Dangerfile:29
# -------------------------------------------
# # code coverage
> xcov.report(
# scheme: "myproj",
# -------------------------------------------
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/gems/danger-xcov-0.3.2/lib/danger_plugin.rb:92:in `convert_options'
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/gems/danger-xcov-0.3.2/lib/danger_plugin.rb:46:in `report'
Dangerfile:29:in `block in parse'
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/gems/danger-5.3.3/lib/danger/danger_core/dangerfile.rb:199:in `eval'
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/gems/danger-5.3.3/lib/danger/danger_core/dangerfile.rb:199:in `block in parse'
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/gems/danger-5.3.3/lib/danger/danger_core/dangerfile.rb:195:in `instance_eval'
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/gems/danger-5.3.3/lib/danger/danger_core/dangerfile.rb:195:in `parse'
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/gems/danger-5.3.3/lib/danger/danger_core/dangerfile.rb:272:in `run'
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/gems/danger-5.3.3/lib/danger/danger_core/executor.rb:27:in `run'
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/gems/danger-5.3.3/lib/danger/commands/runner.rb:66:in `run'
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/gems/danger-5.3.3/bin/danger:5:in `<top (required)>'
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/bin/danger:23:in `load'
/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/bin/danger:23:in `<top (required)>'
from xcov.
@nakiostudio danger-xcov 0.3.3
bundler: failed to load command: danger (/Users/travis/build/myorg/myproj/vendor/bundle/ruby/2.4.0/bin/danger)
Danger::DSLError:
[!] Invalid `Dangerfile` file: 'minimum_coverage_percentage' value must be a Float! Found Integer instead.
# from Dangerfile:24
# -------------------------------------------
# # code coverage
> xcov.report(
# scheme: "myproj",
# -------------------------------------------
from xcov.
Hi again @valeriomazzeo 👋
Thanks for the logs, sorry that I have to fix this completely blind. Can I see how you are instantiating the xcov plugin in your Dangerfile please? (removing any sensitive information).
from xcov.
@nakiostudio no problem at all 👍
This was working before:
xcov.report(
scheme: "myscheme",
workspace: "myworkspace.xcworkspace",
ignore_file_path: ".xcovignore",
include_targets: "myscheme.app",
minimum_coverage_percentage: 70
)
from xcov.
no problem, I will change it to be a float, make sure to update the documentation 💯
from xcov.
I will! thank you both for reporting @valeriomazzeo @AvdLee 🍻
from xcov.
Related Issues (20)
- Swift Package Manager Mandatory fields
- [!] Could not find option 'workspace' in the list of available options: HOT 2
- Reports 0% Code Coverage with Xcode 12.5
- Exclude subset of ignored files in .xcovignore HOT 1
- xccov_file_direct_path cannot treat with multiple files
- Missing `clean: true` to delete the existing code coverage data HOT 3
- Parsing Coverage Data for Swift Packages HOT 1
- Invalid coverage report for SPM with dependencies HOT 2
- Missing git information when uploading to coveralls
- Could not find option 'xccov_file_direct_path' in the list of available options HOT 1
- Modernize HTML templates
- Fix root directory when opening files
- How can we ignore `Swift Package Dependencies` HOT 4
- Bad CPU type in executable HOT 6
- .xcovignore file not working HOT 1
- Target with no valid files is considered as having 0% coverage
- Xcov 1.8.1 : Xcov not able to find ignore file path HOT 4
- Include files (opposite of ignore)
- `PBXProject` attempted to initialize an object with unknown ISA `XCLocalSwiftPackageReference`
- "Error occured while exporting xccovreport from xcresult" when "xcov_report" folder already exists HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xcov.