Closed tilak-nanavati-opshub closed 1 year ago
The process is more along the lines of "the debug information says that this is significant code ( = you can set a break-point on it), so I'll record it as such", being entirely agnostic as to what that represents in the original source.
In this particular case, the end of a catch
clause, the closing }
will typically correspond to a Leave opcode, a special-purpose branch instruction indicating the flow of control out of the try
/catch
construct, plus possible Nop opcodes for alignment purposes. This is, however, entirely compiler dependent : the following code --
public async Task<bool> CheckFolderExists(string folder)
{
try
{
using var response = await client.PostAsync(String.Empty, null);
return await IsResponseSuccessfulAsync(response);
}
catch (Exception e)
{
return false;
}
}
has no sequence point corresponding to the last line but one.
Hi Steve,
Thank you for the quick response. We understood the point made.
Release v8.4.840 provides the option to ignore such trivial sequence points (--trivia
. /p:AltCoverTrivia=true
, or equivalent)
Hi Steve,
Thank you for this update.
This piece of information would turn out to be very useful.
Thanks again.
Currently, in our production environment, we have observed that particularly the closing braces '}' are also highlighted for coverage details.
As per our understanding the closing braces '}' should be non-executable, so we would like to confirm whether AltCover considers such symbols (closing braces '}' ) as executable and present the line hit details against that.
We are adding a screenshot for the same to bring more clarity.
Coverage XML (Cobertura report)
Note: We read the Cobertura coverage report generated by AltCover to determine which lines were covered or not.