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

Store and display filename in results #1090

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ryanstrickler
Copy link

@ryanstrickler ryanstrickler commented Apr 30, 2024

I'd like to see filenames in my output when line or branch coverage fails and this change appears to work.

I'm using the minimum_coverage_by_file option in my test helper, but the current output doesn't seem helpful on it's own, especially in a CI context.

Maybe the intention is to force people to use the UI locally to find the files that need to be covered? But I think it would be helpful to my team if they could immediately see which file has an issue.

I will add tests to cover this, just wondering:

  1. Is this something that has a chance of being merged into the main repo?
  2. Am I totally on the wrong track with how to implement this? Is there a way to access the filename that I overlooked?

Example output:

Line coverage by file (0.00%) is below the expected minimum coverage (70.00%): /Users/ryan/Code/ryanstrickler/client/app/models/order_preview.rb
Branch coverage by file (0.00%) is below the expected minimum coverage (50.00%): /Users/ryan/Code/ryanstrickler/client/app/models/material_request_category.rb

If this is something that's been tried or shot down before, my apologies. I searched the repo and didn't see anything obviously related.

This is actually one of the first open-source PRs I've ever submitted, so be gentle. 😆

@ryanstrickler ryanstrickler marked this pull request as draft April 30, 2024 18:46
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

Successfully merging this pull request may close these issues.

1 participant