VeryGoodOpenSource/very_good_coverage

parsing error!

maxzod opened this issue · 2 comments

Describe the bug
parsing error!

To Reproduce
write a test witout using any code from the project
for example

void main() {
  test(
    '',
    () => expect(true, isTrue),
  );
}

then running the test will work and create empty lcov.info file which will throw this error

Expected behavior
fail and mention the coverage is 0%

Additional context
i know it does't make sense to write a test like this but in my case it makes sense to fail and mention that the failure reson is the coverage is 0%

Hi @maxzod 👋

Thank you for opening this issue. Personally, I think it makes sense to throw an error if the lcov report is empty, since empty and 0% coverage can be different things.

Have you considered running a custom script before very_good_coverage to check if the lcov.info file is empty or not? That might give you more control over the type of message you want to provide.

Thoughts?

Thank you!

Have you considered running a custom script before very_good_coverage to check if the lcov.info file is empty or not ?

yes this makes since but i didi't think about it 😅

still showing another message will help more ,

it took me almost 25 commits to the yml file to figure out what causes the parsing error !

if 0% is not a good fit then another error message will be nice at least we will know where to fix it