alfert / coverex

Coverage Reports for Elixir
Other
101 stars 26 forks source link

Sometimes code is not detected as executed when it did #20

Closed cjimison closed 8 years ago

cjimison commented 8 years ago

I see the following report from covered sometimes:

screen shot 2015-11-11 at 2 37 57 pm

In this case it is saying the if statement never was executed however the code inside the if statement did. I am not sure if this is because of how elixir parses the "if" macro or if it is a bug in coverex, but I thought I would report it.

-Chris

alfert commented 8 years ago

Coverage reporting in Elixir is done based on the tooling provided by Erlang. All Elixir-based tools are only a wrapper around the Erlang / Beam functionality. I have seen similar situations also in my source code. So, my assumption is that this behavior is a strange anomaly based on the mapping of Elixir source code to BEAM byte code. It could have something to do with internal inlining of the generated code, but this is at most an educated guess.

In short: I have no clue, since I only use the already existing coverage machinery from BEAM. Therefore, I close this issue with a WONT_FIX