-
Notifications
You must be signed in to change notification settings - Fork 191
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
Blank lines not factored into range #307
Comments
So long answer short it really depends on the underlying coverage report. Diff cover is reporting all those missing lines like that because that's how the underlying coverage report is reporting them. I'm away from a computer right now (mobile) so I could be misremembering something but I can double check this later. |
So I wrote up a test script to demonstrate this.
As you can see the report basically skips these blank lines. Diff cover is kinda just reporting what this gives. I suppose it would be possible to update this logic to join blocks that are separated by 'blank' lines and not by 'covered' ones. That being said it very much strikes me as a preference. I could see an argument for someone prefer seeing how many "blocks" of uncovered code exist. |
Hello! I've noticed that when I commit a new file with no tests, I'll get unexpected outline because of blank lines and comments.
Expected:
Actual:
In this example, I have:
Is there a way to fix this? I'm generating a warning via GitHub Actions and this is generating ~13 warnings when I'd like one warning for the full file. These warnings clutter the UI, but the real problem is that GitHub Actions only allows 10 warnings on job, so I'm inclined to try to use ranges as much as possible.
Thanks!
The text was updated successfully, but these errors were encountered: