Giter Site home page Giter Site logo

Comments (11)

nakiostudio avatar nakiostudio commented on April 27, 2024 5

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.

nakiostudio avatar nakiostudio commented on April 27, 2024 1

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.

nakiostudio avatar nakiostudio commented on April 27, 2024

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.

nakiostudio avatar nakiostudio commented on April 27, 2024

@AvdLee could you post the exception raised by xcov please?

from xcov.

valeriomazzeo avatar valeriomazzeo commented on April 27, 2024

@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.

valeriomazzeo avatar valeriomazzeo commented on April 27, 2024

@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.

valeriomazzeo avatar valeriomazzeo commented on April 27, 2024

@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.

nakiostudio avatar nakiostudio commented on April 27, 2024

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.

valeriomazzeo avatar valeriomazzeo commented on April 27, 2024

@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.

valeriomazzeo avatar valeriomazzeo commented on April 27, 2024

no problem, I will change it to be a float, make sure to update the documentation 💯

from xcov.

nakiostudio avatar nakiostudio commented on April 27, 2024

I will! thank you both for reporting @valeriomazzeo @AvdLee 🍻

from xcov.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.