slidoapp / dbt-coverage

One-stop-shop for docs and test coverage of dbt projects.
MIT License
191 stars 26 forks source link

fix: protect division by zero #55

Closed Cquad closed 1 year ago

Cquad commented 1 year ago

To reproduce division by zero error:

dbt init 
cd dbt_generated_project
dbt docs generate
dbt-coverage compute doc

This error occurs on empty project.

mrshu commented 1 year ago

@Cquad just out of curiosity, when did this happen for you? Was the project simply empty?

Cquad commented 1 year ago

@Cquad just out of curiosity, when did this happen for you? Was the project simply empty?

Yes? I have updated pull request description to add steps to reproduce this error

mrshu commented 1 year ago

Understood, thanks a bunch for both the explanation and the fix @Cquad!