100% coverage with empty tests

Description

We had around 80% coverage, then commented out all the test cases. Instead of the coverage dropping to 0% as one would expect, it went up to 100%. It seems that codecov only identified the test code and ignored the source code itself once it wasn’t being used in the test.

Is there any solution to this? Perhaps an option to force inclusion of all source files when calculating coverage?

Repository

https://codecov.io/gh/aws-robotics/cloudwatchmetrics-ros1/tree/master/cloudwatch_metrics_collector

Thanks @AAlon – excited to see AWS Robotics using Codecov! I looked into the repos.

On this case, we give power in the hands of the user for whether to “count” test files in coverage. If you don’t want your test file counting, I would recommend ignoring that and just sticking to .src

Separately, it is very strange why this test file came back 100% covered and we are digging into it. Codecov

Thanks @jerrod, using “ignore” we’re able to fix the coverage reports for almost all repositories, but the one linked above is still broken. After ignoring test files we encounter report generation errors:

Very odd… we’d appreciate your help finding a solution here.