-
Notifications
You must be signed in to change notification settings - Fork 68
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
Over-reporting of coverage #11
Comments
This is a dupe of #4, I'm not sure what I can do about it without using JuliaParser.jl which seems intimidating. I feel like it should probably be fixed in Julia. |
If you figure how to fix this in Julia you'll be my hero :D |
I'll look into it. Won't be for a couple of days at least. And it's not obvious that this is easy to fix there, either. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In working on JuliaLang/julia#7464, I've taken a closer look at how this package scores coverage. I think there's a problem of over-reporting.
Suppose we create the following file:
Now we run the following test script:
as
julia --code-coverage test.jl
. We get the following coverage file:As expected, f1 is marked as having run, but f2 is not. IIUC, this package will mark all lines that have a
-
in front of them with (javascript)null
, and that is interpreted as not being relevant for coverage. So this "package" would be listed as having 100% coverage, despite the fact that half of the functions aren't tested.To me it seems that the problem is (unfortunately) much harder, in that you have to parse the difference between lines like
end
that definitely shouldn't count against your coverage total vs. genuine lines of code that should have coverage but don't.The text was updated successfully, but these errors were encountered: