sc-forks / solidity-coverage

Code coverage for Solidity smart-contracts
MIT License
977 stars 264 forks source link

Question: Parts of constructor are not covered #731

Closed jacekv closed 2 years ago

jacekv commented 2 years ago

Hey there :)

So I am currently using solidity-coverage 0.7.21 in my hardhat project and I am running currently into a problem, which I don't understand. I have a contract, where the coverage reports tells me, that parts of the constructor are not covered:

image

If you look a little bit below, you see that the lines below are covered (at least that's my understanding of the number with the green background).

What am I missing here? I don't understand this behaviour.

cgewecke commented 2 years ago

@jacekv Sorry for the delay responding. Could you link to the repo that generated this report?

Haven't seen this happen before ... idk what's going wrong.

jacekv commented 2 years ago

@cgewecke That's alright :) Thanks. I am somehow not able to reproduce the exact problem right now, yet I am still confused. I executed the coverage step in Github actions and here is the result: https://github.com/varkiwi/git3-contracts/runs/8044701537?check_suite_focus=true

image

Seems all good. But when I run it locally I get a different output:

image

Have you ever experience something like that?

jacekv commented 2 years ago

After running ‘hard hat clean’ I receive the same results as in the pipeline.

since I am currently not able to reproduce the error, I am going to close the issue as of now.