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
Fail coverage if any file contains an unmatched coveralls-ignore-start #197
Comments
I think it's a great observation. And I would be happy to make a PR if I first get a decision on #301, because it's changing the same code. |
That's neat! I also like what credo does: |
@tonyvanriet What would be the desired behavior?
Additionally, I think we could print a warning in case there is an unrecognized comment with prefix |
Thanks for picking this up @RKushnir. I think a failure exit code would make sense and a message to indicate "unmatched ignore tag". If the parser can't find a valid being and end to the ignore block, I don't think it should ignore anything for the rest of the file. I think it makes sense to err on the side being conservative for a coverage tool like this. |
So it's been exactly a year since I showed up here 😅 But recently I actually started working on this and I think I'm about half-way done coding. Before I proceed, I'd like to get some authoritative approval/feedback first, to avoid wasting time. My solution is going to noticeably complicate the The invalid cases which I'm handling and showing warnings:
The first 2 cases are important, the others are just an easy bonus and can be skipped if needed for simplicity. Please, guide me @parroty . I can also create a separate issue to discuss the implementation or publish my half-baked PR already. |
We get a lot of mileage out of #183 when we want to be more precise about the lines we're ignoring. Thanks @mruoss.
Nonetheless, we just noticed that if we don't properly terminate a
# coveralls-ignore-start
, excoveralls will proceed to ignore the remainder of the file, which could hide a coverage problem below the point where we intended to stop the ignore.In our case, we had some cases where we erroneously used
coveralls-ignore-end
instead ofstop
, and it has taken us quite a while to notice the mistake.I don't know if/when I'll be able to make time to try to PR this, but I wanted to at least come here first to see if there was anything missing from my understanding, or if there was already discussion along these lines.
Thanks
The text was updated successfully, but these errors were encountered: