solcover
solcover copied to clipboard
"Same line" statements belonging to "else" bodies are not reported
Istanbul reports a taken else branch as follows

Solcover reports:

The instrumentation looks like this:
Coverage('/Users/user/Sites/sol-coveralls/solcover/test.sol',5);
StatementCoverage('/Users/user/Sites/sol-coveralls/solcover/test.sol',1);
if (x == 1) {BranchCoverage('/Users/user/Sites/sol-coveralls/solcover/test.sol',1,0); StatementCoverage('/Users/user/Sites/sol-coveralls/solcover/test.sol',2);
x+= 1;}
else {BranchCoverage('/Users/user/Sites/sol-coveralls/solcover/test.sol',1,1); StatementCoverage('/Users/user/Sites/sol-coveralls/solcover/test.sol',3);
x += 5;}
}
Same as #37.
@area I feel like this same-line else construction is relatively common and Istanbul's report is intuitively more informative. But as you note in #37 - the obvious fix would produce 11 hits. Also bound up with the else if analysis you made in the highlighting issue. . . . not sure what should be done here.
I agree that our output here definitely could be better. I'll have a fiddle!