Giter Site home page Giter Site logo

danger-xcov's People

Contributors

alexskulinwork avatar junmo-kim avatar lonnyantunes avatar nakiostudio avatar orta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

danger-xcov's Issues

Unable to find any .xccoverage file (CircleCI)

Hi,

I'm getting Unable to find any .xccoverage file while running the danger-xcov with CircleCI.
It's working locally, I have tried to set the derived_data_path to Build following this issue (the scheme setting is ok).

gem install danger --version '~> 4.0' && danger
Fetching: danger-4.3.5.gem (100%)
Successfully installed danger-4.3.5
1 gem installed
[06:37:01]: Skipping file blacklisting as no ignore file was found at path 
[06:37:01]: $ xcodebuild -list -project ZappPlugins.xcodeproj
[06:37:02]: Skipping file blacklisting as no ignore file was found at path 

+-----------------------------+-----------------------+
|               Summary for xcov 1.2.0                |
+-----------------------------+-----------------------+
| scheme                      | ZappPlugins           |
| project                     | ZappPlugins.xcodeproj |
| derived_data_path           | Build                 |
| minimum_coverage_percentage | 90                    |
+-----------------------------+-----------------------+

[06:37:02]: Unable to find any .xccoverage file.
[06:37:02]: Make sure you have enabled 'Gather code coverage' setting on your scheme settings.
[06:37:02]: Alternatively you can provide the full path to your .xccoverage file.
[!] The exception involves the following plugins:
 -  danger-xcov

/Users/distiller/.gem/ruby/2.3.4/gems/xcov-1.2.0/lib/xcov/error_handler.rb:20:in `handle_error':  (Danger::DSLError)
[!] Invalid `Dangerfile` file: Error creating your coverage report - see the log above
 #  from Dangerfile:14
 #  -------------------------------------------
 #  # Check code tests coverage for the changed files in the PR
 >  xcov.report(
 #     scheme: 'ZappPlugins',
 #  -------------------------------------------
	from /Users/distiller/.gem/ruby/2.3.4/gems/xcov-1.2.0/lib/xcov/manager.rb:42:in `parse_xccoverage'
	from /Users/distiller/.gem/ruby/2.3.4/gems/danger-xcov-0.2.4/lib/danger_plugin.rb:53:in `report'
	from Dangerfile:14:in `block in parse'
	from /Users/distiller/.gem/ruby/2.3.4/gems/danger-5.2.2/lib/danger/danger_core/dangerfile.rb:199:in `eval'
	from /Users/distiller/.gem/ruby/2.3.4/gems/danger-5.2.2/lib/danger/danger_core/dangerfile.rb:199:in `block in parse'
	from /Users/distiller/.gem/ruby/2.3.4/gems/danger-5.2.2/lib/danger/danger_core/dangerfile.rb:195:in `instance_eval'
	from /Users/distiller/.gem/ruby/2.3.4/gems/danger-5.2.2/lib/danger/danger_core/dangerfile.rb:195:in `parse'
	from /Users/distiller/.gem/ruby/2.3.4/gems/danger-5.2.2/lib/danger/danger_core/dangerfile.rb:272:in `run'
	from /Users/distiller/.gem/ruby/2.3.4/gems/danger-5.2.2/lib/danger/danger_core/executor.rb:27:in `run'
	from /Users/distiller/.gem/ruby/2.3.4/gems/danger-5.2.2/lib/danger/commands/runner.rb:66:in `run'
	from /Users/distiller/.gem/ruby/2.3.4/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
	from /Users/distiller/.gem/ruby/2.3.4/gems/danger-5.2.2/bin/danger:5:in `<top (required)>'
	from /Users/distiller/.gem/ruby/2.3.4/bin/danger:22:in `load'
	from /Users/distiller/.gem/ruby/2.3.4/bin/danger:22:in `<main>'

gem install danger --version '~> 4.0' && danger returned exit code 1

I'm working with the must update xcov version:

gem install danger-xcov
Fetching: xcov-1.2.0.gem (100%)
Successfully installed xcov-1.2.0
Fetching: danger-xcov-0.2.4.gem (100%)
Successfully installed danger-xcov-0.2.4
2 gems installed

Thanks in advance :)
Udi

`Dangerfile` file: undefined method `map' for false:FalseClass

Hello, I am trying to get test coverage report using danger-xcov ruby
report = xcov.produce_report(
scheme: "MVVM-C",
workspace: "MVVM-C.xcworkspace",
minimum_coverage_percentage: 30.0
)
and getting this exception:
31: from /usr/local/bin/bundle:23:in <main>' 30: from /usr/local/bin/bundle:23:in load'
29: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/exe/bundle:37:in <top (required)>' 28: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/lib/bundler/friendly_errors.rb:130:in with_friendly_errors'
27: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/exe/bundle:49:in block in <top (required)>' 26: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/lib/bundler/cli.rb:24:in start'
25: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' 24: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/lib/bundler/cli.rb:30:in dispatch'
23: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' 22: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
21: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' 20: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/lib/bundler/cli.rb:494:in exec'
19: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/lib/bundler/cli/exec.rb:28:in run' 18: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/lib/bundler/cli/exec.rb:63:in kernel_load'
17: from /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/lib/bundler/cli/exec.rb:63:in load' 16: from /Users/dzmitry_shabailau/Documents/Workspace/hometask1/vendor/bundle/ruby/2.6.0/bin/danger:23:in <top (required)>'
15: from .../hometask1/vendor/bundle/ruby/2.6.0/bin/danger:23:in load' 14: from .../hometask1/vendor/bundle/ruby/2.6.0/gems/danger-8.2.2/bin/danger:5:in <top (required)>'
13: from .../hometask1/vendor/bundle/ruby/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in run' 12: from .../hometask1/vendor/bundle/ruby/2.6.0/gems/danger-8.2.2/lib/danger/commands/pr.rb:63:in run'
11: from .../hometask1/vendor/bundle/ruby/2.6.0/gems/danger-8.2.2/lib/danger/commands/local_helpers/local_setup.rb:43:in setup' 10: from.../hometask1/vendor/bundle/ruby/2.6.0/gems/danger-8.2.2/lib/danger/commands/pr.rb:64:in block in run'
9: from .../hometask1/vendor/bundle/ruby/2.6.0/gems/danger-8.2.2/lib/danger/danger_core/dangerfile.rb:287:in run' 8: from .../hometask1/vendor/bundle/ruby/2.6.0/gems/danger-8.2.2/lib/danger/danger_core/dangerfile.rb:201:in parse'
7: from .../hometask1/vendor/bundle/ruby/2.6.0/gems/danger-8.2.2/lib/danger/danger_core/dangerfile.rb:201:in instance_eval' 6: from .../hometask1/vendor/bundle/ruby/2.6.0/gems/danger-8.2.2/lib/danger/danger_core/dangerfile.rb:204:in block in parse'
5: from .../hometask1/vendor/bundle/ruby/2.6.0/gems/danger-8.2.2/lib/danger/danger_core/dangerfile.rb:311:in eval_file' 4: from .../hometask1/vendor/bundle/ruby/2.6.0/gems/danger-8.2.2/lib/danger/danger_core/dangerfile.rb:311:in eval'
3: from Dangerfile:104:in eval_file' 2: from .../hometask1/vendor/bundle/ruby/2.6.0/gems/danger-xcov-0.5.0/lib/danger_plugin.rb:58:in produce_report'
1: from .../hometask1/vendor/bundle/ruby/2.6.0/gems/danger-xcov-0.5.0/lib/danger_plugin.rb:58:in new' .../hometask1/vendor/bundle/ruby/2.6.0/gems/xcov-1.7.5/lib/xcov/ignore_handler.rb:10:in initialize': (Danger::DSLError)
[!] Invalid Dangerfile file: undefined method `map' for false:FalseClass
Did you mean? tap
from Dangerfile:104

report = xcov.produce_report(
scheme: "MVVM-C",

danger-xcov plugin keep complaining about the missing xccoverage file.

I have tried to use the danger-xcov plugin but I am stuck with this error. This issue is not happening in the main xcov tool https://github.com/fastlane-community/xcov but its happening in the danger plugin.

[18:39:31]: Unable to find any .xccoverage file.
[18:39:31]: Make sure you have enabled 'Gather code coverage' setting on your scheme settings.
[18:39:31]: Alternatively you can provide the full path to your .xccoverage file.

I am using Xcode 13 and I have provided the full path of xcresult which worked with just xcov but not with the danger-xcov


 report = xcov.produce_report(workspace: ENV['XCWORKSPACE'],
      scheme: ENV['SCHEME'],
      minimum_coverage_percentage: 90.00,
      xccov_file_direct_path: ENV['DANGER_XCRESULT_DIRECTORY'], 
      markdown_report: true)

xcov.output_report(report)#

where xcresult path is defined in the .env file export DANGER_XCRESULT_DIRECTORY="fastlane/test_output/$SCHEME.xcresult"

Issues

  • First issue that I see is xcov is not able to pick up the scheme even after I have provided the scheme and workspace details in the parameter.
  • Second it's throwing the error I have pointed out above.

Failed to export xccovreport from xcresult

[11:17:06]: Derived content from ["/Users/wooyoung.chung/Development/xxx/build/Logs/Test//Test-Transient Testing-2020.05.29_11-13-05--0700.xcresult", "/Users/wooyoung.chung/Development/messaging-ios/build/Logs/Test//LogStoreManifest.plist"]
[11:17:06]: Error occured while exporting xccovreport from xcresult '/Users/wooyoung.chung/Development/xxx/build/Logs/Test/Test-Transient Testing-2020.05.29_11-13-05--0700.xcresult'
[11:17:06]: Make sure you have both Xcode 11 selected and pointing to the correct xcresult file

but there is a xcresult file in the path. Any idea?

Invalid xcodebuild command execution on Xcode Bots CI

Hi, thanks for the plugin, I've just tried to integrate it with my project and using the Xcode Bots CI + @buildasaur, and the danger trigger failed with the following log:

Skipping file blacklisting as no ignore file was found at path
xcodebuild -list -workspace ios-merchant.xcworkspace�
xcodebuild clean -showBuildSettings -workspace ios-merchant.xcworkspace -scheme AFNetworking�

As I can see here it's trying to build the AFNetworking scheme although in the dangerfile I specified to build another one:

xcov.report(
   scheme: 'ios-merchant-staging',
   workspace: 'ios-merchant.xcworkspace',
   minimum_coverage_percentage: 50
)

@nakiostudio any idea? 😄

Improve handling a missing .xccoverage file

Hi, when there are failing unittests, there won't be a .xccoverage file generated by Xcode. Therefore, the error raised by xcov will be passed through to Danger resulting in Danger exiting with status code 1 instead of 0. This causes that danger will only print a quite generic error message instead of the rest of the report:

danger_error

In case the xcode_summary step is used, the rest of the report might even contain the failed unittests, which are now hidden to the contributors.

What do you think about adding a rescue statement to danger-xcov to handle the error gracefully and print the error message as failure in the danger report? I can create a PR if you agree with this idea.

Plugin seems to break when used with xcov 1.1

Gems:

danger 4.3.0
danger-xcov 0.2.2
xcov 1.1.0

Dangerfile:

xcov.report(
  scheme: 'AppKit',
  workspace: 'iOS/App.xcworkspace',
  minimum_coverage_percentage: 80
)

Output:

bundle exec danger --dangerfile=PostBuild.dangerfile --danger_id=postbuild
[09:46:49]: Skipping file blacklisting as no ignore file was found at path 
[09:46:49]: $ xcodebuild -list -workspace iOS/App.xcworkspace
[!] The exception involves the following plugins:
 -  danger-xcov
bundler: failed to load command: danger (/Users/jenkins/.gem/bin/danger)
Danger::DSLError: 
[!] Invalid `PostBuild.dangerfile` file: uninitialized constant Xcov::Runner
 #  from PostBuild.dangerfile:6
 #  -------------------------------------------
 #  if has_kit_changes
 >    xcov.report(
 #      scheme: 'AppKit',
 #  -------------------------------------------

  /Users/jenkins/.gem/gems/danger-xcov-0.2.2/lib/danger_plugin.rb:54:in `report'
  PostBuild.dangerfile:6:in `block in parse'
  /Users/jenkins/.gem/gems/danger-4.3.0/lib/danger/danger_core/dangerfile.rb:199:in `eval'
  /Users/jenkins/.gem/gems/danger-4.3.0/lib/danger/danger_core/dangerfile.rb:199:in `block in parse'
  /Users/jenkins/.gem/gems/danger-4.3.0/lib/danger/danger_core/dangerfile.rb:195:in `instance_eval'
  /Users/jenkins/.gem/gems/danger-4.3.0/lib/danger/danger_core/dangerfile.rb:195:in `parse'
  /Users/jenkins/.gem/gems/danger-4.3.0/lib/danger/danger_core/dangerfile.rb:272:in `run'
  /Users/jenkins/.gem/gems/danger-4.3.0/lib/danger/danger_core/executor.rb:27:in `run'
  /Users/jenkins/.gem/gems/danger-4.3.0/lib/danger/commands/runner.rb:66:in `run'
  /Users/jenkins/.gem/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
  /Users/jenkins/.gem/gems/danger-4.3.0/bin/danger:5:in `<top (required)>'
  /Users/jenkins/.gem/bin/danger:22:in `load'
  /Users/jenkins/.gem/bin/danger:22:in `<top (required)>'

Worked previously with xcov 1.0.1

danger 3

Could you please update the gem spec to support danger 3.x.x ?

At the moment when Danger 3 is specified in the gem file an old version of danger-xcov is installed (0.1.2)

Thank you

Scheme name not shown on danger error message

Hi, thanks for this plugin - I am trying to integrate it within our ci pipeline and so far the integration it's been pretty smooth.

We have a workspace composed of many subprojects/schemes, and I run the xcov plugin multiple times within our Dangerfile. This gives me different coverage reports per different schemes which is pretty handy. The only issue I am facing is that, if I get errors on minimum coverage not met in more than one scheme, the message does not show the name of that particular scheme:

screen shot 2017-12-18 at 9 46 48 am

Would it be possible to change this to show the name of that scheme as well? I'd be more than happy to submit a PR if that's the case.

Test coverage shows 0.00%

Hi! We're using the danger plugin and we're having an intermittent problem where it says that test coverage for our app (and all files) is 0.00%. It seems to happen for about half of all builds

Here's the log from Danger (running on CircleCI) for a case where it showed 0.00% -> seems like it shows success?

[12:15:38]: $ xcodebuild -showBuildSettings -workspace Projects/Tinder.xcworkspace -scheme Tinder
[12:15:53]: ▸ Loading...
[12:15:53]: ▸ ------ xcov-core ------
[12:15:53]: ▸ Opening .xccoverage file at path: (path here)
[12:15:54]: ▸ Parsing .xccoverage file...
[12:15:55]: ▸ File successfully parsed
[12:15:55]: ▸ Serializing coverage report...
[12:15:56]: ▸ Report successfully serialized
[12:15:56]: ▸ Writing report on disk...
[12:15:56]: ▸ Coverage report successfully created at path:  (path)

Impossible to use with Danger 2.1.1

I guess the gem dependency needs to be updated, it doesn't look like there are breaking changes on danger though from 2.0 to 2.1

Bundler could not find compatible versions for gem "danger":
  In Gemfile:
    danger (= 2.1.1)

    danger-xcov (= 0.2.0) was resolved to 0.2.0, which depends on
      danger (~> 2.0.0)

Add Support for Xcode 11 xcresult & xccovreport

With Xcode 11, Apple has changed up the file format of xcresult so that you can't simply inspect into the xcresult's file structure. Instead, you need to go through their tool xcresulttool in order to retrieve files like xccoverage out of the xcresult.

Unable to find any .xccoverage file

Hi All,

I am trying to run Danger xcov on my Gitlab CI using the following:

xcov.report(
scheme: 'Scheme_Name'
)

I am getting the following error:

[00:24:44]: Unable to find any .xccoverage file.
[00:24:44]: Make sure you have enabled 'Gather code coverage' setting on your scheme settings.
[00:24:44]: Alternatively you can provide the full path to your .xccoverage file.
[!] The exception involves the following plugins:

  • danger-xcov
    bundler: failed to load command: danger (/Users/ios_testing/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bin/danger)
    Danger::DSLError:
    [!] Invalid Dangerfile file: Error processing coverage file - see the log above. Updating the Danger gem might fix the issue. Your Danger version: 6.0.7, latest Danger version: 6.1.0

However when I run the following command on CI:

xcrun xcov --scheme Scheme_Name --verbose

It successfully generates the report.

I am currently using XCode 11 and it generates .xcresult. Code coverage is turned on and I have tried setting the full path to the report as well but the plugin is unable to find it.

failed to load command: danger

Hi, I am having trouble producing a coverage report.

|           xcov Coverage Report           |
+---------------------------------+--------+
| VHNetworking.framework        | 57.45% |
| TvOSNetworkingKit.framework   | 89.85% |
| KeychainAccess.framework      | 25.26% |
+---------------------------------+--------+

[09:29:51]: Actual Code Coverage (57.52%) below threshold of 90.00%
[09:29:51]: The build has been marked as failed because minimum overall coverage has not been reached.
[!] The exception involves the following plugins:
 -  danger-xcov

bundler: failed to load command: danger (/Users/distiller/output/vendor/bundle/ruby/2.7.0/bin/danger)
Danger::DSLError: 
[!] Invalid `Dangerfile` file: Error creating your coverage report - see the log above
 #  from Dangerfile:59
 #  -------------------------------------------
 #  
 >  report = xcov.produce_report(
 #      scheme: 'TvOSNetworkingKit-Package',
 #  -------------------------------------------

  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/xcov-1.7.5/lib/xcov/error_handler.rb:20:in `handle_error'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/xcov-1.7.5/lib/xcov/error_handler.rb:25:in `handle_error_with_custom_message'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/xcov-1.7.5/lib/xcov/manager.rb:175:in `validate_report'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/xcov-1.7.5/lib/xcov/manager.rb:34:in `run'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/danger-xcov-0.5.0/lib/danger_plugin.rb:66:in `produce_report'
  Dangerfile:59:in `eval_file'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/danger-8.2.1/lib/danger/danger_core/dangerfile.rb:307:in `eval'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/danger-8.2.1/lib/danger/danger_core/dangerfile.rb:307:in `eval_file'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/danger-8.2.1/lib/danger/danger_core/dangerfile.rb:200:in `block in parse'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/danger-8.2.1/lib/danger/danger_core/dangerfile.rb:197:in `instance_eval'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/danger-8.2.1/lib/danger/danger_core/dangerfile.rb:197:in `parse'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/danger-8.2.1/lib/danger/danger_core/dangerfile.rb:283:in `run'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/danger-8.2.1/lib/danger/danger_core/executor.rb:29:in `run'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/danger-8.2.1/lib/danger/commands/runner.rb:73:in `run'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/gems/danger-8.2.1/bin/danger:5:in `<top (required)>'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/bin/danger:23:in `load'
  /Users/distiller/output/vendor/bundle/ruby/2.7.0/bin/danger:23:in `<top (required)>'

Exited with code exit status 1
CircleCI received exit code 1

The Dangerfile:


files_to_check = (git.modified_files + git.added_files).uniq
(files_to_check - %w(Dangerfile)).each do |file|
	next unless File.file?(file)
	# Only check for classes inside swift files
	next unless File.extname(file).include?(".swift")
  	
  	# Will be used to check if we're inside a comment block.
	isCommentBlock = false

	# Will be used to track if we've placed any marks inside our class.
	foundMark = false 

	# Collects all disabled rules for this file.
	disabled_rules = []

	filelines = File.readlines(file)
	filelines.each_with_index do |line, index|
		if isCommentBlock
			if line.include?("*/")
				isCommentBlock = false
			end
		elsif line.include?("/*")
			isCommentBlock = true
		elsif line.include?("danger:disable")
			rule_to_disable = line.split.last
			disabled_rules.push(rule_to_disable)
		else
			# Start our custom line checks
			## Check for the usage of final class
			if disabled_rules.include?("final_class") == false and line.include?("class") and not line.include?("final") and not line.include?("func") and not line.include?("//") and not line.include?("protocol")
				warn("Consider using final for this class or use a struct (final_class)", file: file, line: index+1) 
			end

			## Check for the usage of unowned self
			if line.include?("unowned self")
				warn("It's safer to use weak instead of unowned", file: file, line: index+1) 
			end

			## Check for methods that only call the super class' method
			if line.include?("override") and line.include?("func") and filelines[index+1].include?("super") and filelines[index+2].include?("}")
				warn("Override methods which only call super can be removed", file: file, line: index+3) 
			end

			## Check if our line includes a MARK:
			if line.include?("MARK:") and line.include?("//")
				foundMark = true
			end
		end 
	end

	## Check wether our file is larger than 200 lines and doesn't include any Marks
	if filelines.count > 200 and foundMark == false 
		warn("Consider to place some `MARK:` lines for files over 200 lines big.")
	end
end

report = xcov.produce_report(
    scheme: 'TvOSNetworkingKit-Package',
    project: './TvOSNetworkingKit.xcodeproj',
    minimum_coverage_percentage: 90.0
)

if report.coverage < 0.900
    fail("Coverage is less than 90.0%.")
end

warn("#{report.create_displayable_coverage}")

xcov.output_report(report)

'Invalid Dangerfile' after Fastlane 2.172.0 update

In one of our projects after upgrading to fastlane 2.172.0 we are getting an error:

[!] Invalid Dangerfile file: Could not find option skip_package_dependencies_resolution in the list of available options: 
workspace, project, scheme, configuration, source_directory, derived_data_path, xccov_file_direct_path, output_directory, 
cloned_source_packages_path, html_report, markdown_report, json_report, minimum_coverage_percentage, slack_url, 
slack_channel, skip_slack, slack_username, slack_message, ignore_file_path, include_test_targets, exclude_targets, 
include_targets, only_project_targets, disable_coveralls, coveralls_service_name, coveralls_service_job_id, 
coveralls_repo_token, xcconfig, ideFoundationPath, legacy_support

Our Dangerfile does not specify skip_package_dependencies_resolution key.
After downgrading fastlane to 2.171.0 the issue is gone.
Is it an issue with Fastlane or danger-xcov needs to be updated to accomodate new changes?

Versions we are using:

danger 8.2.2
fastlane 2.172.0
xcov 1.7.5
danger-xcov 0.5.0
xcode 12.3

Build log:
https://app.bitrise.io/build/3f11bbf9ba9c46a7#?tab=log

Dangerfile:
https://github.com/rakutentech/ios-inappmessaging/blob/master/Dangerfile

Not working anymore with Fastlane 2.86.0

keep getting this error:

[!] The exception involves the following plugins:
 -  danger-xcov
bundler: failed to load command: danger (/Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/bin/danger)
Danger::DSLError: 
[!] Invalid `Dangerfile` file: Could not find option 'xcconfig' in the list of available options: workspace, project, scheme, configuration, source_directory, derived_data_path, output_directory, html_report, markdown_report, json_report, minimum_coverage_percentage, slack_url, slack_channel, skip_slack, slack_username, slack_message, ignore_file_path, include_test_targets, exclude_targets, include_targets, only_project_targets, coveralls_service_name, coveralls_service_job_id, coveralls_repo_token
 #  from Dangerfile:25
 #  -------------------------------------------
 #  # code coverage
 >  xcov.report(
 #     scheme: "myproj-Package",
 #  -------------------------------------------
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/fastlane-2.86.0/fastlane_core/lib/fastlane_core/ui/interface.rb:133:in `user_error!'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/fastlane-2.86.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/fastlane-2.86.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:327:in `verify_options_key!'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/fastlane-2.86.0/fastlane_core/lib/fastlane_core/configuration/configuration.rb:216:in `fetch'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/fastlane-2.86.0/fastlane_core/lib/fastlane_core/project.rb:312:in `xcodebuild_parameters'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/fastlane-2.86.0/fastlane_core/lib/fastlane_core/project.rb:328:in `build_xcodebuild_showbuildsettings_command'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/fastlane-2.86.0/fastlane_core/lib/fastlane_core/project.rb:348:in `build_settings'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/fastlane-2.86.0/fastlane_core/lib/fastlane_core/project.rb:385:in `default_build_settings'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/xcov-1.3.3/lib/xcov/manager.rb:145:in `derived_data_path'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/xcov-1.3.3/lib/xcov/manager.rb:40:in `parse_xccoverage'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/danger-xcov-0.4.1/lib/danger_plugin.rb:64:in `produce_report'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/danger-xcov-0.4.1/lib/danger_plugin.rb:36:in `report'
  Dangerfile:25:in `block in parse'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/danger-5.5.11/lib/danger/danger_core/dangerfile.rb:200:in `eval'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/danger-5.5.11/lib/danger/danger_core/dangerfile.rb:200:in `block in parse'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/danger-5.5.11/lib/danger/danger_core/dangerfile.rb:196:in `instance_eval'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/danger-5.5.11/lib/danger/danger_core/dangerfile.rb:196:in `parse'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/danger-5.5.11/lib/danger/danger_core/dangerfile.rb:274:in `run'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/danger-5.5.11/lib/danger/danger_core/executor.rb:28:in `run'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/danger-5.5.11/lib/danger/commands/runner.rb:68:in `run'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/gems/danger-5.5.11/bin/danger:5:in `<top (required)>'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/bin/danger:23:in `load'
  /Users/travis/build/myproj/src/vendor/bundle/ruby/2.4.0/bin/danger:23:in `<top (required)>'

Incompatible with Fastlane 2.137

Inheriting Faraday::Error::ClientError is deprecated; use Faraday::ClientError instead. It will be removed in or after version 1.0
Faraday::Error::ClientError.inherited called from /Users/me/.rvm/gems/ruby-2.3.1/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:14.

We're seeing errors running danger-xcov with the latest version of fastlane. Any help with what we're doing wrong would be great. Thanks!

We're using versions:
fastlane 2.137.0
danger 6.1.0
danger-xcov 0.4.1
faraday 0.17.1
octokit 4.14.0
xcov 1.7.0

Dangerfile doesn't work

HI, I'm trying to implement danger on our CI ecosystem but at the moment of execute danger with xciv it fails with this error

[!] The exception involves the following plugins:

  • danger-xcov
    bundler: failed to load command: danger (/Users/vagrant/git/vendor/bundle/ruby/2.6.0/bin/danger)
    Danger::DSLError:
    [!] Invalid Dangerfile file: xcodebuild -list timed-out after 30 seconds. You might need to recreate the user schemes. You can override the timeout value with the environment variable FASTLANE_XCODE_LIST_TIMEOUT
    from Dangerfile:3

-> xcov.report(
scheme: Grability,

Unable to find any .xccoverage file

I've combed through previous issues regarding this error message but none of the resulting releases have worked for me. The only solution that does work is providing the path to the Derived Data folder when running xcov but I have the default Derived Data path set in Xcode

screen shot 2017-11-27 at 3 09 44 pm

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.