-
Notifications
You must be signed in to change notification settings - Fork 176
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
Files with 0 lines should have 100% coverage by default #87
Comments
This is an interesting problem. I would think that even though there are zero executable lines of code, it's still technically correct to say that there is 0% coverage of that file. What use case do you have where you have a completely empty file in your project? |
For example (almost) default Phoenix defmodule MyApp.Repo do
use Ecto.Repo, otp_app: :my_app
@dialyzer {:nowarn_function, rollback: 1}
@dialyzer {:nowarn_function, insert_or_update: 2}
@dialyzer {:nowarn_function, insert_or_update!: 2}
end Which has no unused lines and no used lines (even if it is used during tests). I believe that in such case (0 SLOC and 0 covered lines) there should be automatically 100% coverage. |
Thanks, that's a good example! |
Thanks for the feedback. |
I think that this can be used as a temporary workaround, but it should be default behaviour. |
OK, understood the point. Also, I've rechecked the coveralls.io output and it seems they're taking it as 100% (though not sure when changed). I'll be changing the default to 100%. |
Thanks for the comment and sorry being late to respond. I'm closing by pushing as v0.6.0, but if you find further issue/comment, please reopen. |
Currently it reports that such files have 0% coverage.
The text was updated successfully, but these errors were encountered: