-
Notifications
You must be signed in to change notification settings - Fork 53
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
Missing Constructor wrong coverage #6
Comments
Is there any fix or workaround? Right now it prevents me from importing the coverage report to sonarqube because the line number is invalid. |
If you can provide me with a reproducible test case (binary SWF, no dependencies on Flex SDK preferred) I'll fix it. If I remember correct, there is actually code on the byte code level for each unit when being initialized. |
Foo.as only has 10 lines, but it seems apparat instrumented a line number 11 during the object's initialization.
|
I just checked this. There is in fact a DebugLine instruction in the bytecode. It is being executed and therefore part of the coverage report. You can supply Apparat a source-path. If a source path is given, one could calculate the number of lines for an instrumented source and ignore DebugLine instructions that are out of bounds. However this doesn't seem like a satisfactory solution to me, especially since we have to count the lines of code in the soruce file. This creates an additional dependency to the source code which was optional before. I think FlexMojos is always passing the source path to Apparat but I'm not sure. I also think that FlexMojos already did something along those lines. Sorry this is all several years old. @velo do you remember? |
Sorry @joa, @silmerusse For workaround I suggest you creating a constructor. |
I was trying to use flexmojos coverage and wasn't understanding why the coverage.xml was reporting a hit on a line that doesn't exist on the file.
After a night of debug i've found that apparat is instrumenting a line past the end of file when there is no constructor
The text was updated successfully, but these errors were encountered: