You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Thanks for reporting. Unfortunately, we are limited to the precision of
the information that the debug library of the running Lua implementation
provides us. It does not report the second line. Lua and LuaJIT versions
all provide different data (LuaJIT, in particular, provides unreliable data
when the JIT compiler is on.)
It would not be technically impossible to detect this particular construct
you described, but I'm not sure we'd be able to catch all cases. Given that
the first line of a call expression runs then its following lines must run
if it wasn't aborted during a subexpression, so if the following line
executed then it would be fair to assume that the entire expression
executed.
However, to do that reliably it would require a full parse of the Lua
source code, which luacov doesn't currently do, and we would be effectively
extrapolating information from the data we're given by Lua.
This issue occurs when using syntax like the following:
Running luacov on a file containing only this code reports coverage as:
If it helps, I'm running this with Lua 5.1.5. This syntax can be pretty clean, so it'd be really nice if luacov understood it!
The text was updated successfully, but these errors were encountered: