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

Scheme name not shown on danger error message #19

Open
joanromano opened this issue Dec 17, 2017 · 6 comments
Open

Scheme name not shown on danger error message #19

joanromano opened this issue Dec 17, 2017 · 6 comments

Comments

@joanromano
Copy link

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.

@macdoum1
Copy link

@joanromano How do you run the plugin multiple times for multiple schemes?

Running xcov.report(...) multiple times within the same Dangerfile seems to be resulting in Danger only commenting with the markdown report of the last one specified.

@joanromano
Copy link
Author

Hey @macdoum1 what I do is generate the markdown manually. You can do so by accessing your generated Report's targets property and then markdown_value in each of them. You can find all that information in Xcov models

@macdoum1
Copy link

macdoum1 commented Jun 28, 2018 via email

@Vadimkomis
Copy link

Vadimkomis commented Feb 18, 2019

@joanromano I'm trying to accomplish exactly what you did. Can you give more specific example of how you managed to generate code coverage for different test targets, without Danger overwriting it?

@joanromano
Copy link
Author

@Vadimkomis sorry I don't have that code with me anymore, but as I said before you should be able to access all the generated Reports and manually tweak them

@Vadimkomis
Copy link

Vadimkomis commented Mar 8, 2019

@joanromano are you talking about this function in the Xcov modals:
def markdown_value markdown = "## Current coverage for #{@name} is `#{@displayable_coverage}`\n" return markdown << "✅ *No files affecting coverage found*\n\n---\n" if @files.empty? markdown << "Files changed | - | - \n--- | --- | ---\n" markdown << "#{@files.map { |file| file.markdown_value }.join("")}\n---\n" markdown end

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

3 participants