Confusing file exclusion behavior should be documented
- Version: 7.1.0
- Platform: Linux
test-exclude unilaterally excludes files in parent (relative to cwd) directories. This was very confusing when I was trying to generate coverage reports from within my test directory and the tests were only referencing files in parent directories. The generated reports would always show no results no matter what options I passed to c8 (e.g. --all, --include, --exclude, etc.).
At the very least this should be documented in the readme and additionally it would be nice to have the behavior be overridable (this would require changes to test-exclude since as of this writing it does not support overriding its relative path check).
I hit this same behavior. Its is actually toggleable in test-exclude but this isn't exposed. In this PR: https://github.com/bcoe/c8/pull/206 I've opened up the programmatic report API (note not the command line ux) to allow multiple source directories, which includes the ability to relax the restriction on directories outside cwd as well.
@bcoe maybe we should consider this from the cmdline?
@j03m yeah, let's expose this option for folks?